[MEncoder-users] capturing TV audio via btaudio fails

Scott tttocscode at yahoo.com
Mon Oct 4 19:20:33 CEST 2004


Hello,

I cannot seem to get btaudio to capture any TV audio with my Hauppauge
bt878 card and would appreciate any help on this.

A quick background.  I have a machine set up to only record TV programs
and will not be used to play anything.  Therefore, I did NOT install a
sound card since I had read the mplayer/mencoder and v4l documentation
which stated that I should be able to use the bt878/btaudio method to
capture TV sound.  I have built the kernel (2.6.8.1) 3 different ways -
alsa/btaudio, oss/btaudio, and both alsa/btaudio oss/btaudio together -
but the failure to capture audio is always the same.  These 3 different
kernel builds had the sound system/btaudio built into the kernel and
not as modules.  Since the oss/btaudio has been around the longest and
most of the documentation refers to it, I have been using that kernel
to troubleshoot this issue.

The kernel (oss/btaudio) is recognizing the audio function of the bt878
as can be seen with dmesg:
btaudio: Bt878 (rev 2) at 00:0b.1, irq: 10, latency: 32, mmio:
0xe1800000
btaudio: using card config "default"
btaudio: registered device dsp0 [digital]
btaudio: registered device dsp1 [analog]
btaudio: registered device mixer0

Note that a 'dsp' (without the trailing '0') and a 'dsp1' are created
in /dev/sound and then are soft linked to /dev.

I can then run the following:
sox -c 1 -u -r 32000 -t ossdsp /dev/dsp1 dsp1.wav
sox -c 1 -u -r 32000 -t ossdsp /dev/dsp  dsp.wav
dsp1.wav is a proper wav file that can be played with xmms.  In this
case, it sounded like an infomercial, so it must be capturing from TV.
dsp.wav is a 44 byte "empty" file.  I assume 44 bytes is the size of a
wav file header.

So, it would appear that /dev/dsp1 is working and in a proper state to
capture TV audio.

Now, finally, the mencoder problem.  The mencoder command and options,
ran as root, follow:

mencoder -tv
driver=v4l2:normid=1:input=0:adevice=/dev/dsp1:forceaudio:forcechan=2
tv://5 -ovc lavc -o tv05.avi

And here is (snipped) the output and failure:

TV detected! ;-)
Selected driver: v4l2
 name: Video 4 Linux 2 input
Selected device: BT878 video (Hauppauge (bt878))
 Tuner cap:
 Tuner rxs: MONO STEREO
 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: BGR24
v4l2: current audio mode is : STEREO
============ Sorry, this file format is not recognized/supported
=============
=== If this file is an AVI, ASF or MPEG stream, please contact the
author! ===
Cannot open demuxer.
Exiting...


Now just changing the 'driver' value to '=v4l' (I know that v4l2 should
be used, but v4l gives a little better information in its output), the
following:

TV detected! ;-)
Selected driver: v4l
 name: Video 4 Linux input
Selected device: BT878 video (Hauppauge (bt878))
 Capabilites: capture tuner overlay clipping scales 
 Device type: 171
 Supported sizes: 48x32 => 924x576
 Inputs: 4
  0: Television: tuner audio tv camera  (tuner:1, norm:pal)
  1: Composite1: audio camera  (tuner:0, norm:pal)
  2: S-Video: audio camera  (tuner:0, norm:pal)
  3: Composite3: audio camera  (tuner:0, norm:pal)
Card reports an unknown audio mode !
Trying two channel audio. Use forcechan to override.
============ Sorry, this file format is not recognized/supported
=============
=== If this file is an AVI, ASF or MPEG stream, please contact the
author! ===
Cannot open demuxer.
Exiting...

Note that I have tried all of the possible combinations of dsp, dsp1,
forcechan=1, forcechan=2 and the resulting failures are exactly the
same.  I also tried adding the 'amode=X' option which made no
difference.

Also note that replacing the audio options with a 'noaudio' produces a
file with proper video capture, but with the expected no audio capture.

Any input on this problem would be appreciated.

Thanks,
Scott

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the MEncoder-users mailing list