[FFmpeg-devel] [RFC][PATCH] ticks_per_frame / timebase

Michael Niedermayer michaelni
Fri Feb 27 20:07:39 CET 2009


On Fri, Feb 27, 2009 at 06:47:42PM +0100, Ivan Schreter wrote:
> Ivan Schreter wrote:
>> Michael Niedermayer wrote:
>>   
>>> On Fri, Feb 27, 2009 at 09:54:36AM +0100, Ivan Schreter wrote:
>>>       
>>>> Michael Niedermayer wrote:             
>>>>> good, ive applied it, if you find more regressions please tell me
>>>>>
>>>>>                 
>>>> TS works without problem.
>>>>
>>>> However, there is a regression with MOV. I tried to decode trailer for 
>>>> movie "9", which is H.264 progressive 23.98 fps, but it detects it as 
>>>> 11.99 fps:
>>>>           
>>> that happens because of local changes in your tree, i suspect the hunk
>>> to the r_frame_rate code i rejected
>>>
>>>       
>> I looked at the changes before reporting it. But you are right, there was 
>> one hunk where I removed H264 from tb_unreliable. This was the reason.
>>
>> OTOH, when reverting this hunk, interlaced field-picture H.264 stream is 
>> detected at 2*fps... I'll check it later, but I don't think it's because 
>> of my local changes (only seeking changes are there).
>>
>>   
> So, now I looked at it. The problem is, the information repeat_pict and 
> ticks_per_frame is not enough to determine frame duration for tb_unreliable 
> H.264 stream.
>
> So we have following values for these MPEG-TS H.264 streams:
>
> Progressive: ticks_per_frame == 2, repeat_pict == 1, dts deltas == frame 
> duration.
> Interlaced, field-pictures: ticks_per_frame == 2, repeat_pict == 0, dts 
> deltas == 1/2 frame duration.
> Interlaced, top-bottom pictures: ticks_per_frame == 2, repeat_pict == 1, 
> dts deltas == frame duration.
>
> All of these use timebase 2*fps.
>
> However, for H.264 MOV stream (progressive) we have timebase == fps!

nope, thats whats printed, but a av_log() in h264.c shows the timebase
is 2*fps for my sample

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090227/c147e159/attachment.pgp>



More information about the ffmpeg-devel mailing list