Documente Academic
Documente Profesional
Documente Cultură
Copyright 1996-03-17a
Charles Poynton
This note outlines timecode, as used in video, film, audio recording, editing, and sequencing
equipment. For further information, see Chapter 21, Timecode, in my book A Technical
Introduction to Digital Video.
Introduction
Timecode systems assign a number to each frame of video analogously to the way that film is
manufactured with edge numbers to allow each frame to be uniquely identified. Time data is
coded in binary coded decimal (BCD) digits in the form HH:MM:SS:FF, in the range 00:00:00:00
to 23:59:59:29 for 30 Hz frame rate systems. There are timecode variants for systems having
24, 25, 29.97, and 30 frames per second.
In addition to the 32 bits required for eight-digit time data, timecode systems accommodate an
additional 32 user bits per frame. User bits may convey one of several types of information: a
second timecode stream, such as a timecode from an original recording; a stream of ASCII/ISO
characters; motion picture production data, as specified in SMPTE RP 135; auxiliary BCD
numerical information, such as tape reel number; or nonstandard information. A group of
4 user bits is referred to as a binary group. The information portion of timecode thus totals
64 bits per frame.
A number of synchronization bits are appended to the 64 information bits of timecode in order
to convey timecode through a channel. Sixteen synchronization bits are appended to form 80bit longitudinal timecode (LTC). Eighteen sync bits and 8 CRC bits are appended to form 90-bit
vertical interval timecode (VITC) that can be inserted into a video signal.
The BCD coding of time data has two implications. First, since no BCD digit can contain all
ones, the all-ones code is available for other purposes. Second, the high-order bits of certain
timecode digits are available for use as flags. These flag bits are described later.
The color frame flag is asserted when the least significant bit of the timecode frame number is
intentionally locked to the color frame sequence of the associated video, that is, locked to
Frame A and Frame B of SMPTE 170M.
Dropframe timecode
In 25 Hz video, such as in 625/50 video systems, and in 24 Hz film, there is an exact integer
number of frames in each second. In these systems, timecode has an exact correspondence
with clock time. In 525/59.94 systems, there is not an integer number of frames per second.
The remainder of this section deals with the dropframe mechanism that is used to compensate
timecode to obtain a reasonable approximation of clock time. Dropframes are not required or
permitted when operating at 24, 25, or 30 frames per second.
During the transition from monochrome to color television, certain interference constraints
needed to be satisfied among the horizontal, sound, and color frequencies. These constraints
were resolved by reducing the 60.00 Hz field rate of monochrome television by a factor of
exactly 1000/1001 to create the color NTSC field rate of about 59.94 Hz. This led to the dropframe
timecode that is familiar to anyone that has been involved in videotape editing.
Counting frames at the NTSC frame rate of 29.97 Hz is slower than real time by the factor
1000
/1001, which, if left uncorrected, would result in an apparent cumulative error of about
+3.6 seconds in an hour. To avoid this error, timecode systems are designed so that on
average once every 1000 frames a frame number is dropped, that is, omitted from the
counting sequence. Of course, it is only the timecode number that is dropped, not the whole
frame!
Frame numbers must be dropped in pairs in order to maintain the relationship of timecode
(even or odd frame number) to video color frame (A or B).
Dropping a pair of frames every 66 2/3 seconds - that is, at an interval of one minute, six
seconds, and twenty frames - produces the sequence in the table to the left. Although this
sequence is not easily recognizable, it repeats after exactly ten minutes! This is a consequence
of the ratios of the numbers: Two frames in 2000 accumulates 18 frames in 18 000, and there
are 18 000 frames in 10 minutes (30 frames, times 60 seconds, times 10 minutes). To produce
an easy-to-compute, easy-to-remember sequence of dropframe numbers, the key rule of
dropframe timecode was devised:
case one line suffers a tape dropout. Lines 16 and 18 (279 and 281) are preferred. VITC
identifies each field of video; a field mark bit is asserted for the even field (field 2).
Each VITC line conveys 90 bits as 9 serialized bytes, each preceded by a 2-bit sync code (one,
zero). The first 8 bytes contain the timecode information bits in LTC order.
The ninth byte contains a cyclic redundancy check (CRC) code that may be used for error
detection (and possibly correction). CRC is computed as G(x) = x8 + 1 across the 64
information bits and the 18 VITC sync bits. The CRC can be generated by an 8-bit shift register
and an exclusive-or (XOR) gate. A CRC can be independently computed by the receiver from
the information and sync bits; if the computed CRC does not match the transmitted CRC, then
an error is known to have occurred.
The bit rate of VITC for 525/59.94 systems is one-half of the NTSC color subcarrier frequency,
that is, one-half of 315/88 MHz. A zero bit is at blanking level (0 IRE), and a one bit is at 80 IRE.
The 0-to-1 transition of the first (start) bit is delayed 10.5 s from the 50-percent point of the
line sync datum (0H). A decoder must use the sync bit transition at the start of the line to
establish a decoder phase reference; it may or may not use the other sync transitions.
Editing
Timecode is fundamental to videotape editing. An edit is denoted by its in point (the timecode
of the first frame to be recorded) and its out point (the timecode of the first frame beyond the
recording). An edited tape can be described by the list of edits used to produce it. Each entry
in such an edit decision list (EDL) contains the in and out points of the edited tape, and the in
and out points of the source tape, along with tape reel number and/or other source and
transition identification.
An edited tape is invariably recorded with continuous "nonbroken" timecode. Nearly all editing
equipment treats the boundary between 23:59:59:29 and 00:00:00:00 as a timecode
discontinuity; consequently, it is conventional to start the main program segment on tape with
the code 01:00:00:00. If the tape includes the usual 1.5 minutes of bars and tone leader, then
the tape will start near timecode 00:58:30:00.
7
0
5
4
1st binary group
16
24
32
40
48
56
Color
Drop
frame
frame flag
flag
Parity/
Field
mark
Binary
group
flag B
Binary
Unassigne
group
d
flag A
1
0
Frames units 0-9
VITC
sync
0 1
In vertical interval code, the VITC sync and information bits are followed by 2 VITC sync bits,
then 8 cyclic redundancy check (CRC) bits computed across the preceding 82 bits:
VITC
7
6
5
4
3
2
1
0
sync
CRC
G(x)=x8+1
0 1
In LTC the 64 information
7
sync A
1
sync B
1
1
0
1
0
0
1
This material is excerpted from Chapter 21, Timecode, of my book A Technical Introduction to
Digital Video, copyright John Wiley & Sons, 1996. I encourage you to read this note online, but
please do not reproduce it: reproduction of this note is prohibited according to the terms of my
agreement with the publisher.
Charles - Video engineering - Timecode
1997-07-13