[MPlayer-users] audio sync -- the final step between me and happiness.

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Tue Jun 13 09:24:17 CEST 2006


On Tuesday, 13 June 2006 at 01:27, Noah Spurrier wrote:
> I know a lot has been said about audio sync, but I'm just not getting it. The
> audio seems to start off in sync, but slowly drifts. These are the exact
> steps
> I'm using to transcode a DVD VOB file to MPEG4/MP3 AVI.
> 
>     # Extract raw PCM audio (defaults to audiodump.wav)
>     mplayer SRC.VOB -vc null -vo null -aid 129 -ao pcm:fast -noframedrop
>     # Compress raw PCM audio to 96kbps MP3 (note CBR, not VBR, so this
> should be safer).
>     lame -h --athaa-sensitivity 1 --lowpass 16.0 --cbr -b 96 --resample 32
> audiodump.wav audiodump.mp3
>     # Transcode video pass 1
>     mencoder SRC.VOB -o videodump.avi -oac copy -ovc lavc -lavcopts
> vcodec=mpeg4:vbitrate=1200:mbd=2:vpass=1:keyint=12
>     # Transcode video pass 2
>     mencoder SRC.VOB -o videodump.avi -oac copy -ovc lavc -lavcopts
> vcodec=mpeg4:vbitrate=1200:mbd=2:vpass=2:keyint=12
>     # Mix video and audio together to final video container
>     mencoder -oac copy -ovc copy -o video_final.avi -audiofile
> audiodump.mp3 videodump.avi

Why not encode audio while encoding video? You should use -aid 129 in mencoder
command line, too.

> Note that I do no use -nosound in any step because the docs say that removing
> the audio prematurely can cause audio sync problems later on -- I leave the
> original audio in until the final mux step.

Yes they do, but in some cases it doesn't work right. Try with -nosound, please.

[...]
> I'm trying to create an automated system to compress DVD VOB files to MPEG4.
> I'm worked out all the quirks except for the audio sync. I'm so close that
> I can taste it... Argh!

I don't believe you should automate it. There are all sorts of source-dependent
settings to consider, like cropping, telecine, ofps and such. If you disregard
that, you'll get lower quality at best, completely messed up encode at worst.

Regards,
R.

-- 
MPlayer developer and RPMs maintainer: http://rpm.greysector.net/mplayer/
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan



More information about the MPlayer-users mailing list