Skip to content

Pause/resume during recording

The recording can be paused and resumed if RecordingCanPause has been enabled before invoking StartRecording.

The recording is paused by invoking PauseRecording and resumed by invoking ResumeRecording.

Note

ResumeRecording also starts writing to the file a recording held by HoldRecording (see Recording methods and properties); RecordingCanPause is not required for that use.

The OnRecordingPaused event notifies that the recording has been paused (when the recording is resumed, an OnRecordingStarted event occurs).

Note

While the recording is paused, the video source goes on streaming and previewing. To pause the video source as well, see the "Pausing/resuming the whole recording graph" section 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 into 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 according to the AutoFileName setting; otherwise, the recording file name specified just before invoking PauseRecording is used.

The new file is not created when the recording is resumed, but beforehand, when the recording is paused by invoking PauseRecording.

Therefore, the file is already created and opened, "ready to go", when ResumeRecording is invoked, so no frames are dropped by losing time creating the new file. If the recording is stopped before ResumeRecording is invoked, the new empty file (created earlier, when PauseRecording was 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 PauseRecording / ResumeRecording are invoked, the graph goes on running and previewing (only the recording is paused).

To pause/resume the whole graph during the recording, invoke PausePreview / ResumePreview instead.

This can be useful, e.g., to apply overlays to 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, later, invoke VideoGrabber.PausePreview to pause the recording of the video clip, so that the overlays can be prepared and/or updated.
  • Then, later, invoke VideoGrabber.ResumePreview to go on recording from the location where the clip has been paused.