[英]Recieving audio stream with Gstreamer results in reason not negotiated error
I would like to stream audio data from MIC with Gstreamer. 我想使用Gstreamer流式传输来自MIC的音频数据。 However I could not play MIC audio with rx.
但是我无法用rx播放MIC音频。 How can I play audio stream from MIC input?
如何播放来自MIC输入的音频流?
tx: gst-launch-1.0 -v alsasrc device="hw:0" !
tx:gst-launch-1.0 -v alsasrc device =“ hw:0”! decodebin !
解码器! audioconvert !
音频转换! rtpL16pay !
rtpL16pay! queue !
排队! udpsink host=239.0.0.1 auto-multicast=true port=5004
udpsink主机= 239.0.0.1自动多播= true端口= 5004
rx: gst-launch-1.0 udpsrc multicast-group=239.0.0.1 port=5004 caps="application/x-rtp" !
rx:gst-launch-1.0 udpsrc multicast-group = 239.0.0.1 port = 5004 caps =“ application / x-rtp”! rtpL16depay !
rtpL16depay! alsasink
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.
rx结果:将管道设置为PAUSED ...管道处于活动状态,不需要PREROLL ...将管道设置为PLAYING ...新时钟:GstSystemClock错误:来自元素/ GstPipeline:pipeline0 / GstUDPSrc:udpsrc0:内部数据流错误。 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 ...
其他调试信息:../../../../gstreamer-1.8.1/libs/gst/base/gstbasesrc.c(2948):gst_base_src_loop():/ GstPipeline:pipeline0 / GstUDPSrc:udpsrc0:流任务暂停,原因未协商(-4)0:00:00.009364000后执行终止将管道设置为PAUSED ...将管道设置为READY ...将管道设置为NULL ...释放管道...
tx result is as follows. tx结果如下。
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" Red
将管道设置为PAUSED ...管道处于活动状态,不需要PREROLL ...将管道设置为PLAYING ...新时钟:GstAudioSrcClock / GstPipeline:pipeline0 / GstAlsaSrc:alsasrc0:实际缓冲时间= 200000 / GstPipeline:pipeline0 / GstAlsaSrc:alsasrc0:实际延迟时间= 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“红色 istribute 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)au
分配延迟... /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 \\,\\ channel \\ = {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 \\ =(字符串)L16 \\,\\编码参数\\ =(字符串)2 \\,\\通道\\ =(int)2 \\,\\负载\\ =(int)96 \\,\\ ssrc \\ =(uint)3961155089 \\, \\ timestamp-offset \\ =(uint)725507323 \\,\\ seqnum-offset \\ =(uint)20783“ /GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink:caps =” application / x-rtp \\,\\ media \\ = (字串)au dio\\,\\ 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" /Gst
dio \\,\\ clock-rate \\ =(int)44100 \\,\\ encoding-name \\ =(string)L16 \\,\\ encoding-params \\ =(string)2 \\,\\ channels \\ =(int)2 \\,\\有效载荷\\ =(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 \\,\\编码参数\\ =(字符串)2 \\,\\通道\\ =(int)2 \\,\\有效负载\\ =(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“ / Gst Pipeline: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
管道: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. 我认为rx管道是错误的,但是我找不到解决方案。 Please tell me how to make pipeline.
请告诉我如何制作管道。
PS: I tried following command, and rx play the mic audio! PS:我尝试执行以下命令,然后rx播放麦克风音频! This means the reciever device is not able to play L16 audio?
这意味着接收器设备无法播放L16音频?
tx: gst-launch-1.0 -v alsasrc device="hw:0" !
tx:gst-launch-1.0 -v alsasrc device =“ hw:0”! decodebin !
解码器! audioconvert !
音频转换! audioresample !
audioresample! alawenc !
alawenc! rtppcmapay !
rtppcmapay! queue !
排队! udpsink host=239.0.0.1 auto-multicast=true port=5004
udpsink主机= 239.0.0.1自动多播= true端口= 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" !
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,coding-params =(字符串)2,channels =(int)1,payload =(int)8“! rtppcmadepay !
rtppcmadepay! alawdec !
alawdec! alsasink
Alsasink
You need to add the caps in receive, try the following pipeline: 您需要在接收中添加上限,请尝试以下管道:
gst-launch-1.0 udpsrc multicast-group=239.0.0.1 port=5004 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' !
gst-launch-1.0 udpsrc multicast-group = 239.0.0.1 port = 5004 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'! rtpL16depay !
rtpL16depay! audioconvert !
音频转换! alsasink
Alsasink
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.