LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-24-2006, 01:21 PM   #1
amadeus_z
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Rep: Reputation: 0
Unhappy tvtime sound OK, but can't record in mencoder! Help!


Hello,

I've been trying to fix this for some time now, and am getting a little frustrated.

I have a Leadtek Winfast 2000XP Expert card using the cx88 driver under Ubuntu Dapper.

Code:
amadeus@home-tv:~$ uname -a
Linux home-tv 2.6.15-26-686 #1 SMP PREEMPT Thu Aug 3 03:13:28 UTC 2006 i686 GNU/Linux
I plugged the audio out from the card into the system CD in, and using "/dev/mixer:cd" in tvtime.xml can watch and listen to TV fine.

I can record TV but no sound with mencoder. I've tried many things and will try to go through them.

First:

Code:
amadeus@home-tv:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: IXP [ATI IXP], device 0: ATI IXP AC97 [ATI IXP AC97]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Code:
amadeus@home-tv:~$ cat /proc/asound/pcm
00-00: ATI IXP AC97 : ATI IXP AC97 : playback 1 : capture 1
00-01: ATI IXP IEC958 : ATI IXP IEC958 (AC97) : playback 1
Code:
amadeus@home-tv:~$ amixer
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [on]
  Front Right: Playback 31 [100%] [on]
Simple mixer control 'Master Mono',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 0 [0%] [off]
Simple mixer control 'Master Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [off]
  Front Right: Playback 0 [0%] [off]
Simple mixer control 'Headphone Jack Sense',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [on]
  Front Right: Playback 31 [100%] [on]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [off]
  Front Right: Playback 0 [0%] [off]
Simple mixer control 'Surround Jack Mode',0
  Capabilities: enum
  Items: 'Shared' 'Independent'
  Item0: 'Shared'
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 31 [100%] [off]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 0 [0%] [off]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 31 [100%] [on] Capture [off]
  Front Right: Playback 31 [100%] [on] Capture [off]
Simple mixer control 'Line Jack Sense',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'CD',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 25 [81%] [on] Capture [on]
  Front Right: Playback 25 [81%] [on] Capture [on]
Simple mixer control 'Mic',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Mono
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono: Playback 31 [100%] [on]
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'Mic Boost (+20dB)',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Mic Select',0
  Capabilities: enum
  Items: 'Mic1' 'Mic2'
  Item0: 'Mic1'
Simple mixer control 'Video',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'Phone',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Mono
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono: Playback 0 [0%] [off]
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958 Playback AC97-SPSA',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 0 [0%]
Simple mixer control 'IEC958 Playback Source',0
  Capabilities: enum
  Items: 'AC-Link' 'A/D Converter'
  Item0: 'AC-Link'
Simple mixer control 'Aux',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 0 [0%] [off] Capture [off]
  Front Right: Playback 0 [0%] [off] Capture [off]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 15
  Front Left: Capture 13 [87%] [off]
  Front Right: Capture 13 [87%] [off]
Simple mixer control 'Mix',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'Mix Mono',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'Channel Mode',0
  Capabilities: enum
  Items: '2ch' '4ch' '6ch'
  Item0: '2ch'
Simple mixer control 'Downmix',0
  Capabilities: enum
  Items: 'Off' '6 -> 4' '6 -> 2'
  Item0: 'Off'
