[FFmpeg-devel] [PATCH] dvd vob input fps detect wrong

Michael Niedermayer michaelni
Mon Sep 10 19:16:10 CEST 2007


On Mon, Sep 10, 2007 at 02:17:26PM +0800, Limin Wang wrote:
> Hi,
> [snip]
> > 
> > as ive said the FRAME timebase is 60000/1001 go read the mpeg2 spec if
> > you dont belive it
> > 
> > 
> > >  If I force the fps to 30000/1001 manually and
> > > convert it h264, the result is OK also. 
> > 
> > no it is NOT, all timestamps will be wrong
> After more analysis and play with the dvd, it seems that its real fps is
> 24000/1001 and is progressive dvd. By mplayer, it will show below line:

look, the output you provided clearly says the base frame rate in the
mpegvideo header is 30000/1001 so it cannot have frames with timestamps
seperated by 1001/24000 as that is not a multiple of 1001/60000
the closest possibilities would be 1001/30000 and 1001/20000

so no the timestamps are not specified in a 1001/24000 timebase
that may be the average 1/fps but its not a timebase in which the
timestamps can be accurately represented

there is no field for avergage fps, you can add one if you like but
you cannot use a field which represents something else

what am i doing wrong that people just dont get it?
this almost belongs into the FAQ, something like

no real_frame_rate is NOT the average framerate and NO you cannot
set it to the average frame rate, and yes you are wasting your time
if you propose that on ffmpeg-dev


> > 
> > 
> > 
> > > Any comment to fix the issue?
> > 
> > what issue? you posted a broken patch not a bugreport
> The problem is after trancoded, the video is back and forth, I guess it's
> caused by many duplicated frame. Below is file info:

sorry i dont know what back and forth is supposed to mean 

> > 
> > > By my test, if I transcode 1000frame, the duplicate frame will
> > > 1000frame also.
> > 
> > use -vsync 1 and preferably dont use .avi
> the vsync default is enable, so ffmpeg will report duplicate frame. I'm try
> to use vob to ts.

i meant -vsync 0

> > 
> > and as ive said thousends of times already
> > r_frame_rate is NOT the average frame rate it is the largest framerate
> > with which all timestamps can accurately be represented
> > 
> > if you want a average_framerate send a patch which adds such a field
> > but dont hijack a field with a different definition
> > (and yes an avarage framerate might make sense for transcoding to AVI
> > but it is wrong for normal containers which have timestamps)
> Yes, the problem is the output codec frame rate will be set to the max
> framerate 60000/1001 also,
> I don't think it's proper to set its fps to 60000/1001?

then you should complain to the one who made the DVD

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- 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/20070910/62a13091/attachment.pgp>

More information about the ffmpeg-devel mailing list