[MPlayer-dev-eng] How to calculate pts with pulldown/telecine ?

Nico Sabbi nsabbi at tiscali.it
Sat Nov 27 23:23:43 CET 2004


Arpi wrote:

>Hi,
>
>  
>
>>At the moment for every frame "n" I store the fps reported by mencoder 
>>(in this case
>>either 23.976 or 29.97) and in the demuxer I set the pts of frame "n+1" as
>>
>>duration(n) = 1/fps(n)
>>pts(n+1) = pts(n)+duration(n)
>>
>>but in this case I see that audio and video get quickly out of sync.
>>    
>>
>
>wrong.
>set fps in mpeg headers to 29.97, and when mencoder reports 24fps input
>then set the repeat-first-field flag of every second frame too.
>
>anyway its all big hack, the automatic fps overriding should be disabled
>when coding to mpeg.
>
>
>A'rpi / MPlayer, Astral & ESP-team
>  
>

so if in the sequence header I have fps=29.97  and if
mp_header_process_extension(&picture, ...) stores in picture.display_time n
I should set the duration of all the frames until a new picture coding 
extension
to (1 / fps) * (n/100) ?

Thanks,
    Nico




More information about the MPlayer-dev-eng mailing list