[MEncoder-users] Wonky audio interleaving from mencoder?
Ian Collier
Ian.Collier at comlab.ox.ac.uk
Fri Aug 8 16:47:39 CEST 2008
Apologies if this is a silly question or I'm doing something wrong here.
I'm working on Fedora Core 7 with the Livna package of mencoder whose
version number according to Livna is "1.0-0.84.rc2.lvn7".
I have a small test clip taken straight out of a digital camera (can be
found at http://pics.livejournal.com/imc/pic/000b0bsb.avi - it's about
2.5M). It's a 15fps AVI with video codec MJPEG at about 922kbit/s and
PCM audio at about 88kbit/s. I would like to compress this and flip it
clockwise. So I do this:
$ mencoder -o test.avi -oac lavc -ovc lavc -vf rotate=1 -srate 44100 \
-lavcopts acodec=mp2:abitrate=48:vcodec=msmpeg4:vbitrate=96:vhq MVI_0757.AVI
However, when I now play the result with mplayer, (a) the video seems
to play about 10% fast and ends a second or so before the audio, and
(b) the time counter displayed on the text console goes haywire. This
is what it says at the end of the video:
A:2910.7 V: 20.3 A-V:2890.443 ct: 2.033 305/305 0% 0% 1.4% 0 0
Moreover, when I play this with vlc, I don't get any sound at all.
I can now say:
$ ffmpeg -i test.avi -vcodec copy -acodec copy test2.avi
which makes it play perfectly in mplayer, but sadly vlc still can't play
the sound (although it seems to believe the audio track is 53 minutes
long).
If on the other hand I do this:
$ mencoder -o test.avi -oac pcm -ovc lavc -vf rotate=1 \
-lavcopts vcodec=msmpeg4:vbitrate=96:vhq MVI_0757.AVI
this generates something that both mplayer and vlc can play properly
but where the audio bitrate is more than the video bitrate.
I could then compress the audio with:
$ ffmpeg -i test.avi -vcodec copy -acodec mp2 -ar 44100 -ab 48k test2.avi
and this gives me something close to what I wanted in the first place,
which both mplayer and vlc can play. (In fact, doing this to the
damaged avi output from the first mencoder run will fix it too.)
But the question is: why didn't mencoder produce a properly playable
file in the first place?
imc
More information about the MEncoder-users
mailing list