[MEncoder-users] Audio issues with mencoder and lavc

Heiko Baums lists at baums-on-web.de
Mon Nov 14 17:38:10 CET 2011


Hi,

I'm trying to capture a VHS tape to raw video and audio with mencoder.

With this command video and audio are in sync:
mencoder tv:// -tv
driver=v4l2:normid=3:input=1:width=768:height=576:amode=1:audiorate=48000
-ovc raw -oac pcm -o movie.avi

But it seems that avidemux can't handle the resulting RAWUYVY video. At
least it doesn't just copy the codecs when saving the video after
cutting it but re-encodes it to a video file which can't be played
correctly by mplayer and other video players like VLC and xine. I guess
this is an avidemux issue.

So I tried to capture the video to HuffYUV with lavc with this command:
mencoder tv:// -tv
driver=v4l2:normid=3:input=1:fps=25:amode=1:width=768:height=576:audiorate=48000
-oac lavc -ovc lavc -srate 48000 -af-adv
force=1:list=lavcresample=48000 -lavcopts
vcodec=huffyuv:format=422p:acodec=pcm_s16le -o movie.avi

But with this command either the audio is out of sync or the audio is
in sync for the first 5 seconds and then disappears completely. I tried
varying the audio settings of this command but without success.

Even this command doesn't help:
mencoder tv:// -tv
driver=v4l2:normid=3:input=1:fps=25:amode=1:width=768:height=576:audiorate=48000
-oac pcm -ovc lavc -srate 48000 -lavcopts vcodec=huffyuv:format=422p -o
movie.avi

It also doesn't matter if I use ALSA or OSS for the audio capturing or
if I use other audio codecs like ac3 or mp2.

So the problem must be in the lavc video encoder.

Is it a bug or am I doing anything wrong? And how can I fix this issue?

Heiko


More information about the MEncoder-users mailing list