Simple mixer control 'Exchange Front/Surround',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'External Amplifier',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Spread Front to Surround and Center/LFE',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Code:
amadeus@home-tv:~$ lsmod
Module                  Size  Used by
isofs                  38496  1
udf                    94628  0
ipv6                  286976  22
ppdev                   9668  0
radeon                119872  1
drm                    78484  2 radeon
speedstep_lib           4580  0
cpufreq_userspace       6496  0
cpufreq_stats           6688  0
freq_table              4928  1 cpufreq_stats
cpufreq_powersave       1920  0
cpufreq_ondemand        7752  0
cpufreq_conservative     9000  0
video                  16324  0
tc1100_wmi              6884  0
sony_acpi               5580  0
pcc_acpi               12416  0
hotkey                 11492  0
dev_acpi               11236  0
container               4608  0
button                  6704  0
acpi_sbs               20172  0
battery                 9988  1 acpi_sbs
ac                      5220  1 acpi_sbs
i2c_acpi_ec             5120  1 acpi_sbs
ieee80211              38952  0
ieee80211_crypt         6528  1 ieee80211
dm_mod                 63256  1
af_packet              24520  2
md_mod                 76052  0
lp                     12356  0
tsdev                   8032  0
floppy                 64676  0
snd_atiixp             21324  4
snd_ac97_codec        100224  1 snd_atiixp
snd_ac97_bus            2400  1 snd_ac97_codec
snd_pcm_oss            56448  0
snd_mixer_oss          20544  1 snd_pcm_oss
snd_pcm                96708  4 snd_atiixp,snd_ac97_codec,snd_pcm_oss
tda9887                16336  0
snd_timer              26884  2 snd_pcm
tuner                  44932  0
snd                    60004  12 snd_atiixp,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore              10784  1 snd
psmouse                40004  0
parport_pc             37988  1
parport                39400  3 ppdev,lp,parport_pc
snd_page_alloc         11304  2 snd_atiixp,snd_pcm
rt2500                191492  1
serio_raw               7748  0
cx8800                 34668  0
cx88xx                 64384  1 cx8800
pcspkr                  2244  0
i2c_algo_bit            9800  1 cx88xx
video_buf              22724  2 cx8800,cx88xx
ir_common               9892  1 cx88xx
tveeprom               15312  1 cx88xx
i2c_core               22848  6 i2c_acpi_ec,tda9887,tuner,cx88xx,i2c_algo_bit,tveeprom
v4l1_compat            15204  1 cx8800
v4l2_common             6080  1 cx8800
btcx_risc               5288  2 cx8800,cx88xx
videodev               10144  2 cx8800,cx88xx
3c59x                  47784  0
shpchp                 49504  0
pci_hotplug            30788  1 shpchp
mii                     6176  1 3c59x
ati_agp                 9740  1
agpgart                36784  2 drm,ati_agp
evdev                  10176  2
ext3                  148104  1
jbd                    65876  1 ext3
ide_generic             1504  0
ehci_hcd               36104  0
ohci_hcd               22724  0
usbcore               139076  3 ehci_hcd,ohci_hcd
ide_disk               19136  3
ide_cd                 35780  1
cdrom                  41408  1 ide_cd
generic                 5124  0
atiixp                  7152  1
thermal                13768  0
processor              26888  1 thermal
fan                     4836  0
capability              4968  0
commoncap               7328  1 capability
vga16fb                13992  1
vgastate               10208  1 vga16fb
fbcon                  43904  74
tileblit                2784  1 fbcon
font                    8320  1 fbcon
bitblit                 6464  1 fbcon
softcursor              2304  1 bitblit
Code:
amadeus@home-tv:~$ lspci
0000:00:00.0 Host bridge: ATI Technologies Inc Radeon 9100 IGP Host Bridge (rev 02)
0000:00:01.0 PCI bridge: ATI Technologies Inc Radeon 9100 IGP AGP Bridge
0000:00:13.0 USB Controller: ATI Technologies Inc OHCI USB Controller #1 (rev 01)
0000:00:13.1 USB Controller: ATI Technologies Inc OHCI USB Controller #2 (rev 01)
0000:00:13.2 USB Controller: ATI Technologies Inc EHCI USB Controller (rev 01)
0000:00:14.0 SMBus: ATI Technologies Inc ATI SMBus (rev 18)
0000:00:14.1 IDE interface: ATI Technologies Inc ATI Dual Channel Bus Master PCI IDE Controller
0000:00:14.3 ISA bridge: ATI Technologies Inc: Unknown device 434c
0000:00:14.4 PCI bridge: ATI Technologies Inc: Unknown device 4342
0000:00:14.5 Multimedia audio controller: ATI Technologies Inc IXP150 AC'97 Audio Controller
0000:01:05.0 VGA compatible controller: ATI Technologies Inc Radeon 9100 IGP
0000:02:06.0 Network controller: RaLink Ralink RT2500 802.11 Cardbus Reference Card (rev 01)
0000:02:08.0 Ethernet controller: 3Com Corporation 3Com 3C920B-EMB-WNM Integrated Fast Ethernet Controller (rev 40)
0000:02:09.0 Multimedia video controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder (rev 05)
I guess the problem is not knowing which adevice to use with mencoder.

This is the script I am using right now:

Code:
amadeus@home-tv:~$ cat `which record`
#!/bin/sh

mencoder='/usr/bin/mencoder'
channel=$1

width=320
height=240

adevice=/dev/alsa

output=/home/tv/test.avi

# set cd volume to 80% and mute playback

amixer cset numid=21 80%
amixer cset numid=20 off

# capture source CD

amixer cset numid=26 1
amixer cset numid=27 on

