[Ffmpeg-devel] [PATCH] fix frame duration computation in find_stream_infos

Baptiste Coudurier baptiste.coudurier
Fri Mar 9 21:51:44 CET 2007


Hi

Michael Niedermayer wrote:
> Hi
> 
> On Fri, Mar 09, 2007 at 05:42:48PM +0100, Baptiste Coudurier wrote:
>> Hi
>>
>> $subj.
>>
>> I guess there is a typo here. Is it correct ?
>> last_dts should be updated when duration is present.
> 
> no its no typo, this improves accuracy IIRC
> 

ok, I misunderstood the code then.

wrong_frame_rate.mp4 in incoming:
Stream #0.0(eng): Video: mpeg4, yuv420p, 352x288, 49.67 fps(r)

should be 16.38 (quicktime),

uncommented:
-//     if(st->codec->codec_type == CODEC_TYPE_VIDEO)
-//        av_log(NULL, AV_LOG_ERROR, "%f\n", dur);

duration_count: 20

0.060000
0.060000
0.121000
0.181000
0.241000
0.302000
0.362000
0.423000
0.483000
0.543000
0.604000
0.664000
0.724000
0.785000
0.845000
0.906000
0.966000
1.026000
1.087000
1.147000

-//     if(st->codec->codec_type == CODEC_TYPE_VIDEO)
-//        av_log(NULL, AV_LOG_ERROR, "%f %f\n", get_std_framerate(j) /
12.0/1001, error);

16.500000 24.958934
16.583333 2.362325
16.666667 62.662600

...

49.500000 74.876802
49.583333 24.415694
49.666667 1.865837
49.750000 7.086974
49.833333 39.939786

some infos:
timescale 1000
stts:
       count 2 duration 60
       count 1 duration 61
       count 2 duration 60
       count 1 duration 61
       count 1 duration 60
       count 1 duration 61
       count 2 duration 60

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list