Processing: Editing the source video

VirtualDub

VirtualDub help - Processing: Editing the source video

Although VirtualDub is not a full non-linear editing (NLE) application, it does have some limited functionality for editing source video. Unwanted portions of video can thus be trimmed off from a video before it is processed, saving disk space and time.

Selecting and editing portions of the timeline

Use the Edit > Set selection start and Edit > Set selection end commands to select a portion of video. This can also be done through the Home and End keys on the keyboard, or through the mark-in and mark-out buttons below the position slider. The current selection is then indicated by a sky-blue area on the position slider.

Once a portion of video has been selected, the Delete command (keyboard shortcut: Delete key) can be used to remove that video from the timeline. The Cut, Copy, and Paste commands can also be used to reorder video (they cannot be used to splice or combine video files together, however). The Undo/Redo commands can be used to reverse mistakes, and the Reset timeline command undoes all edits entirely, restoring the timeline to the entirety of the source video.

Editing the timeline only creates an edit list within VirtualDub for later use; it never modifies the source file in any way. In particular, deleting a section of the timeline does not delete anything from the source file, and the edited result must be saved to a new file. Editing a video file thus requires disk space to hold both the original and the edited clip.

As a shortcut, the selection mark-in/mark-out commands also modify the range selection that is exposed via the Video > Select range... menu command. Thus, selecting a portion of video prior to a save command causes only that selection to be rendered to disk. If this is undesired, clear the selection using the Edit > Clear selection (Ctrl+D) command.

Caveats when editing

VirtualDub does not have support for transitions, so any edits will be abrupt unless the edit points are located at places in the source video that hide the seam. Silent fades to black are a good place to remove selections of video.

Editing can be performed in any video or audio mode, including Direct mode, which causes the render-to-disk to be extremely fast and without quality loss in most cases. However, there are serious limitations with editing in this mode that restrict where edits can be performed; also, advanced audio and video compression can impede VirtualDub's ability to edit cleanly. For more information, see Direct mode.

Masking frames

A single frame or section of frames can be masked; this prevents the imagery from those frames from being used and instead forces reuse of the image of the last unmasked frame. In Direct mode, the masked frame data is deleted entirely and empty padding frames are written instead. However, in either case the audio is untouched, so the video simply appears to freeze for the duration of the masked range. This can be used either to remove single-frame glitches or to remove compressed frames that are damaged.

Note that similar restrictions apply to masked frames as to deleted frames with regard to masking frames that are not key frames, and VirtualDub will similarly fix masked ranges that cannot be supported in Direct mode.