$mencoder tv:// -tv driver=v4l:input=0:norm=pal:channel=$channel:width=$width:height=$height:outfmt=yuy2:device=/dev/video0:forceaudio:adevice=$adevice:audiorate=32000 buffersize=64 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=5000:keyint=30 -oac mp3lame -lameopts br=128:cbr:mode=3 -ffourcc divx -endpos 409 -o $output

# unmute playback

amixer cset numid=20 on

# capture source CD off

amixer cset numid=27 off
I have tried adding :alsa: and adevice=hw.0,0 adevice=hw.0 and using adevice=/dev/dsp adevice=/dev/mixer.cd adevice=/dev/mixer

But nothing works!

I know I have the right amixer settings, as when I watch tvtim and switch CD playback off it does cut off the sound.

I think it could be a problem outside mencoder, as when I am recording I can try

Code:
amadeus@home-tv:~$ amixer cset numid=20 on
numid=20,iface=MIXER,name='CD Playback Switch'
  ; type=BOOLEAN,access=rw---,values=2
  : values=on,on
amadeus@home-tv:~$ amixer cset numid=20 off
numid=20,iface=MIXER,name='CD Playback Switch'
  ; type=BOOLEAN,access=rw---,values=2
  : values=off,off
And the "hissing" noise that is recorded stops/starts respectively. If I use the same commands while watching TV with tvtime it will stop/start the proper TV sound.



Thanks for any help you can give,

Amadeus

Last edited by amadeus_z; 08-24-2006 at 01:23 PM.
 
Old 08-24-2006, 02:43 PM   #2
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
It is not mencoder problem. It is actually your settings. Type 'alsamixer -v All' to get access to all mixer settings. You need to make sure Capture is on. Then test it with arecord by recording audio. Specify the verbose command two times to show the VU meter. If you can record audio, then you can use mencoder or anything.

In mencoder include forceaudio and adevice in the -t option if it tells you that there is no audio. I am using a video capture card based on Philips SAA713x chips and I have to force mencoder to record audio.
 
Old 08-24-2006, 03:19 PM   #3
amadeus_z
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Sorry I ran that command without checking the settings.

The output just before mencoder is executed looks like:

Code:
Simple mixer control 'Master',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Mono:
 Front Left: Playback 31 [100%] [on]
 Front Right: Playback 31 [100%] [on]
Simple mixer control 'Master Mono',0
 Capabilities: pvolume pvolume-joined pswitch pswitch-joined
 Playback channels: Mono
 Limits: Playback 0 - 31
 Mono: Playback 0 [0%] [off]
Simple mixer control 'Master Surround',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Mono:
 Front Left: Playback 0 [0%] [off]
 Front Right: Playback 0 [0%] [off]
Simple mixer control 'Headphone Jack Sense',0
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [off]
Simple mixer control 'PCM',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Mono:
 Front Left: Playback 31 [100%] [on]
 Front Right: Playback 31 [100%] [on]
Simple mixer control 'Surround',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Mono:
 Front Left: Playback 0 [0%] [off]
 Front Right: Playback 0 [0%] [off]
Simple mixer control 'Surround Jack Mode',0
 Capabilities: enum
 Items: 'Shared' 'Independent'
 Item0: 'Shared'
Simple mixer control 'Center',0
 Capabilities: pvolume pvolume-joined pswitch pswitch-joined
 Playback channels: Mono
 Limits: Playback 0 - 31
 Mono: Playback 31 [100%] [off]
Simple mixer control 'LFE',0
 Capabilities: pvolume pvolume-joined pswitch pswitch-joined
 Playback channels: Mono
 Limits: Playback 0 - 31
 Mono: Playback 0 [0%] [off]
Simple mixer control 'Line',0
 Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
 Capture exclusive group: 0
 Playback channels: Front Left - Front Right
 Capture channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Front Left: Playback 31 [100%] [on] Capture [off]
 Front Right: Playback 31 [100%] [on] Capture [off]
Simple mixer control 'Line Jack Sense',0
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [off]
Simple mixer control 'CD',0
 Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
 Capture exclusive group: 0
 Playback channels: Front Left - Front Right
 Capture channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Front Left: Playback 25 [81%] [off] Capture [on]
 Front Right: Playback 25 [81%] [off] Capture [on]
Simple mixer control 'Mic',0
 Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
 Capture exclusive group: 0
 Playback channels: Mono
 Capture channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Mono: Playback 31 [100%] [on]
 Front Left: Capture [off]
 Front Right: Capture [off]
Simple mixer control 'Mic Boost (+20dB)',0
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [off]
Simple mixer control 'Mic Select',0
 Capabilities: enum
 Items: 'Mic1' 'Mic2'
 Item0: 'Mic1'
