I have recorded a movie file using AVCaptureMovieFileOutput
by setting maximum duration limit.
For e.g.: If I want to record 10 seconds video, I had set the max duration and other properties for the movie file like below...
Float64 TotalSeconds = 10;
int32_t preferredTimeScale = 30
CMTime maxDuration = CMTimeMakeWithSeconds(TotalSeconds, preferredTimeScale);
aMovieFileOutput.maxRecordedDuration = maxDuration;
aMovieFileOutput.minFreeDiskSpaceLimit = 1024 * 1024;
But recorded video is showing only 9 seconds (which I played using MPMoviePlayerController
), why is that time difference.. How to record exactly 10 seconds. Am I doing anything wrong while setting maximum duration. Thanx.