How to capture audio using v4l2
Charlie X. Liu
charlie at sensoray.com
Mon Jun 9 17:51:08 PDT 2014
In the newer 2.6 and 3.x.y Linux kernels, the audio devices should be as
devices. Then, you would see them like hw:x,0.
For example, if you use a Sensoray Model 811
<http://www.sensoray.com/products/811.htm> or Model 812
<http://www.sensoray.com/products/812.htm> / Model 1012
<http://www.sensoray.com/products/1012.htm> , you could use following
GSTreamer commands to capture audio from different channels:
$ gst-launch-0.10 alsasrc device=hw:1,0 !
audio/x-raw-int,rate=32000,channels=2,depth=16 ! audioconvert! autoaudiosink
( pre-listening, from audio Channel-1 )
$ gst-launch-0.10 alsasrc device=hw:2,0 ! wavenc ! filesink
( capturing raw audio, from audio Channel-2, and saving the data into a
.wav file )
$ gst-launch-0.10 alsasrc device=hw:3,0 ! audioconvert ! vorbisenc ! oggmux
! filesink location=./audio-ch3.ogg
( capturing audio, from audio Channel-3, encoding with vorbis and saving
the data into an .ogg file )
$ gst-launch-0.10 alsasrc device=hw:4,0 ! audio/x-raw-int,rate=
32000,channels=2,depth=16 ! audioconvert! avimux !
( capturing raw audio, from audio Channel-4, using avi muxer and saving
the audio data into an .avi file )
From: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org]
On Behalf Of Baby Octopus
Sent: Sunday, June 08, 2014 8:13 AM
To: gstreamer-devel at lists.freedesktop.org
Subject: How to capture audio using v4l2
I'm wondering to capture audio from a device which supports v4l2. I dont
quite see any audio/x-raw caps in v4l2src element
Can someone please explain?
View this message in context:
Sent from the GStreamer-devel mailing list archive at Nabble.com.
gstreamer-devel mailing list
<mailto:gstreamer-devel at lists.freedesktop.org>
gstreamer-devel at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel