<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:CourierPS;
panose-1:2 7 6 9 2 2 5 2 4 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.5pt;
font-family:Consolas;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:Consolas;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoPlainText>In the newer 2.6 and 3.x.y Linux kernels, the audio devices should be as <a href="http://en.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture">ALSA</a> devices. Then, you would see them like hw:x,0. <o:p></o:p></p><p class=MsoPlainText>For example, if you use a Sensoray <a href="http://www.sensoray.com/products/811.htm">Model 811</a> or <a href="http://www.sensoray.com/products/812.htm">Model 812</a> / <a href="http://www.sensoray.com/products/1012.htm">Model 1012</a>, you could use following GSTreamer commands to capture audio from different channels:<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:CourierPS'>$ gst-launch-0.10 alsasrc device=hw:1,0 ! audio/x-raw-int,rate=32000,channels=2,depth=16 ! audioconvert! autoaudiosink<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:CourierPS'> ( pre-listening, from audio Channel-1 )<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:CourierPS'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:CourierPS'>$ gst-launch-0.10 alsasrc device=hw:2,0 ! wavenc ! filesink location=./audio-ch2.wav<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:CourierPS'> ( capturing raw audio, from audio Channel-2, and saving the data into a .wav file )<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:CourierPS'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:CourierPS'>$ gst-launch-0.10 alsasrc device=hw:3,0 ! audioconvert ! vorbisenc ! oggmux ! filesink location=./audio-ch3.ogg<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:CourierPS'> ( capturing audio, from audio Channel-3, encoding with vorbis and saving the data into an .ogg file )<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:CourierPS'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:CourierPS'>$ gst-launch-0.10 alsasrc device=hw:4,0 ! audio/x-raw-int,rate= 32000,channels=2,depth=16 ! audioconvert! avimux ! <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:CourierPS'>filesink location=./audio-ch4.avi<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:CourierPS'> ( capturing raw audio, from audio Channel-4, using avi muxer and saving the audio data into an .avi file )</span><o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>-----Original Message-----<br>From: gstreamer-devel [mailto:gstreamer-devel-bounces@lists.freedesktop.org] On Behalf Of Baby Octopus<br>Sent: Sunday, June 08, 2014 8:13 AM<br>To: gstreamer-devel@lists.freedesktop.org<br>Subject: How to capture audio using v4l2<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Hi,<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I'm wondering to capture audio from a device which supports v4l2. I dont quite see any audio/x-raw caps in v4l2src element<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Can someone please explain?<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>~BO<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>--<o:p></o:p></p><p class=MsoPlainText>View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/How-to-capture-audio-using-v4l2-tp4667420.html"><span style='color:windowtext;text-decoration:none'>http://gstreamer-devel.966125.n4.nabble.com/How-to-capture-audio-using-v4l2-tp4667420.html</span></a><o:p></o:p></p><p class=MsoPlainText>Sent from the GStreamer-devel mailing list archive at Nabble.com.<o:p></o:p></p><p class=MsoPlainText>_______________________________________________<o:p></o:p></p><p class=MsoPlainText>gstreamer-devel mailing list<o:p></o:p></p><p class=MsoPlainText><a href="mailto:gstreamer-devel@lists.freedesktop.org"><span style='color:windowtext;text-decoration:none'>gstreamer-devel@lists.freedesktop.org</span></a><o:p></o:p></p><p class=MsoPlainText><a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"><span style='color:windowtext;text-decoration:none'>http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</span></a><o:p></o:p></p></div></body></html>