[MPlayer-users] built-in toolame audio support examples?

Abu Zaher zaher14 at gmail.com
Fri Jun 16 05:11:15 CEST 2006

>     mplayer SRC.VOB -vc null -vo null -aid 129 -ao pcm:fast -noframedrop
>     # Compress raw PCM audio to 96kbps MP3
>     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 -aid 129 -oac copy -ovc lavc -lavcopts
> vcodec=mpeg4:vbitrate=1200:mbd=2:vpass=1:keyint=12 -vf harddup
>     # Transcode video pass 2
>     mencoder SRC.VOB -o videodump.avi -aid 129 -oac copy -ovc lavc -lavcopts
> vcodec=mpeg4:vbitrate=1200:mbd=2:vpass=2:keyint=12 -vf harddup
>     # Mix video and audio together to final video container
>     mencoder -oac copy -ovc copy -o video_final.avi -audiofile
> audiodump.mp3 videodump.avi

The problem arises from the separate encoding of audio and video, at
leat that's what i can tell from my personal experiance, i encounterd
the same problem while i was encoding the audio in ogg format

The fact is that when u only compress the video but copy the audio
encoded separately the encoder cannot sync them because of some
internal reason, this problem most happens with ntsc sources,

u can try the following:
#1st pass:
mencoder SRC.VOB -o videodump.avi -aid 129 -oac mp3lame -ovc lavc
-lavcopts  vcodec=mpeg4:vbitrate=1200:mbd=2:vpass=1:keyint=12 -vf
harddup -lameopts cbr:br=96:fast -af resample=32000

#second pass:
mencoder SRC.VOB -o videodump.avi -aid 129 -oac mp3lame -ovc lavc
-lavcopts  vcodec=mpeg4:vbitrate=1200:mbd=2:vpass=2:keyint=12 -vf
harddup -lameopts cbr:br=96 -af resample=32000

note that i have added fast option in the first pass, that will speed
up encoding, but if u want a very very fast first pass then use

-af resample 4000 -oac pcm
this will encode uncompressed pcm audio file, so no cpu wasted in
encoding, then in the second pass use the option i have provided

More information about the MPlayer-users mailing list