[MEncoder-users] No audio in captured files

Adrian adrian at aeolian.org.uk
Sat Nov 3 22:44:33 CET 2007


I'm failing to capture audio along with video using mencoder. Video
records fine, audio component is present in the output file (Totem
player's sidebar lists the details) but is silent.

The capture card's (WinFast PVR, Bt878) audio-out socket outputs audio
when running, either under mencoder or tvtime.

I'm patching the WinFast audio output to a soundcard line-in.  The sound
card is a standard Intel Corporation 82801, also tried SB Live.

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.

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

/dev/dsp2 is the Intel sound card that works OK with SoundRecorder.
Is the choice of audio codec important? Presumably the player would
complain if it couldn't decode the audio.

I've tried with mpg and avi as output format, and mp3lame and plain PCM
as audio codecs.

Here's the output:
$ mencoder tv://
MEncoder 2:1.0~rc1-0ubuntu9.1 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Celeron(R) CPU 2.60GHz (Family: 15, Model: 2, Stepping: 9)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 9  data: 0x0 - 0x0
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski at zpr.uni-koeln.de>
 comment: first try, more to come ;-)
Selected device: BT878 video (Leadtek WinFast 20
 Tuner cap:
 Tuner rxs: LANG1 LANG2
 Capabilites:  video capture  video overlay  VBI capture device  tuner 
read/write  streaming
 supported norms: 0 = PAL; 1 = NTSC; 2 = SECAM; 3 = PAL-Nc; 4 = PAL-M; 5
= PAL-N; 6 = NTSC-JP; 7 = PAL-60;
 inputs: 0 = Television; 1 = Composite1; 2 = S-Video; 3 = Composite3;
 Current input: 0
 Current format: YUYV
v4l2: current audio mode is : STEREO
  MJP: width 704 height 576
Audio block size too low, setting to 16384!
[V] filefmt:9  fourcc:0x32315659  size:704x576  fps:25.00  ftime:=0.0400
==========================================================================
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)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 704 x 576 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (704x576 fourcc=47504a4d [MJPG])
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
==========================================================================
MP3 audio selected.
Forcing audio preload to 0, max pts correction to 0.
Writing header...1f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Pos:  10.1s    252f ( 0%) 24.46fps Trem:   0min   0mb  A-V:0.000
[15184:167]
Flushing video frames
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.

Video stream: 15184.197 kbit/s  (1898024 B/s)  size: 19132088 bytes 
10.080 secs  252 frames

Audio stream:  167.026 kbit/s  (20878 B/s)  size: 209952 bytes  10.056
secs
v4l2: 256 frames successfully processed, 0 frames dropped.
[end]

The player I'm using is Totem. This plays sound fine from other mpgs.

Running under Ubuntu Feisty, kernel version is 2.6.20-16-generic

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.



More information about the MEncoder-users mailing list