Chapter 7. Managing Clips

Clips are segments of audio and video media. Managing clips involves adding and removing them from VCP-Recorder.

Managing clips is discussed in the following sections:


Note: For information about configuring the clip cache, see “Configuring the Clip Cache”.


VCP-Recorder Media Formats and Types

VCP-Recorder uses two different formats and two types of media.

Media Format

VCP-Recorder uses two different formats for storing digital media on its clip cache file system(s):

  • vframe format - for intraframe media such as JPEG.

  • stream format - for interframe media such as MPEG2.

vframe Format

The vframe (short for variable-size frame) format is specific to VCP-Recorder. The video and audio data for each frame is stored contiguously in the media file. A separate index file contains header information which describes the encoding parameters of the video and audio data, and a frame map which stores the offsets of the video and audio data for each frame within the media file.

The vframe format is used for recording and playback of intraframe media, including uncompressed video as well as Rice-coded and JPEG-compressed video.

The vtrvfutil command-line utility provides various analysis and update functions for the vframe format. See the vtrvfutil man page for further information.

Stream Format

The stream format consists of a media file, which is simply the native media bitstream, and an index file, which maps random access cueing points to the appropriate offset in the bitstream.

The stream format is used for playback of MPEG2 media.

Media Types

VCP-Recorder also accepts two types of media:

  • Intraframe

  • Interframe

Intraframe

In intraframe media, the video data for each frame is self-contained and does not depend on the data from neighboring frames. Examples of intraframe media include JPEG, Rice, and uncompressed video.

Interframe

In interframe media, the compression techniques used for some video frames may require data from neighboring frames in order to decompress the video frame.

Adding Clips

Adding clips is a two step process:

  1. Transfer the clip to the file system.

  2. Tell VCP-Recorder it is there.

Transferring Clips to File Systems

There are two types of files systems:

  • Non-real time.

  • Real time.

To guarantee real time I/O rates, you must use a real time file system.

Non-Real Time File Systems

Transferring files to a non-real time file system is as easy as using ftp, cp, or rcp.

Real Time File Systems

Only real time file systems guarantee real time I/O rates.

A real time file system is often defined as a subvolume in an XFS file system where media is stored. The location of the subvolume is often xls/xlv/. Data is read normally from a real-time file system, but the standard utilities, such as ftp and cp, can not be used to write the media data.

Clip Alignment

In single-disk systems, media files are aligned only with the file system's block size so that only one I/O operation is needed to access the data.

In multi-disk, RAID, striped systems, the media files must also be aligned with the stripes.

When VCP-Recorder is used to record media, it automatically places the media data in the correct, aligned locations on the disk.

When media data is transferred to VCP-Recorder it often must be aligned with the disk's blocks and stripes. Whether or not media data must be aligned on your disks depends on the media type of the media file:

  • Intraframe media data requires alignment.

  • Interframe media data does not require alignment.

The media data (video and audio for each frame) for an intraframe media clip must be aligned on natural file system and disk drive boundaries to enable efficient read and write access to the clip.

Degree of Alignment

Frame-oriented media data in an intraframe clip is aligned along two boundaries:

  • Minor alignment boundary

  • Major alignment boundary

A single element of a frame (a video field or audio chunk) never crosses a minor or major alignment boundary. VCP-Recorder will not do a read or write operation to the clip media file which crosses a major alignment boundary.

Minor Alignment

The minor alignment matches the greater of the file system block size, or the system memory page size. On O2, the minor alignment is usually 4KB, unless a larger file system block size was used to construct an XFS file system. On Origin, the minor alignment is usually 16KB, unless a larger file system block size was used.

Major Alignment

The major alignment matches the stripe size of the disk volume which holds the clip cache file system.

If the clip cache resides on a single disk, no major alignment is required.

If the clip cache resides on a single RAID subsystem, major alignment is required for efficient I/O access to the media data. Either make a real-time file system on the RAID and set the real-time extent size of the XFS file system to the desired I/O operation size, or add a configuration line to /usr/vtr/config/vtrfsinfo.conf.


Note: vtrfsinfo.conf is not created by VCP-Recorder so you first must create the file.

If the clip cache resides on a striped XLV volume, the major alignment matches the stripe size of the XLV volume.

Realigning a Clip

A vframe clip is automatically aligned if you use vtrvfutil to copy the clip, as follows:

% vtrvfutil OriginalClipName NewClipName

vtrufutil automatically stores the media files in /usr/vtr/clips/.

To copy a vframe clip from outside the clip cache, use the following syntax:

% vtrvfutil -i file=<media file>,index=<index file> - NewClipName

vtrufutil can also be used to realign a clip in-place, as follows:

% vtrvfutil -c realign ClipName

See the vtrufutil man page for a complete list of the options.

Notifying VCP-Recorder

After transferring the media files, you must notify VCP-Recorder of the file by adding the clip, as follows:

# vtrclip add clipName

clipName is the name of the clip file.

Removing Clips

There are two ways of removing clips from VCP-Recorder.

  • VCP-Recorder Clip Manager (mcclips)

  • Command line

For more information about using the VCP-Recorder Control panel to remove a clip, see the VCP-Recorder User's Guide.

Command Line Removal

You can completely remove a clip from VCP-Recorder using the following command:

# vtrclip rm clipName

clipName is the name of the clip file.

Exporting VCP-Recorder Clips

You can use the vtrvfutil command to add Quicktime formatting information to a clip using the following command:

# vtrvfutil -c makeqt clipName

clipName is the name of the clip file.

vtrvfutil makes the clip readable by SGI digital media tools, such as dminfo, dmconvert, and mediaplayer, or third-party tools that use the SGI Movie Library.