I would like to stream audio data from MIC with Gstreamer. However I could not play MIC audio with rx. How can I play audio stream from MIC input?
tx: gst-launch-1.0 -v alsasrc device="hw:0" ! decodebin ! audioconvert ! rtpL16pay ! queue ! udpsink host=239.0.0.1 auto-multicast=true port=5004
rx: gst-launch-1.0 udpsrc multicast-group=239.0.0.1 port=5004 caps="application/x-rtp" ! rtpL16depay ! alsasink
rx result: Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal data flow error. Additional debug info: ../../../../gstreamer-1.8.1/libs/gst/base/gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: streaming task paused, reason not-negotiated (-4) Execution ended after 0:00:00.009364000 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...
tx result is as follows.
Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstAudioSrcClock /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000 /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000 /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps = "audio/x-raw\,\ format\=(string)S16LE\,\ layout\=(string)interleaved\,\ rate\=(int)44100\,\ channels\=(int)2\,\ channel-mask\=(bitmask)0x0000000000000003" /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = "audio/x-raw\,\ format\=(string)S16LE\,\ layout\=(string)interleaved\,\ rate\=(int)44100\,\ channels\=(int)2\,\ channel-mask\=(bitmask)0x0000000000000003" /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = "audio/x-raw\,\ format\=(string)S16LE\,\ layout\=(string)interleaved\,\ rate\=(int)44100\,\ channels\=(int)2\,\ channel-mask\=(bitmask)0x0000000000000003" Redistribute latency... /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = "audio/x-raw\,\ layout\=(string)interleaved\,\ rate\=(int)44100\,\ format\=(string)S16BE\,\ channels\=(int)2\,\ channel-mask\=(bitmask)0x0000000000000003" /GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0.GstPad:src: caps = "application/x-rtp\,\ media\=(string)audio\,\ clock-rate\=(int)44100\,\ encoding-name\=(string)L16\,\ encoding-params\=(string)2\,\ channels\=(int)2\,\ payload\=(int)96\,\ ssrc\=(uint)3961155089\,\ timestamp-offset\=(uint)725507323\,\ seqnum-offset\=(uint)20783" /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "application/x-rtp\,\ media\=(string)audio\,\ clock-rate\=(int)44100\,\ encoding-name\=(string)L16\,\ encoding-params\=(string)2\,\ channels\=(int)2\,\ payload\=(int)96\,\ ssrc\=(uint)3961155089\,\ timestamp-offset\=(uint)725507323\,\ seqnum-offset\=(uint)20783" /GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = "application/x-rtp\,\ media\=(string)audio\,\ clock-rate\=(int)44100\,\ encoding-name\=(string)L16\,\ encoding-params\=(string)2\,\ channels\=(int)2\,\ payload\=(int)96\,\ ssrc\=(uint)3961155089\,\ timestamp-offset\=(uint)725507323\,\ seqnum-offset\=(uint)20783" /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "application/x-rtp\,\ media\=(string)audio\,\ clock-rate\=(int)44100\,\ encoding-name\=(string)L16\,\ encoding-params\=(string)2\,\ channels\=(int)2\,\ payload\=(int)96\,\ ssrc\=(uint)3961155089\,\ timestamp-offset\=(uint)725507323\,\ seqnum-offset\=(uint)20783" /GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0.GstPad:sink: caps = "audio/x-raw\,\ layout\=(string)interleaved\,\ rate\=(int)44100\,\ format\=(string)S16BE\,\ channels\=(int)2\,\ channel-mask\=(bitmask)0x0000000000000003" /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = "audio/x-raw\,\ format\=(string)S16LE\,\ layout\=(string)interleaved\,\ rate\=(int)44100\,\ channels\=(int)2\,\ channel-mask\=(bitmask)0x0000000000000003" /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad1: caps = "audio/x-raw\,\ format\=(string)S16LE\,\ layout\=(string)interleaved\,\ rate\=(int)44100\,\ channels\=(int)2\,\ channel-mask\=(bitmask)0x0000000000000003" /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink: caps = "audio/x-raw\,\ format\=(string)S16LE\,\ layout\=(string)interleaved\,\ rate\=(int)44100\,\ channels\=(int)2\,\ channel-mask\=(bitmask)0x0000000000000003" /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink: caps = "audio/x-raw\,\ format\=(string)S16LE\,\ layout\=(string)interleaved\,\ rate\=(int)44100\,\ channels\=(int)2\,\ channel-mask\=(bitmask)0x0000000000000003" /GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0: timestamp = 725507323 /GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0: seqnum = 20783
I think rx pipeline is wrong, but I could not find the solution. Please tell me how to make pipeline.
PS: I tried following command, and rx play the mic audio! This means the reciever device is not able to play L16 audio?
tx: gst-launch-1.0 -v alsasrc device="hw:0" ! decodebin ! audioconvert ! audioresample ! alawenc ! rtppcmapay ! queue ! udpsink host=239.0.0.1 auto-multicast=true port=5004
rx: gst-launch-1.0 udpsrc multicast-group=239.0.0.1 port=5004 caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMA, encoding-params=(string)2, channels=(int)1, payload=(int)8" ! rtppcmadepay ! alawdec ! alsasink