Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pause video recording [closed]

I'm trying to create an application where the user can record video from a camera. One of the features of this application must be a pause in file recording.

For example: The user starts recording by pressing the "Start" button. After some time user presses the "Pause" button and video recording is paused. Then user presses the "Resume" button and video continues recording in the same file.

Can anybody help me?

like image 292
kroumvud Avatar asked Feb 07 '13 09:02

kroumvud


People also ask

Can you pause and resume video recording on Iphone?

To start recording, tap the Record icon at the bottom. Tap the Pause icon to pause your recording at any time. To resume recording, tap the Record icon again. Once you're done, tap the Checkmark icon in the top right to stop recording altogether.

Is there an app where you can pause while recording?

Thanks to video pause you can record as many clips as you want, and export as one video! Record, pause and resume recording until you've got the perfect video. Zoom in and out, while you're recording.

How do you pause a screen recording?

Method 2: Keyboard shortcut If you are recording a browser tab, you can press Alt (or Option) + Shift + P to pause a recording. You can also use this method during a desktop recording only if Chrome is the current application. Press Alt (or Option) + Shift + P again to resume recording.


1 Answers

Set up an AVCaptureSession and a AVAssetWriter then you can switch the recording on an off with the boolean "isRecording".

 BOOL isRecording;

-(void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection
{
     if(videoWriterInput.readyForMoreMediaData && isRecording) [videoWriterInput appendSampleBuffer:sampleBuffer];
}
like image 142
Sten Avatar answered Oct 04 '22 11:10

Sten