문제

In my app I am recording video of up to 30 seconds. I used the following line to do this.

[imagePicker setVideoMaximumDuration:30];

Every thing was working fine. Then I decided to move from UIImagePickerController to AVCaptureSession, It successfully changed every thing but could not set the MaximumDuration. Is there any parameter/workaround which can set this?

도움이 되었습니까?

해결책

AVCaptureMovieFileOutput *aMovieFileOutput = [[AVCaptureMovieFileOutput alloc] init];
CMTime maxDuration = <#Create a CMTime to represent the maximum duration#>;
aMovieFileOutput.maxRecordedDuration = maxDuration;
aMovieFileOutput.minFreeDiskSpaceLimit = <#An appropriate minimum given the quality of the movie format and the duration#>;

For further details look at here

ALSO try NSTimer to setup camera actions

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top