[Ffmpeg-devel] problems with av synchronization

Michael Niedermayer michaelni
Tue Oct 17 21:15:22 CEST 2006


Hi

On Tue, Oct 17, 2006 at 10:57:55AM -0700, Aaron Williams wrote:
> 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.

you can try to sync the video stream to the audio stream with -map ...
alternatively reencode the audio and specify -async <something_larger_then_1>

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list