[Ffmpeg-devel] problems with av synchronization

Aaron Williams aaronw
Tue Oct 17 19:57:55 CEST 2006

I am trying to transcode a DVD VOB file into h.264 but am running into
problems where the audio seems to significantly lag the video, and the
lag seems to grow worse as the video progresses.

I am using the following command:

ffmpeg -i video.vob -f avi -y -croptop 32 -cropbottom 32 -vcodec h264
-acodec copy -b 1500k -bt 1000k -qmin 3 -qdiff 3 -bf 2 -croptop 60
-cropbottom 60 -b_qfactor 2 -pass 1 video.avi

Note that I have also tried with -async 1 but that made no difference.

I am just copying the original audio track, which is stereo AC3 at
192kbps.  The video is 720x480 NTSC at 29.97 fps.

Also of note that I got overflow errors if I did not specify -qmin 3.

This is with the latest SVN trunk version of ffmpeg compiled for an
Athlon64 on Linux.

I also had the same problem when I tried to use FFMPEG to merge a
separate aiff audio stream with the MPEG2 stream to create the vob.  I
converted the aiff file to AC3 and used mplex to merge the files into an
initial VOB file which had perfect synchronization and used FFMPEG to
convert the vob to a compliant DVD VOB file using the copy codecs for
audio and video, again without any problems with the synchronization.
The problem seems to occur only when transcoding.

The cropping does not affect the synchronization problem.

Any suggestions would be appreciated.  What little I could find on the
web regarding this did not seem to help.

-Aaron Williams

More information about the ffmpeg-devel mailing list