Frame Numbering and Time Formats
All digital-video devices must support the frames time format. A frame is a complete image, typically intended for playback at 30 frames per second. Visual material originating on film will have a natural frame rate of 24 frames per second. PAL-originated material will have a frame rate of 25 frames per second.
With a time format of frames, there is a potential "off-by-one" ambiguity. This section provides guidelines for avoiding such ambiguities. To simplify the discussion, assume that seek exactly is enabled. The following guidelines define frame numbering:
- Frames are numbered from an arbitrary origin. (An application can determine the origin with status start position.)
- The initial state of the workspace with new contents is stopped, positioned at status start position. This occurs after an open or load operation, and when a monitor file is sent after recording is completed.
- A paused device instance returns the number of the frame currently in the frame buffer in response to status position.
- When the seek to and play to commands complete, the current position and image shown is specified in the to parameter. Some devices will be stopped, some devices will be paused.
- For the play to command, all frames up to and including the to position are shown but no audio associated with the to position is played. For example, the command play from 3 to 5 will show three frames of video but the duration of audio played is equivalent to two frames.
- A frame number one greater than the last frame in the file is a valid argument for cue output to, play to, or seek to. This frame is referred to as the "final valid frame". Values larger than this cause a range error. When the device reaches this position, it displays the same image associated with the last frame in the file. This final valid frame number equals status start position plus status length.
For example, if a file contains ten frames and the first is frame one, frames one through eleven are valid frames. Frame eleven shows the same image as frame ten.
- The default final position for a play command without a specified end position, or for a seek to end command, is the final valid frame.
- A command specifying a frame prior to the status start position causes a range error.
- On a stop command, the status position of a device instance does not change.
- When seek exactly is off, a play command without a from position will not necessarily start from the current position, because such a play has an implied initial seek, which might find an earlier key frame image.
- When seek exactly is off, and a file contains interframe encoded images, if a seek command specifies an interframe encoded image, the actual frame reached by the device will be an key frame image prior to the specified frame. The status position command will return the actual frame reached.