Simple mixer control 'Video',0
 Capabilities: cswitch cswitch-joined cswitch-exclusive
 Capture exclusive group: 0
 Capture channels: Front Left - Front Right
 Front Left: Capture [off]
 Front Right: Capture [off]
Simple mixer control 'Phone',0
 Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
 Capture exclusive group: 0
 Playback channels: Mono
 Capture channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Mono: Playback 0 [0%] [off]
 Front Left: Capture [off]
 Front Right: Capture [off]
Simple mixer control 'IEC958',0
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [off]
Simple mixer control 'IEC958 Playback AC97-SPSA',0
 Capabilities: volume volume-joined
 Playback channels: Mono
 Capture channels: Mono
 Limits: 0 - 3
 Mono: 0 [0%]
Simple mixer control 'IEC958 Playback Source',0
 Capabilities: enum
 Items: 'AC-Link' 'A/D Converter'
 Item0: 'AC-Link'
Simple mixer control 'Aux',0
 Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
 Capture exclusive group: 0
 Playback channels: Front Left - Front Right
 Capture channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Front Left: Playback 0 [0%] [off] Capture [off]
 Front Right: Playback 0 [0%] [off] Capture [off]
Simple mixer control 'Capture',0
 Capabilities: cvolume cswitch
 Capture channels: Front Left - Front Right
 Limits: Capture 0 - 15
 Front Left: Capture 13 [87%] [on]
 Front Right: Capture 13 [87%] [on]
Simple mixer control 'Mix',0
 Capabilities: cswitch cswitch-joined cswitch-exclusive
 Capture exclusive group: 0
 Capture channels: Front Left - Front Right
 Front Left: Capture [off]
 Front Right: Capture [off]
Simple mixer control 'Mix Mono',0
 Capabilities: cswitch cswitch-joined cswitch-exclusive
 Capture exclusive group: 0
 Capture channels: Front Left - Front Right
 Front Left: Capture [off]
 Front Right: Capture [off]
Simple mixer control 'Channel Mode',0
 Capabilities: enum
 Items: '2ch' '4ch' '6ch'
 Item0: '2ch'
Simple mixer control 'Downmix',0
 Capabilities: enum
 Items: 'Off' '6 -> 4' '6 -> 2'
 Item0: 'Off'
Simple mixer control 'Exchange Front/Surround',0
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [off]
Simple mixer control 'External Amplifier',0
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [on]
Simple mixer control 'Spread Front to Surround and Center/LFE',0
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [off]
Checking arecord while watching TV:

Code:
amadeus@home-tv:~$ arecord -vvvlL
PCM list:
hw {
        @args.0 CARD
        @args.1 DEV
        @args.2 SUBDEV
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars {
                                0 ALSA_PCM_CARD
                                1 ALSA_CARD
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.card'
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars {
                                0 ALSA_PCM_DEVICE
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.device'
                        }
                }
        }
        @args.SUBDEV {
                type integer
                default {
                        @func refer
                        name 'defaults.pcm.subdevice'
                }
        }
        type hw
        card $CARD
        device $DEV
        subdevice $SUBDEV
}
plughw {
        @args.0 CARD
        @args.1 DEV
        @args.2 SUBDEV
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars {
                                0 ALSA_PCM_CARD
                                1 ALSA_CARD
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.card'
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars {
                                0 ALSA_PCM_DEVICE
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.device'
                        }
                }
        }
        @args.SUBDEV {
                type integer
                default {
                        @func refer
                        name 'defaults.pcm.subdevice'
                }
        }
        type plug
        slave.pcm {
                type hw
                card $CARD
                device $DEV
                subdevice $SUBDEV
        }
}
plug {
        @args.0 SLAVE
        @args.SLAVE {
                type string
        }
        type plug
        slave.pcm $SLAVE
}
shm {
        @args.0 SOCKET
        @args.1 PCM
        @args.SOCKET {
                type string
        }
        @args.PCM {
                type string
        }
        type shm
        server $SOCKET
        pcm $PCM
}
tee {
        @args.0 SLAVE
        @args.1 FILE
        @args.2 FORMAT
        @args.SLAVE {
                type string
        }
        @args.FILE {
                type string
        }
        @args.FORMAT {
                type string
                default raw
        }
        type file
        slave.pcm $SLAVE
        file $FILE
        format $FORMAT
}
file {
        @args.0 FILE
        @args.1 FORMAT
        @args.FILE {
                type string
        }
        @args.FORMAT {
                type string
                default raw
        }
        type file
        slave.pcm null
        file $FILE
        format $FORMAT
}
null {
        type null
}
cards 'cards.pcm'
front 'cards.pcm.front'
rear 'cards.pcm.rear'
center_lfe 'cards.pcm.center_lfe'
side 'cards.pcm.side'
surround40 'cards.pcm.surround40'
surround41 'cards.pcm.surround41'
surround50 'cards.pcm.surround50'
surround51 'cards.pcm.surround51'
surround71 'cards.pcm.surround71'
iec958 'cards.pcm.iec958'
spdif 'cards.pcm.iec958'
modem 'cards.pcm.modem'
phoneline 'cards.pcm.phoneline'
default 'cards.pcm.default'
dmix 'cards.pcm.dmix'
dsnoop 'cards.pcm.dsnoop'
**** List of CAPTURE Hardware Devices ****
card 0: IXP [ATI IXP], device 0: ATI IXP AC97 [ATI IXP AC97]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Just running "arecord -vvv test.wav"

