Pause/resume during recording

Prev

Next

 






































































































Pausing and resuming the recording

Description

Pause/resume during recording

It is possible to pause / resume the recording if RecordingCanPause has been enabled before invoking StartRecording.

The recording can be paused by invoking PauseRecording , and resumed by invoking ResumeRecording.

The OnRecordingPaused event notifies that the pause recording is completed (when the recording is resumed, a OnRecordingStarted event notification occurs).

Remark:
While the recording is paused the video source goes on streaming and previewing. If you need to pause the video source as well look at the "pausing/resuming the whole recording graph" chapter below.


Appending the video when resuming the recording or generating a new clip

- if RecordingPauseCreatesNewFile is disabled, the recording is appended to the current video clip.


Splitting the resume/pause sequences in several files

- if RecordingPauseCreatesNewFile is enabled, a new clip is generated automatically for each resume/pause sequence.

(if the RecordingFileName property is empty a new file name is generated automatically depending on the AutoFileName setting, otherwise the recording file name specified just before invoking RecordingPauseCreatesNewFile is used)

The new file is not created when resuming the recording, but before when the recording has previously been paused by invoking PauseRecording.

Therefore, the file is already created and opened when invoking ResumeRecording, "ready to go", so by this way frames will not be dropped by loosing time to create the new file.
So if the recording is stopped before invoking ResumeRecording, the new empty file (that has just been created before, when PauseRecording has been invoked) is deleted.

Note: the pause / resume while compressing on the fly may not work properly with some video compressors.


Pausing/resuming the whole recording graph

During recording, when invoking PauseRecording / ResumeRecording, the graph goes on running and previewing (only the recording is paused)

If you need to pause /resume the whole graph during the recording, invoke PausePreview / ResumePreview instead.

This can be useful e.g. to apply overlays on a video clip by recording it to a new file with the following settings:

VideoGrabber.VideoSource  = vs_VideoFileOrURL
VideoGrabber.VideoSource_FIleOrURL  = name of the source clip
VideoGrabber.StartRecording ()
...

- then invoke later VideoGrabber.PausePreview to pause the recording of the video clip, so you can prepare and/or update the overlays,

- then invoke later VideoGrabber.ResumePreview to go on recording from the location where the clip has been paused.



See Also
Datastead Encoder Recording methods and properties Encoder_GetInt Encoder_Pause Encoder_Resume Encoder_SetInt Encoder_SetStr Encoders_CreateInstanceForRecording Encoders_CreateInstanceForStreaming Encoders_RemoveAllInstances Encoders_RemoveInstance