[MEncoder-users] No audio in captured files

Moritz Barsnick barsnick at gmx.net
Sun Nov 4 15:10:47 CET 2007


Hi Adrian,

On Sat, Nov 03, 2007 at 21:44:33 +0000, Adrian wrote:

> Using tvtime to run the capture card, there's output from the sound card
> and I can record sound using SoundRecorder. This seems to eliminate alsa
> mixer settings, the unmute problem etc.  The problem is specifically
> with mencoder audio capture apparently.

That's typically a problem. ;-) You say you have audio tracks, but
they're mute?

> I've tried mencoder with many config options, here's a typical
> mencoder.conf:
> # Make MEncoder output to a default filename.
> o=encoded.avi
> oac=pcm=yes
> ovc=lavc=yes
> lavcopts=vcodec=mjpeg
> tv=driver=v4l2:input=0:mjpeg=1:decimation=1:device=/dev/video0:audiorate=48000:amode=1:forceaudio=yes:forcechan=2:volume=100:adevice=/dev/dsp2

I'm not even sure you're using alsa if you don't state the "alsa"
option to "tv". /dev/dsp? is just a workaround with alsa, IMHO.

> complain if it couldn't decode the audio.

Are you sure you're hearing mplayer decode the PCM audio, and not a
hard loop via the mixer to your speakers? Those are two different
paths.

> ==========================================================================
> Opening audio decoder: [pcm] Uncompressed PCM audio decoder
> AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
> Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
> ==========================================================================

Okay, so at least it's hooked up. ;-)

Here's what I do in a script:

CARD="0" # main ICH audio device for input
OUTFILE="$1"
SOURCE="$2"

amixer -c ${CARD} set Capture cap
amixer -c ${CARD} set Capture 8%
amixer -c ${CARD} set Capture unmute
amixer -c ${CARD} set Line cap
amixer -c ${CARD} set Line 30%
amixer -c ${CARD} set Line unmute

mencoder tv:// -tv \
driver=v4l2:device=/dev/video1:input=${SOURCE}:\
fps=25:norm=PAL:buffersize=256:width=720:height=576:\
alsa:audiorate=48000:amode=1:forcechan=2:adevice=hw.${CARD},0,0 \
[...]

Perhaps that helps. Look out for the mixer settings, especially unmute:
Capture is for capture, Line is for listening along. And see the adevice
setting.

Hope this helps, since I went through the same pain. :)

Regards,
Moritz


> 
> There are several reports of similar problems. These probably have
> several different causes. Few definite answers are around, and I'm not
> sure this problem is the same as (any) others. Although I don't know a
> lot about mencoder or Linux diagnostic tools, I hope I've eliminated a
> few possibilities.
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mencoder-users



More information about the MEncoder-users mailing list