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?
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.
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.
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.
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];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With