Topic - No sound when I try to record TV input.



Reply to this topic

Topic Starter HomeUser - Posted on Sunday, April 5 2009 11:44:46 AM
No sound when I try to record TV input.

How can I specify that mencoder uses the Alsa mic sound input from my VIA8237 soundcard?

Now my television is broken, I was better motivated to make my tuner card working. And most things work in some manner. Regrettable for the missing XVideo support in Radeonhd. And I didn't find yet the one program that has it all. (Good teletext, user interface to select stations and teletext pages, working record). The best result I had in Mplayer. Kmplayer under Gentoo does not really work for me yet. But I am still not able to record sound.

I understood that the conversion of btsound to snd_bt87x broke it for my card. But the "digital tv" box I have delivers sound and composite signal (and s-video but I should still connect it), so I can live with that. I get the sound in my computer via the mic input but I seems not to be able to record it.



If I use as driver v4l2 and put something in adevice like in (in Gentoo, the problem looks the same as in Ubuntu)
mencoder -tv driver=v4l2:device=/dev/video0:audiorate=32000:adevice=hw.0:alsa:input=1:amode=1:normid=4 -ovc lavc -oac mp3lame -o tv.avi tv://
mencoder seems to be waiting for something, doesnt stop with ctrl-c and has to be killed with kill -7
The output looks then like this
MEncoder dev-SVN-r28058-4.1.2 (C) 2000-2008 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3000+ (Family: 15, Model: 4, Stepping: 8)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Gecompileerd voor x86 CPU met de volgende uitbreidingen: MMX MMX2 3DNow 3DNowEx SSE SSE2
...
Error reading audio: Input/output error
Busfout
The "Busfout" is caused by the kill -7

mencoder -tv driver=v4l2:device=/dev/video0:audiorate=32000:adevice=hw.0:alsa:input=1:amode=1:normid=4 -ovc lavc -oac mp3lame -o tv.avi tv:// -v -nosound
Does not create the same problem and can be stopped with ctrl-c

Some other output that may be usefull
lspci
...
00:0d.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
00:0d.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
...
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
00:11.6 Communication controller: VIA Technologies, Inc. AC'97 Modem Controller (rev 80)
...
01:00.0 VGA compatible controller: ATI Technologies Inc RV630 PRO AGP [Radeon HD 2600 PRO AGP]

cat /proc/asound/cards
0 [V8237 ]: VIA8237 - VIA 8237
VIA 8237 with ALC655 at 0xe400, irq 22
1 [Bt878 ]: Bt87x - Brooktree Bt878
Brooktree Bt878 at 0xf7f00000, irq 18

cat /proc/asound/devices
0: [ 0] : control
16: [ 0- 0]: digital audio playback
17: [ 0- 1]: digital audio playback
24: [ 0- 0]: digital audio capture
25: [ 0- 1]: digital audio capture
32: [ 1] : control
33: : timer
56: [ 1- 0]: digital audio capture
57: [ 1- 1]: digital audio capture

amixer -c 0 contents
...
numid=26,iface=MIXER,name='Capture Source'
; type=ENUMERATED,access=rw------,values=2,items=8
; Item #0 'Mic'
; Item #1 'CD'
; Item #2 'Video'
; Item #3 'Aux'
; Item #4 'Line'
; Item #5 'Mix'
; Item #6 'Mix Mono'
; Item #7 'Phone'
: values=0,0
numid=27,iface=MIXER,name='Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=28,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=15,step=0
: values=10,10
| dBscale-min=0.00dB,step=1.50dB,mute=0
...
numid=39,iface=MIXER,name='IEC958 Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
...

amixer -c1 contents
numid=3,iface=MIXER,name='Capture Source'
; type=ENUMERATED,access=rw------,values=1,items=3
; Item #0 'TV Tuner'
; Item #1 'FM'
; Item #2 'Mic/Line'
: values=0
numid=2,iface=MIXER,name='Capture Boost'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=1,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
: values=0

lsmod
Module Size Used by
tuner 25036 0
bttv 182100 0
snd_bt87x 13060 0
ir_common 36740 1 bttv
i2c_algo_bit 5828 1 bttv
videobuf_dma_sg 11524 1 bttv
videobuf_core 15940 2 bttv,videobuf_dma_sg
btcx_risc 4104 1 bttv
tveeprom 13380 1 bttv


lauching strace mencoder (in Ubuntu)
...
write(1, "Pos: 0.0s 1f ( 0%) 0fps"..., 93) = 93
gettimeofday({1238713487, 657970}, NULL) = 0
nanosleep({0, 10000000}, NULL) = 0
This line is from then repeated indefinitly until the kill command
nanosleep({0, 10000000}, 0) = ? ERESTART_RESTARTBLOCK (To be restarted)
--- SIGBUS (Bus error) @ 0 (0) ---
+++ killed by SIGBUS +++
Somebody has any idea?