Video from PVR and audio from hw:0,0

*nix specific usage questions
simonb
Blank Cone
Blank Cone
Posts: 25
Joined: 15 Jan 2005 18:38
Operating System: Linux
Location: London

Video from PVR and audio from hw:0,0

Postby simonb » 05 Dec 2008 16:03

I am trying to capture audio and video from an external source. It seems the PVR card I am using doesn't have an audio input. I need to capture a composite video source with sound.

Is there a way to make VLC get a picture from the PVR card and take audio from the regular sound card?

A look through the long help didn't suggest anything was possible but I'm just posting in case I missed something.

Shadow_7
Blank Cone
Blank Cone
Posts: 14
Joined: 02 Sep 2008 02:39

Re: Video from PVR and audio from hw:0,0

Postby Shadow_7 » 05 Dec 2008 18:59

I"m not sure of any / the VLC method. But I do exactly that with mplayer / mencoder. It's also possible with transcode and ffmpeg. And in theory MythTV.

mencoder -aspect 4:3 tv://3 -tv driver=v4l2:input=6:fps=60000/1001:chanlist=us-cable:norm=NTSC-M:buffersize=1024:width=720:height=480:brightness=8:contrast=4:forceaudio:amode=1:audiorate=48000:mjpeg:quality=100 -field-dominance 1 -vf yadif,scale -ofps 30000/1001 -audio-delay 0.222 -oac pcm -ovc lavc -lavcopts vcodec=mjpeg:autoaspect=1 -o tvcapture1.avi

Important notes: amode=1 for stereo audio. input=6 for 24 bpp RGB capture for my card (0 is 8 bpp greyscale, ick!!! v4l-info). -audio-delay 0.222 because audio from the soundcard is direct, video has to be interpreted and rendered, which is not instantaneous. Unfortunately mplayer doesn't have that option, so no watching in sync tv without encoding first. adevice=/dev/dsp, but it seems to work without that in my case. Given that I re-indexed the drivers to have my Delta 44 as card 0.

My tv card has a cdaudio audio connection and cable. But my motherboard or soundcard does not have cd-audio connectors. Some strange Intel high definition connector, which is too narrow for a cd-audio cable.

Various ways to get audio to pipe through without delay. alsamixer has settings for that for my M-Audio Delta 44. Or running jackd with qjackctl connecting capture to playback. Or jack_connect to do it at the CLI. One note on audio, ffmpeg doesn't like the output too well, I've got to use sox to re-encode the audio from -t raw to -t wav. But it's usable.

HTH

simonb
Blank Cone
Blank Cone
Posts: 25
Joined: 15 Jan 2005 18:38
Operating System: Linux
Location: London

Re: Video from PVR and audio from hw:0,0

Postby simonb » 08 Dec 2008 14:32

It seems the card did have an audio input after all. I am logging into the PC remotely using Nomachine so I couldn't check it myself. So we now have audio to match the video.

Thanks for the useful info though. I'm sure I'll need it one day, for example, if I need a sound input with mixer controls.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 20 guests