[Ffmpeg-devel] [PATCH] remove drop timecode flag

Trent Piepho xyzzy
Sun Apr 15 19:49:17 CEST 2007

On Sun, 15 Apr 2007, Michael Niedermayer wrote:
> On Sun, Apr 15, 2007 at 08:27:55AM -0700, Trent Piepho wrote:
> > On Sun, 15 Apr 2007, Michael Niedermayer wrote:
> > >
> > > attached patch removes the drop timecode encoding support
> > > reasoning is that iam not aware of any use (not even obscure) of this feature
> >
> > Isn't the timecode wrong if you don't use drop frame timecode for NTSC?
> >
> > e.g., the timecode after exactly 1 hour of NTSC video will be
> > '00:59:56:12', which is short 3 seconds and 18 frames from one hour.  With
> > drop frame timecode, the timecode after an hour would be '01:00:00:00',
> > since 108 timecodes would have been skipped over.
> timecodes are codec specific
> if a codec uses the rounded up fps as timebase then the timecode must be
> scaled accordingly and if needed the drop flag be set, its not the user
> applications job to do this

SMPTE timescodes are hour:minute:second:frame and should be unique for each
frame.  The frame wraps from 29 to 0.  E.g., after '0:0:0:29' follows

In non-dropframe timecode, the timecode is incremented by one after each
and every frame.  If you start at 0 and increment the counter 107892 times,
it will end up at '00:59:56:12'.  This is just simple counting.
'00:00:00:00' then '00:00:00:01', '00:00:00:02', and so on.

Think of the timecode as the frame number.  Not the frame PTS time, but
just the ordinal number of the frame.  Instead of writing it in base 10,
it's written in a weird base 30/base 60 numeric format.  It is convenient
for humans to look at, since we keep time in base 60.

107892 == 0x1a574 == 00:59:56:12, it's all the same, just an integer
written in different formats.

The problem is that a broadcast of 107892 frames will last one hour, not 59
minutes 56 seconds and 12 frames.  A broadcaster would like it if he could
cue his tape to end after an hour by using a timecode of '01:00:00:00' in
his automatic cueing equipment.

Drop frame timecode is used so that the display of the timecode will match
the actual time an NTSC broadcast will take.  When someone looks at the
display of their VTR and sees '00:05:00;00', they know that they are
exactly 5 minutes into the tape.  In non-dropframe timecode, a display of
'00:05:00:00' would be 5 minutes and 9 frames.

Drop frame time code is needed if an mpeg is going to be imported into an
editing system or used on broadcast equipment where drop frame time code is

Like say someone has 35mm film imported into their Avid and used drop frame
time code.  Now they want to import an MPEG of computer generated titles.
They will be in for a headache if they don't use drop frame timecode in
their MPEG.

More information about the ffmpeg-devel mailing list