Chapter 7. Virtual Clips

A virtual clip (vclip) does not contain media; a virtual clip is a list of in and out points that refer to one or more clip files. A virtual clip is similar in concept to an Edit Decision List or a Play List. When you play a virtual clip, you play all of the segments of all of the clips referenced by the virtual clip, as shown in Figure 7-1.

Figure 7-1. Virtual Clips

Figure 7-1 Virtual Clips

A virtual clip can also point at other virtual clips, which, in turn, point at clip files.

The remainder of the chapter explains the MVCP commands you use to manipulate vclips:

Virtual Clip Command Overview

Table 7-1 provides a summary of the MVCP commands used to manipulate virtual clips. The remainder of the chapter discusses these commands in more detail.

Table 7-1. MVCP Commands for Virtual Clips

Command

Description

CMK

Create a virtual clip.

COPN

Open a clip.

CSAV

Save a clip.

CCLS

Close a clip.

CUPS

Update clip segments.

CSLS

List clip segments.

CSRM

Remove clip segments.

CSCL

Clear clip segments.

CFNW

Insert new frames in a clip.

CFRM

Remove frames from a clip.

CFCL

Clear frames from a clip.

The first four commands are file operations for clips. The middle four operations pertain only to segmented clips, that is, virtual clips. The last three commands work on frames in virtual and non-virtual clips.

Segments

A segment is a portion of a larger clip. For example, in Figure 7-1, the virtual clip is composed of three segments. A segmented format allows a clip to be composed of segments. Currently, the only segmented format is the virtual clip (vclip).

The format of each of the segments in a virtual clip must be the same; for example, all of the segments of a virtual clip might be Rice encoded.

File Operations On Virtual Clips

This section describes the MVCP commands you use to create, open, save, close, and remove virtual clips.

Creating and Opening Virtual Clips

To create a virtual clip or to open an existing one, use the following MVCP commands, respectively:

CMK clipName “movie/vclip”
COPN clipName

  • clipName is the name of the clip to create or open. (COPN opens virtual and non-virtual clips.)

  • formatName must specify a segmented format. The only segmented format supported at this time is “movie/vclip”.

Created Vclips

A clip created with CMK is not visible in the clip cache nor usable in the system until you add segments to it using the CUPS command, as described in “Adding Segments to Vclips”.

Saving, Closing, and Deleting Virtual Clips

To save, close, or delete a virtual clip, use the following MVCP commands, respectively:

CSAV [clipName]
CCLS [clipName]

clipName is the name of the clip to save or close. If clipName is not specified, the most recently created or opened clip is saved or closed.


Note: CSAV, CCLS, and CRM work with virtual and non-virtual clips.


Working With Segments

The MVCP commands in this section work only with segment-formatted clips; currently the only format supported is “movie/vclip”.

Once you create or open a vclip, you add segments to or remove segments from it to revise the vclip.

Adding Segments to Vclips

The CUPS (update) command, defined as follows, adds segments to vclips:

CUPS clip src-op dest-op trk-mask in out src-clip src-trk-mask src-in      src-out

  • clip—is the name of the vclip to which you add a segment

  • src-op—specifies how the segment in the vclip is operated on. See “src-op Options” for more information.

  • dest-op—specifies whether the segment added to the vclip is inserted (FINS) into the vclip or overwrites (FOVR) segments already in the vclip. Valid values are FINS and FOVR.

  • trk-mask—must be an asterisk (*).

  • in—is the in point in the vclip where the segment is to be added. If this information is absent, the new segment is appended to the end of the vclip.

  • out—is the out point in the vclip where the added segment ends.

  • src-clip—is the name of the clip the segment is coming from.

  • src-trk-mask—must be an asterisk (*).

  • src-in—is the in point in the clip where the segment is coming from. If this argument is unspecified, src-in is set to the in point of the source clip.

  • src-out—is the out point in the clip where the segment is coming from. If this argument is unspecified, src-out is calculated from:

    • the src-in plus in/out duration, if the in/out duration is specified

    • the out point of the source clip, if the in/out duration is not specified

Figure 7-2 illustrates some of these arguments.

Figure 7-2. CUPS Arguments

Figure 7-2 CUPS Arguments

The interval between src-in and src-out must equal the interval between in and out, otherwise an error is returned. If you supply only one of these intervals, CUPS automatically makes the other interval equal to it.

Using the CUPS command repeatedly enables you to populate your virtual clip with segments.

src-op Options

The src-op options specify:

  • Whether the segment data (the in points and out points, for example) are copied into the vclip or simply pointed at by the vclip.

  • Whether or not the segment referenced in the source clip is erased.

