Timecode
media is used to store time code data in QuickTime movies. It has
a media type of 'tmcd'.
Timecode Sample Description
Timecode Media Information Atom
The timecode sample description contains information that defines how to interpret time code media data. This sample description is based on the standard sample description header, as described in “Sample Description Atoms.”
The data format field in the sample description is always
set to 'tmcd'.
The timecode media handler also adds some of its own fields to the sample description.
A 32-bit integer that is reserved for future use. Set this field to 0.
A 32-bit integer containing flags that identify some timecode characteristics. The following flags are defined.
Drop frame
Indicates whether the timecode is drop frame. Set it to 1 if the timecode is drop frame. This flag’s value is 0x0001.
24 hour max
Indicates whether the timecode wraps after 24 hours. Set it to 1 if the timecode wraps. This flag’s value is 0x0002.
Negative times OK
Indicates whether negative time values are allowed. Set it to 1 if the timecode supports negative values. This flag’s value is 0x0004.
Counter
Indicates whether the time value corresponds to a tape counter value. Set it to 1 if the timecode values are tape counter values. This flag’s value is 0x0008.
A 32-bit integer that specifies the time scale for interpreting the frame duration field.
A 32-bit integer that indicates how long each frame lasts in real time.
An 8-bit integer that contains the number of frames per second for the timecode format. If the time is a counter, this is the number of frames for each counter tick.
A 24-bit quantity that must be set to 0.
A user data atom containing information about the source
tape. The only currently used user data list entry is the 'name' type.
This entry contains a text item specifying the name of the source
tape.
The timecode media also requires a media information atom.
This atom contains information governing how the timecode text is
displayed. This media information atom is stored in a base media
information atom (see “Base Media Information Atoms” for
more information). The type of the timecode media information atom
is 'tcmi'.
The timecode media information atom contains the following fields:
A 32-bit integer that specifies the number of bytes in this time code media information atom.
A 32-bit integer that identifies the atom type; this
field must be set to 'tcmi'.
A 1-byte specification of the version of this timecode media information atom.
A 3-byte space for timecode media information flags. Set this field to 0.
A 16-bit integer that indicates the font to use. Set this field to 0 to use the system font. If the font name field contains a valid name, ignore this field.
A 16-bit integer that indicates the font’s style. Set this field to 0 for normal text. You can enable other style options by using one or more of the following bit masks:
0x0001 Bold
0x0002 Italic
0x0004 Underline
0x0008 Outline
0x0010 Shadow
0x0020 Condense
0x0040 Extend
A 16-bit integer that specifies the point size of the time code text.
A 48-bit RGB color value for the timecode text.
A 48-bit RGB background color for the timecode text.
A Pascal string specifying the name of the timecode text’s font.
There are two different sample data formats used by timecode media.
If the Counter flag is set to 1 in the timecode sample description, the sample data is a counter value. Each sample contains a 32-bit integer counter value.
If the Counter flag is set to 0 in the timecode sample description, the sample data format is a timecode record, as follows.
An 8-bit unsigned integer that indicates the starting number of hours.
A 1-bit value indicating the time’s sign. If bit is set to 1, the timecode record value is negative.
A 7-bit integer that contains the starting number of minutes.
An 8-bit unsigned integer indicating the starting number of seconds.
An 8-bit unsigned integer that specifies the starting number of frames. This field’s value cannot exceed the value of the number of frames field in the timecode sample description.
Last updated: 2007-09-04