[FFmpeg-devel] [BUG] transcode DVD films have a/v sync issue

Limin Wang lance.lmwang
Tue Sep 11 13:19:25 CEST 2007


I'm try to transcode some dvd to ts(h264) by ffmpeg, if the dvd is DVD films,
the output will lose A/V sync and video can't play smoothly.

Below is simple command line to reproduce it:
lmwang at test1-desktop:~/dev/ffmpeg$ ./ffmpeg -i
/home/lmwang/bitstream/24fps.vob -b 1500kb -bf 3 -coder 1 -refs 4 -partitions
all -vcodec libx264 -ab 96kb -ar 48000 -ac 2 -acodec mp2

Below is console output provided by ffmpeg:
FFmpeg version SVN-r10476, 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.3
  built on Sep 11 2007 11:12:45, 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 '/home/lmwang/bitstream/24fps.vob':
  Duration: 00:00:33.2, start: 2115.209500, bitrate: 4567 kb/s
  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 9800 kb/s, 59.94
  Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5:1, 384 kb/s
  Stream #0.2[0x20]: Subtitle: dvdsub
File '/mnt/dvd_result/test_1500kb.ts' already exists. Overwrite ? [y/N] y
Output #0, mpegts, to '/mnt/dvd_result/test_1500kb.ts':
  Stream #0.0: Video: libx264, yuv420p, 720x480, q=2-31, 1500 kb/s, 59.94
  Stream #0.1: Audio: mp2, 48000 Hz, stereo, 96 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
[libx264 @ 0x84ada10]using SAR=32/27
[libx264 @ 0x84ada10]using cpu capabilities: MMX MMXEXT SSE SSE2
Press [q] to stop encoding

Below is one key word output by mplayer:
demux_mpg: 24000/1001fps progressive NTSC content detected, switching

I have uploaded the  the sample to the MPlayer FTP incoming:
24fps.vob and readme.txt

lftp upload.mplayerhq.hu:/MPlayer/incoming> put readme.txt
357 bytes transferred in 9 seconds (38b/s)
lftp upload.mplayerhq.hu:/MPlayer/incoming> put 24fps.vob
19000000 bytes transferred in 1139 seconds (16.3K/s)
lftp upload.mplayerhq.hu:/MPlayer/incoming> ls
lftp upload.mplayerhq.hu:/MPlayer/incoming>

Don't know why I can't list it after uploaded.


More information about the ffmpeg-devel mailing list