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

Limin Wang lance.lmwang
Mon Sep 10 08:17:26 CEST 2007


> 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:

demux_mpg: 24000/1001 fps progressive NTSC content detected, switching

After try to force the fps to 24000/1001, ffmpeg report drop 14 frame,
no dup frame at beginning.

> > 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:

lmwang at test1-desktop:~/dev/ffmpeg$ ./ffmpeg -i
FFmpeg version SVN-r10465, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-libx264 --enable-gpl
  libavutil version: 49.5.0
  libavcodec version: 51.43.0
  libavformat version: 51.12.2
  built on Sep 10 2007 06:02:54, gcc: 4.1.3 20070718 (prerelease) (Debian

Seems stream 0 codec frame rate differs from container frame rate: 29.97
(30000/1001) -> 59.94 (60000/1001)
Input #0, mpeg, from '/mnt/dvd_source/dvd_7/VIDEO_TS/VTS_01_1.VOB':
  Duration: 00:15:18.0, start: 0.280633, bitrate: 9354 kb/s
  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 9800 kb/s, 59.94
  Stream #0.1[0x88]: Audio: dca, 48000 Hz, 5:1, 768 kb/s
  Stream #0.2[0x81]: Audio: ac3, 48000 Hz, 5:1, 448 kb/s
  Stream #0.3[0x82]: Audio: ac3, 48000 Hz, stereo, 192 kb/s
Must supply at least one output file

If needed, I can cut a segment to upload?

> > 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.

> 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?


More information about the ffmpeg-devel mailing list