can't access sound input from Hauppauge USB Live 2 with ffmpeg or aconv
trying to capture the sound from the device but don't know the command to load it.
dmesg,lsusb, and lsmod show the card and appropriate modules loaded The dev shows as /dev/snd/pcmC1D0c tvtime plays both video and sound with no problem. I did notice that tvtime copies the sound from the above device to default. mplayer, vlc, and ffmpeg will display the video. what command is necessary to access the input on the above device. I am trying to stream the output from my Dish receiver to a server on my local network. (Mythtv doesn't seem to like the card) Lubuntu 15.04 Intel Celeron |
1) please provide the ffmpeg command you have tried
2) with the usb device connected do # 'arecord -L' and give the output here. |
This is the command I tried. I also installed the oss modules and tried that.
ffmpeg -f alsa -i hw:1,0 -f video4linux2 -s 720x480 -i /dev/video0 out.mpg ffmpeg -f oss -i /dev/dsp -f video4linux2 -s 320x240 -i /dev/video0 out.mpg I get video but no audio. As I had stated tvtime works great. Starting tvtime on the command line I get this; alsa: starting copying alsa stream from hw:1,0 to default The output from arecord -L is; null Discard all samples (playback) or generate zero samples (capture) pulse PulseAudio Sound Server default:CARD=Intel HDA Intel, ALC268 Analog Default Audio Device sysdefault:CARD=Intel HDA Intel, ALC268 Analog Default Audio Device front:CARD=Intel,DEV=0 HDA Intel, ALC268 Analog Front speakers surround21:CARD=Intel,DEV=0 HDA Intel, ALC268 Analog 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=Intel,DEV=0 HDA Intel, ALC268 Analog 4.0 Surround output to Front and Rear speakers surround41:CARD=Intel,DEV=0 HDA Intel, ALC268 Analog 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=Intel,DEV=0 HDA Intel, ALC268 Analog 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=Intel,DEV=0 HDA Intel, ALC268 Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=Intel,DEV=0 HDA Intel, ALC268 Analog 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers dmix:CARD=Intel,DEV=0 HDA Intel, ALC268 Analog Direct sample mixing device dsnoop:CARD=Intel,DEV=0 HDA Intel, ALC268 Analog Direct sample snooping device hw:CARD=Intel,DEV=0 HDA Intel, ALC268 Analog Direct hardware device without any conversions plughw:CARD=Intel,DEV=0 HDA Intel, ALC268 Analog Hardware device with all software conversions default:CARD=Cx231xxAudio Cx231xx Audio, Conexant cx231xx Capture Default Audio Device sysdefault:CARD=Cx231xxAudio Cx231xx Audio, Conexant cx231xx Capture Default Audio Device dmix:CARD=Cx231xxAudio,DEV=0 Cx231xx Audio, Conexant cx231xx Capture Direct sample mixing device dsnoop:CARD=Cx231xxAudio,DEV=0 Cx231xx Audio, Conexant cx231xx Capture Direct sample snooping device hw:CARD=Cx231xxAudio,DEV=0 Cx231xx Audio, Conexant cx231xx Capture Direct hardware device without any conversions plughw:CARD=Cx231xxAudio,DEV=0 Cx231xx Audio, Conexant cx231xx Capture Hardware device with all software conversions |
did you have the Hauppauge connected when you did areacord -L?
if so I'm assuming the Cx231xxAudio is the Hauppauge audio device. (please confirm) try this: ffmpeg -f alsa -i default:CARD=Cx231xxAudio -f video4linux2 -s 720x480 -i /dev/video0 out.mpg if no joy try this: ffmpeg -f alsa -i sysdefault:CARD=Cx231xxAudio -f video4linux2 -s 720x480 -i /dev/video0 out.mpg let me know how it goes. |
Yes, the card was plugged in.
Neither suggestion worked. Here is part of the command line verbosity; Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, alsa, from 'default:CARD=Cx231xxAudio': Duration: N/A, start: 1441910224.906750, bitrate: 1536 kb/s Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s Input #1, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 1452.269362, bitrate: 165722 kb/s Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x480, 165722 kb/s, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc [mpeg @ 0x160f880] VBV buffer size not set, using default size of 130KB If you want the mpeg file to be compliant to some specification Like DVD, VCD or others, make sure you set the correct buffer size Output #0, mpeg, to 'out.mpg': Metadata: encoder : Lavf56.15.102 Stream #0:0: Video: mpeg1video, yuv420p, 720x480, q=2-31, 200 kb/s, 29.97 fps, 90k tbn, 29.97 tbc Metadata: encoder : Lavc56.13.100 mpeg1video Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s Metadata: encoder : Lavc56.13.100 mp2 Stream mapping: Stream #1:0 -> #0:0 (rawvideo (native) -> mpeg1video (native)) Stream #0:0 -> #0:1 (pcm_s16le (native) -> mp2 (native)) Press [q] to stop, [?] for help Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, alsa, from 'sysdefault:CARD=Cx231xxAudio': Duration: N/A, start: 1441910026.823449, bitrate: 1536 kb/s Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s Input #1, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 1254.205571, bitrate: 165722 kb/s Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x480, 165722 kb/s, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc [mpeg @ 0x1954900] VBV buffer size not set, using default size of 130KB If you want the mpeg file to be compliant to some specification Like DVD, VCD or others, make sure you set the correct buffer size Output #0, mpeg, to 'outa.mpg': Metadata: encoder : Lavf56.15.102 Stream #0:0: Video: mpeg1video, yuv420p, 720x480, q=2-31, 200 kb/s, 29.97 fps, 90k tbn, 29.97 tbc Metadata: encoder : Lavc56.13.100 mpeg1video Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s Metadata: encoder : Lavc56.13.100 mp2 Stream mapping: Stream #1:0 -> #0:0 (rawvideo (native) -> mpeg1video (native)) Stream #0:0 -> #0:1 (pcm_s16le (native) -> mp2 (native)) Press [q] to stop, [?] for help Records the video just fine. No sound in gnome-mplayer or ffplay |
1) do some digging into the spec of the Hauppauge and find out what the audio device really is. I only assumed it was Cx231xxAudio, I might be wrong.
2) If you haven't already got it install v4l-utils and run 'v4l2-ctl -l', please post the output here. 3) install vlc if you don't have it and play the output in that, there's a volume control in the lower right corner. vlc is the only player I trust. 4) try a different audio source into the Hauppauge although you've got no audio the ffmpeg command isn't throwing any errors (that I can see) |
Here is the output from v4l2-ctl;
User Controls brightness (int) : min=0 max=255 step=1 default=128 value=128 flags=slider contrast (int) : min=0 max=127 step=1 default=64 value=64 flags=slider saturation (int) : min=0 max=127 step=1 default=64 value=64 flags=slider hue (int) : min=-128 max=127 step=1 default=0 value=0 flags=slider volume (int) : min=0 max=65535 step=655 default=60928 value=65500 flags=slider balance (int) : min=0 max=65535 step=655 default=32768 value=32768 flags=slider bass (int) : min=0 max=65535 step=655 default=32768 value=32768 flags=slider treble (int) : min=0 max=65535 step=655 default=32768 value=32768 flags=slider mute (bool) : default=0 value=1 brightness (int) : min=0 max=255 step=1 default=128 value=128 flags=slider contrast (int) : min=0 max=127 step=1 default=64 value=64 flags=slider saturation (int) : min=0 max=127 step=1 default=64 value=64 flags=slider hue (int) : min=-128 max=127 step=1 default=0 value=0 flags=slider volume (int) : min=0 max=65535 step=655 default=60928 value=65500 flags=slider balance (int) : min=0 max=65535 step=655 default=32768 value=32768 flags=slider bass (int) : min=0 max=65535 step=655 default=32768 value=32768 flags=slider treble (int) : min=0 max=65535 step=655 default=32768 value=32768 flags=slider mute (bool) : default=0 value=1 There is no sound using vlc also. I am able to capture the sound using tvtime so my sound source should be fine. The question is; how did they do it and how can the audio and video be redirected for streaming over a local server? |
I don't know what tvtime is, but in the meantime you still have to drill down and find out what the audio device is in the Hauppauge. What is it called ie: what's its proper name?
|
I got sound to work on vlc. I was selecting "analog tv" for the capture mode. I left it on camera, set video device as /dev/video, and audio device as hw:1,0. Got sound. Set the video standard to NTSC and got video playback with sound.
I set up a command line to start vlc with the necessary options. Now to set it up for streaming over my network. If vlc will do what I need, I won't mess with ffmpeg. Thank you very much tonj. You got me in the right direction to understand the audio input. For vlc it is :input-slave="alsa://hw:1,0" |
good you had a breakthrough but I'm puzzled: if vlc works with hw:1,0 then ffmpeg should too because vlc uses ffmpeg. Out of curiosity try swapping the ffmpeg command around a bit:
ffmpeg -f video4linux2 -i /dev/video0 -f alsa -i hw:1,0 -s 720x480 out.mpg |
That worked!!
|
All times are GMT -5. The time now is 10:20 AM. |