I have a few AVCHD (MPEG-2 Transport Stream with H.264 video)
recordings directly from a camera that I'm trying to read with ffmpeg.
ffmpeg reports the frame rate as 59.94 fps, when it actually seems to
be 29.97. Here is the output of ffmpeg showing the information on
the file:
Input #0, mpegts, from '20080602210756.m2ts':
Duration: 00:00:13.53, start: 0.458667, bitrate: 16211 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR
16:9], 59.94 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, stereo, s16, 256 kb/s
When I'm reading and decoding frames from this file
(av_read_frame/avcodec_decode_video), the timestamps returned
correspond to timing used if the frame rate was 29.97, e.g., 0, 3003,
6006, 9009, ...
I've taken a look at the repeat_pict to see if that's being set, it is
not. I did notice that ticks_per_frame is set to 2 though. Here's a
summary of how the structs are set:
AVFrame.repeat_pict = 0
AVCodecContext.ticks_per_frame = 2
AVCodecContext.time_base = { 1001, 60000 }
AVStream.time_base = { 1, 90000 }
AVStream.r_frame_rate = { 60000, 1001 }
Although r_frame_rate is set to 60000/1001, what can point me in the
right direction that the real frame rate is 30000/1001? And can this
be generalized to everything ffmpeg can handle? Should H.264's time
base, in this case, really be 2002/60000 then reduced to 1001/30000?
Sorry for cross posting, I've had read bad luck of having nothing on
libav-user being answered...
--
Brian Brice
http://heapify.org/
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user