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

D Richard Felker III dalias at aerifal.cx
Mon Nov 22 06:53:10 CET 2004


On Sun, Nov 21, 2004 at 09:32:58PM +0100, 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.

it actually should be disabled always and replaced with a filter that
performs it, but that would require a new vf layer.. :)

rich




More information about the MPlayer-dev-eng mailing list