Code:
amadeus@home-tv:~$ arecord -vvv test.wav
Recording WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
Plug PCM: Rate conversion PCM (48000, sformat=U8)
Its setup is:
stream       : CAPTURE
access       : RW_INTERLEAVED
format       : U8
subformat    : STD
channels     : 1
rate         : 8000
exact rate   : 8000 (8000/1)
msbits       : 8
buffer_size  : 2730
period_size  : 170
period_time  : 21333
tick_time    : 0
tstamp_mode  : NONE
period_step  : 1
sleep_min    : 0
avail_min    : 170
xfer_align   : 170
start_threshold  : 1
stop_threshold   : 2730
silence_threshold: 0
silence_size : 0
boundary     : 178913280
Slave: Route conversion PCM (sformat=S16_LE)
Transformation table:
0 <- 0*0.5 + 1*0.5
Its setup is:
stream       : CAPTURE
access       : MMAP_INTERLEAVED
format       : U8
subformat    : STD
channels     : 1
rate         : 48000
exact rate   : 48000 (48000/1)
msbits       : 8
buffer_size  : 16384
period_size  : 1024
period_time  : 21333
tick_time    : 0
tstamp_mode  : NONE
period_step  : 1
sleep_min    : 0
avail_min    : 1024
xfer_align   : 1024
start_threshold  : 6
stop_threshold   : 16384
silence_threshold: 0
silence_size : 0
boundary     : 1073741824
Slave: Direct Snoop PCM

Its setup is:
stream       : CAPTURE
access       : MMAP_INTERLEAVED
format       : S16_LE
subformat    : STD
channels     : 2
rate         : 48000
exact rate   : 48000 (48000/1)
msbits       : 16
buffer_size  : 16384
period_size  : 1024
period_time  : 21333
tick_time    : 0
tstamp_mode  : NONE
period_step  : 1
sleep_min    : 0
avail_min    : 1024
xfer_align   : 1024
start_threshold  : 6
stop_threshold   : 16384
silence_threshold: 0
silence_size : 0
boundary     : 1073741824
Hardware PCM card 0 'ATI IXP' device 0 subdevice 0

Its setup is:
stream       : CAPTURE
access       : MMAP_INTERLEAVED
format       : S16_LE
subformat    : STD
channels     : 2
rate         : 48000
exact rate   : 48000 (48000/1)
msbits       : 16
buffer_size  : 16384
period_size  : 1024
period_time  : 21333
tick_time    : 4000
tstamp_mode  : NONE
period_step  : 1
sleep_min    : 0
avail_min    : 1024
xfer_align   : 1024
start_threshold  : 1
stop_threshold   : 1073741824
silence_threshold: 0
silence_size : 0
boundary     : 1073741824
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Max peak (170 samples): 0x00000001 #                    0%
Aborted by signal Interrupt...
amadeus@home-tv:~$
I think I'm missing the part when the CD output gets thrown into this. Capture is definitely enabled and the capture volume is high.

Thanks for your help,

Amadeus
 
Old 08-24-2006, 04:11 PM   #4
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Getting audio recording to work is trial and error. Just keep on adjusting mixer settings until the VU meter changes to a value higher than 0%.

Instead of recording to a file. Pipe it to hexdump. To do this, type 'arecord | hexdump'. You do not need to be a geek to understand the read out. You just need to notice a change in geek langauge which desingates a signal.
 
Old 08-24-2006, 04:36 PM   #5
amadeus_z
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks very much for your help;

Jiggling with mixer settings while running arecord | hexdump allowed me to record audio (finally!) while watching tv with tvtime. I had to enable the "Capture" button which got switched off by freevo.

