ios - audio slow motion like default Slo-Mo Camera functionality using 240FPS -
i want implement slowmotion video defalut functionality of slo-mo in camera , used following code , worked fine video. in audio track of video not working properly.
double videoscalefactor =8.0; compositionaudiotrack scaletimerange:cmtimerangemake(kcmtimezero, videoduration) toduration:cmtimemake(videoduration.value* videoscalefactor,videoduration.timescale)]; [compositionvideotrack scaletimerange:cmtimerangemake(kcmtimezero, videoduration) toduration:cmtimemake(videoduration.value* videoscalefactor, videoduration.timescale)]; scenario woking video slowmotion.but in audio slow-motion not working...
please me..
i found solution of audio slowmotion
double videoscalefactor =8.0;
[compositionaudiotrack scaletimerange:cmtimerangemake(kcmtimezero, videoduration) toduration:cmtimemake(videoduration.value* videoscalefactor,videoduration.timescale)];
its working not working in avplayer have set following property of avplayeritem
avplayeritem *playeritem = nil;
playeritem.audiotimepitchalgorithm = avaudiotimepitchalgorithmvarispeed;
Comments
Post a Comment