[Ffmpeg-devel] incorrect NTSC frame rate detection in .MOV file parser
Dan Maas
dmaas
Wed Feb 1 01:28:05 CET 2006
ffmpeg's .MOV file parser does not detect the correct frame rate in
NTSC DV Quicktime files output from Final Cut Pro.
If I decode a raw NTSC DV file, the frame rate is correctly set to
29.97fps (30000/1001):
Input #0, dv, from '/home/dmaas/cvs/nodes4/tests/dv/zzz.dv':
Duration: 00:00:00.3, start: 0.000000, bitrate: 28771 kb/s
Stream #0.0, 1001/30000, 29.97 fps(r): Video: dvvideo, yuv411p, 720x480, 1001/30000, 25000 kb/s
But if I decode an NTSC DV Quicktime file, the frame rate appears to be 2997/1!
Seems that stream 0 comes from film source: 2997.00 (2997/1) -> 30.00 (30/1)
Input #0, mov,mp4,m4a,3gp,3g2, from '/home/dmaas/cvs/nodes4/tests/dv/zzz-apple-dv25.mov':
Duration: 00:00:00.3, start: 0.000000, bitrate: 28802 kb/s
Stream #0.0(eng), 1/2997, 30.00 fps(r): Video: dvvideo, yuv411p, 720x480, 1/2997
^^^^ ^^^^
It looks like ffmpeg's .MOV parser sets the video stream frame rate
solely based on the time scale, which doesn't work for FCP's .MOV
files. Instead it must divide the time scale by the duration of one
video sample (as found in the 'stts' atom).
When outputting NTSC video to Quicktime, Final Cut sets the time scale
to 2997 and the duration of each video sample to 100.
(to be 100% correct the time scale should be 30000 and the video
sample duration should be 1001, but I'm just telling you how FCP does
it)
A similar error occurs for 24000/1001 fps material (NTSC film), where
FCP sets the time scale to 23976 and the sample duration to 1000.
I am not 100% sure how to fix this in the code. Please help!
Regards,
Dan
More information about the ffmpeg-devel
mailing list