However, when mencoder "accesses" the tv the resulting sound is a "hiss".

So it seems this is a problem when mencoder accesses the tv card? That the sound isn't coming out as it does when tvtime access the tv card?

a) I can record audio when tvtime is playing
b) I can't record audio when mencoder is accessing /dev/video0

Thanks a lot for your help,

Amadeus
 
Old 08-24-2006, 06:07 PM   #6
amadeus_z
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Original Poster
Rep: Reputation: 0
I just realised that I should try to get it working in mplayer first:

mplayer tv:// -tv driver=v4l:norm=PAL:input=0:amode=1:width=384:height=288utfmt=yuy2:device=/dev/video0:chanlist=europe-west:channel=S37-Euronews

Gives "no audio".

Trying the same variety of adevice's gives the same result. It seems no sound is coming from CD when mplayer is running.

I've been told to try v4l2 drivers but can't get a picture yet just substituting driver=v4l2 into the above

Amadeus
 
Old 08-24-2006, 09:36 PM   #7
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by amadeus_z
Hello,

I've been trying to fix this for some time now, and am getting a little frustrated.

I have a Leadtek Winfast 2000XP Expert card using the cx88 driver under Ubuntu Dapper.
I have the Deluxe version of this card and your post got me trying to get the recording working again, I could already get the video like you just no sound. I had the line in capture set and could never get any sound at all it turned out that the setting needed to get it working was to set was is called the "Analog Mix" to record in Kmix and raise the capture volume up. I see you have a just simple Mix capture that is set to off perhaps if you try playing around with it or one of the others set to off here it might work.

Code:
amadeus@home-tv:~$ amixer
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 31 [100%] [on] Capture [off]
  Front Right: Playback 31 [100%] [on] Capture [off]
Simple mixer control 'Line Jack Sense',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'CD',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 25 [81%] [on] Capture [on]
  Front Right: Playback 25 [81%] [on] Capture [on]
Simple mixer control 'Video',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'Phone',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Mono
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono: Playback 0 [0%] [off]
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'IEC958 Playback Source',0
  Capabilities: enum
  Items: 'AC-Link' 'A/D Converter'
  Item0: 'AC-Link'
Simple mixer control 'Aux',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 0 [0%] [off] Capture [off]
  Front Right: Playback 0 [0%] [off] Capture [off]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 15
  Front Left: Capture 13 [87%] [off]
  Front Right: Capture 13 [87%] [off]
Simple mixer control 'Mix',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'Mix Mono',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Front Left: Capture [off]
  Front Right: Capture [off]
 
Old 08-26-2006, 05:22 PM   #8
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
The hiss means the video capture card is probably set as mute and your sound card really sucks.

Some video capture cards may have audio muted. To set unmute when programs like mplayer/mencoder can not, use the utility v4lctl to unmute.

Example:
v4lctl setattr mute off
 
Old 08-28-2006, 10:35 AM   #9
amadeus_z
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks the v4lctl volume mute off solved it for me!

Now I can't increase the tv size above 320x240 in mplayer/mencoder which sucks, but is another issue

I'll update the freevo wiki when I'm done with specific instructions for my card.

Amadeus
 
Old 08-28-2006, 12:10 PM   #10
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by amadeus_z
Thanks the v4lctl volume mute off solved it for me!

Now I can't increase the tv size above 320x240 in mplayer/mencoder which sucks, but is another issue

I'll update the freevo wiki when I'm done with specific instructions for my card.

Amadeus

I got it larger using this for mplayer.

Code:
mplayer tv:// -tv driver=v4l2:norm=NTSC:input=0:alsa:width=720:height=480:outfmt=yuy2:device=/dev/video0
And using the same size values in memcoder I pretty sure the Expert version should be able to do the same here is what I used to get the 720x480 recording.

Code:
mencoder tv:// -tv driver=v4l2:input=0:norm=ntsc:width=720:height=480:outfmt=yuy2:device=/dev/video0:forceaudio:audiorate=32000 buffersize=64 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=5000:keyint=30 -oac mp3lame -lameopts br=128:cbr:mode=3 -ffourcc divx -endpos 409 -o record.avi
 
Old 08-28-2006, 12:22 PM   #11
amadeus_z
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for the reply; I'm using the v4l driver at the moment not the v4l2 driver as it simply doesn't get the picture.

However using the v4l driver I get the following with your settings:

Code:
MPlayer 2:0.99+1.0pre7try2+cvs20060117-0ubuntu8 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium 4/Celeron D Prescott; Xeon Nocona (Family: 15, Stepping: 4)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.


91 audio & 204 video codecs
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.
Playing tv://.
Selected driver: v4l
 name: Video 4 Linux input
 author: Alex Beregszaszi
 comment: under development
=================================================================
 WARNING: YOU ARE USING V4L DEMUXER WITH V4L2 DRIVERS!!!
 As the V4L1 compatibility layer is broken, this may not work.
 If you encounter any problems, use driver=v4l2 instead.
 Bugreports on driver=v4l with v4l2 drivers will be ignored.
=================================================================
Selected device: Leadtek Winfast 2000XP Expert
 Capabilites: capture tuner teletext overlay
 Device type: 15
 Supported sizes: 48x32 => 768x576
 Inputs: 3
  0: Television: tuner tv  (tuner:1, norm:pal)
  1: Composite1:  (tuner:0, norm:pal)
  2: S-Video:  (tuner:0, norm:pal)
Using input 'Television'
ioctl get picture failed: Invalid argument
ioctl get picture failed: Invalid argument
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 720 x 480 (preferred colorspace: Packed YUY2)
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 720x480 => 720x480 Packed YUY2
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Audio: no sound
Starting playback...

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument
V:   0.0   1/  1 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument
V:   0.0   2/  2 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.1   3/  3 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.1   4/  4 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.2   5/  5 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.2   6/  6 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.2   7/  7 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.3   8/  8 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.3   9/  9 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
And just a green screen with some static.

Amadeus
 
Old 08-28-2006, 01:01 PM   #12
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by amadeus_z
Thanks for the reply; I'm using the v4l driver at the moment not the v4l2 driver as it simply doesn't get the picture.

However using the v4l driver I get the following with your settings:

Code:
MPlayer 2:0.99+1.0pre7try2+cvs20060117-0ubuntu8 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium 4/Celeron D Prescott; Xeon Nocona (Family: 15, Stepping: 4)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.


91 audio & 204 video codecs
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.
Playing tv://.
Selected driver: v4l
 name: Video 4 Linux input
 author: Alex Beregszaszi
 comment: under development
=================================================================
 WARNING: YOU ARE USING V4L DEMUXER WITH V4L2 DRIVERS!!!
 As the V4L1 compatibility layer is broken, this may not work.
 If you encounter any problems, use driver=v4l2 instead.
 Bugreports on driver=v4l with v4l2 drivers will be ignored.
=================================================================
Selected device: Leadtek Winfast 2000XP Expert
 Capabilites: capture tuner teletext overlay
 Device type: 15
 Supported sizes: 48x32 => 768x576
 Inputs: 3
  0: Television: tuner tv  (tuner:1, norm:pal)
  1: Composite1:  (tuner:0, norm:pal)
  2: S-Video:  (tuner:0, norm:pal)
Using input 'Television'
ioctl get picture failed: Invalid argument
ioctl get picture failed: Invalid argument
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 720 x 480 (preferred colorspace: Packed YUY2)
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 720x480 => 720x480 Packed YUY2
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Audio: no sound
Starting playback...

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument
V:   0.0   1/  1 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument

ioctl mcapture failed: Invalid argument
V:   0.0   2/  2 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.1   3/  3 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.1   4/  4 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.2   5/  5 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.2   6/  6 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.2   7/  7 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.3   8/  8 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
V:   0.3   9/  9 ??% ??% ??,?% 0 0
ioctl mcapture failed: Invalid argument
And just a green screen with some static.

Amadeus

Did you use it exactly as I wrote it if so you would be trying to get a NTSC signal with what looks like a PAL tuner so change that from ntsc to pal in the line and you may want to increase the size to 768 576 which it says in the output above it supports also what input are you using the television tuner, svideo or composite this is what it looks like when I use it here.

Code:
>$ mplayer tv:// -tv driver=v4l2:norm=NTSC:input=0:alsa:width=720:height=480:outfmt=yuy2:device=/dev/video0
MPlayer 1.0pre8-4.1.2 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ (Family: 15, Model: 35, Stepping: 2)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2


Failed to open /dev/rtc: Permission denied (it should be readable by the user.)
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0: Permission denied
Can't init input joystick
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: Connection refused
Failed to open LIRC support.
You will not be able to use your remote control.

Playing tv://.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@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 : LANG1
open: No such file or directory
Couldn't open: /dev/mga_vid
open: No such file or directory
Couldn't open: /dev/mga_vid
[VO_TDFXFB] Can't open /dev/fb0: No such device or address.
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 720 x 480 (preferred colorspace: Packed YUY2)
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 720x480 => 720x480 Packed YUY2
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Audio: no sound
Starting playback...
v4l2: 1274 frames successfully processed, 12 frames dropped.