The valid values for src-op are:

  • FCP—copy the segment data (the in and out points, for example) from the source clip to the target vclip, as shown in Figure 7-3.

    The source clip must be segmented. If the source clip changes, the target vclip is unaffected, which is not the case with the FLN option.

  • FLN—link the segment data in the source clip to the vclip, as shown in Figure 7-3.

    Unlike the FCP option, the source clip does not have to be segmented and if the source clip changes, its changes affect the target vclip.

  • FRM—copy one or more segments in the source clip to the target vclip and then remove the copied segments from the source clip.

    The source clip must be segmented.

  • FCL—copy one or more segments in the source clip to the target vclip and then clear the copied segments from the source clip.

    The source clip must be segmented. Clearing the segments, in effect, makes them black in the source clip.

When a segment from a source clip is removed (FRM), the segments before and after the copied segment are joined. When a segment is cleared (FCL), the segment remains in the source clip but it is made black, as shown in Figure 7-4.

Figure 7-3. Copying vs. Linking; Where Segment Data is Stored

Figure 7-3 Copying vs. Linking; Where Segment Data is Stored

Listing Segments in a Vclip

To display pertinent information about the segments in a vclip, use the CSLS command:

CSLS [ clip [ track-mask [ in [ out ]]]]

  • clip—is the name of the clip you are interested in.

    If clip is not specified, the most recently opened or created clip is used.

  • track-mask—must be an asterisk (*).

  • in—displays information about segments beginning after this (timecode) point in the vclip.

    If in is not specified, the information displayed begins with the first segment in the vclip.

  • out—displays information about segments before this (timecode) point in the vclip.

    If out is not specified, the information displayed ends with the last segment in the vclip.

Use the in and out arguments to display information about segments in a subsection of the vclip.

Output

For each segment in a vclip, CSLS displays a line of information of the form:

trk in out clip src-trk src-clip src-in src-out

  • trk—is always an asterisk (*)

  • in—the in point of the segment in the vclip

  • out—the out point of the segment in the vclip

  • clip—the system-dependent name of a clip created automatically in the system used for reference counting. (This argument should be ignored.)

  • src-trk—is always an asterisk (*)

  • src-clip—the name of the clip in the clip cache where the segment comes from

  • src-in—the in point of the segment in the source clip

  • src-out—the out point of the segment in the source clip

Clearing and Removing Segments in Vclips

To clear or remove segments in a virtual clip, use the following MVCP commands, respectively:

CSCL clip track-mask timecode
CSRM clip track-mask timecode

  • clip—is the name of the clip containing the segment to be cleared or removed.

    If clip is not specified, the most recently created or opened clip is used.

  • track-mask—must be an asterisk (*)

  • timecode—is the timecode of the first frame of the segment you want cleared or removed

When a segment is cleared (CSCL), it remains in the specified clip but its video is made black and its audio is removed. When a segment from a specified clip is removed (CSRM), the segments before and after the specified segment appear contiguous, as shown in Figure 7-4.

Figure 7-4. Clearing vs. Removing Segments

Figure 7-4 Clearing vs. Removing Segments

Working with Frames

Instead of adding or removing segments, you can use MVCP commands to add or remove frames in a vclip.

Inserting Empty Frames Into a Vclip

The CFNW command, defined as follows, inserts empty (black and silent) frames into a clip:

CFNW clip track-mask in out

  • clip—is the name of the vclip into which you want to add one or more empty frames

  • track-mask—must be an asterisk (*)

  • in—is the in point in timecode in the vclip where the empty frames are to be inserted

  • out—is the out point in timecode in the vclip where the inserted empty frames end

To use CFNW, the specified clip must have previously been opened or created using COPN or CMK, respectively, during the current MVCP session.

Clearing and Removing Frames in a Vclip

To clear or remove frames in a virtual clip, use the following MVCP commands, respectively:

CFCL clip track-mask in out
CFRM clip track-mask in out

  • clip—is the name of the vclip from which you want to remove frames

  • track-mask—must be an asterisk (*).

  • in—is the in point in timecode in the vclip where the deletion is to start.

  • out—is the out point in timecode in the vclip where the deletion ends.

When frames are cleared (CFCL), the frames remain in the specified clip but they are emptied (made black and silent). When the frames from a specified clip are removed (CFRM), the frames before and after the specified frames appear contiguous.

These commands are similar to FNW, FCLR, and FRM except CRCL, CFRM do not deal with units.

See Figure 7-4 for an illustration of clearing and removing.