Exiting... (Quit)
 
Old 08-28-2006, 04:23 PM   #13
amadeus_z
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Original Poster
Rep: Reputation: 0
I just posted this to v4l and freevo mailing lists:

Hello,

I just came back from a wining and dining and in my grogginess managed
to get v4l2 working! It turns out that settings brightness, contrast and
hue are what is needed.

Here are two scripts for watching and recording with a "Leadtek Winfast
2000XP Expert" in Belgium with the card's audio out plugged into the
motherboards AUX in. It only took 3 weeks to figure out

For integration into Freevo I will update their wiki with instructions.

I hope this can help someone browsing the list. I'll also put
instructions on how to get my card to work on my site; poff.sixbit.org

Thanks for your help!

Amadeus

script 'watch':

Code:
#!/bin/bash

# usage: watch channel
channel=$1

if [ -z $channel ]; then
   echo "Usage: watch channel"
   exit 1
fi

# some settings:
mplayer='/usr/bin/mplayer'
width=768
height=576
adevice=hw.0,0:alsa

# 2 bodges for converting tvtime channel names into mplayer channel names

# U29 -> 29

channel=${channel#U}

# S1-S20 -> SE1-SE20

if [[ ${channel#S} != $channel && ${channel#S} -lt 21 ]]; then
   channel="SE${channel#S}"
fi

# mplayer options with deinterlace

options="tv:// -tv
driver=v4l2:brightness=53:contrast=26:saturation=50:hue=50:adevice=$adevice:forceaudio:audiorate=32000:amode=1:norm=PAL-BG:input=0:chanlist=europe-west:channel=$channel:width=$width:height=$height:outfmt=yuy2:device=/dev/video0
buffersize=64 -vf pp=ci"

# start the playback process:

# unmute aux
amixer -q cset numid=22 on
# set aux vol
amixer -q cset numid=23 95%
# set capture aux
amixer -q cset numid=26 3
# set capture on
amixer -q cset numid=27 on
# set capture volume
amixer -q cset numid=28 95%
# video mute off
v4lctl volume mute off

# watch

$mplayer $options

# stop the playback process

# video mute on
v4lctl volume mute on
script 'record':

Code:
#!/bin/bash

# usage: record channel filename
channel=$1; output=$2

if [ -z $output ]; then
   echo "Usage: record channel filename"
   exit 1
fi

# some settings:
mencoder='/usr/bin/mencoder'
width=768
height=576
adevice=hw.0,0:alsa

# 2 bodges for converting tvtime channel names into mplayer channel names

# U29 -> 29

channel=${channel#U}

# S1-S20 -> SE1-SE20

if [[ ${channel#S} != $channel && ${channel#S} -lt 21 ]]; then
   channel="SE${channel#S}"
fi

# mencoder options with deinterlace

options="tv:// -tv
driver=v4l2:brightness=53:contrast=26:saturation=50:hue=50:adevice=$adevice:forceaudio:audiorate=32000:amode=1:norm=PAL-BG:input=0:chanlist=europe-west:channel=$channel:width=$width:height=$height:outfmt=yuy2:device=/dev/video0
buffersize=64 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=5000:keyint=30
-oac mp3lame -lameopts br=128:cbr:mode=3 -ffourcc divx -vf pp=ci -o $output"

# start the recording process:

# mute aux
amixer -q cset numid=22 off
# set aux vol
amixer -q cset numid=23 90%
# set capture aux
amixer -q cset numid=26 3
# set capture on
amixer -q cset numid=27 on
# set capture volume
amixer -q cset numid=28 90%
# video mute off
v4lctl volume mute off

# record

$mencoder $options

# stop recording process

# video mute on
v4lctl volume mute on
# unmute aux
amixer -q cset numid=22 on
# set aux vol
amixer -q cset numid=23 80%
# set capture off
amixer -q cset numid=27 off
# set capture volume
amixer -q cset numid=28 80%
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No Sound in TvTime or other TV Software CMGeorge Linux - Hardware 0 07-20-2006 11:00 AM
No sound in TVTime majara Fedora 21 01-27-2006 09:11 PM
no sound in TVTIME!!! mrosati Linux - Software 11 01-04-2006 01:07 PM
re: tvtime sound problem! thomyorke38 Linux - Hardware 1 01-03-2006 01:31 PM
TVTime Sound is low. glore Linux - Newbie 1 04-29-2004 11:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration