我在BeagleBone Black上运行Gstreamer音频多播RTP时出错。
这是Gstreamer TX 命令:
# gst-launch-1.0 -v filesrc location="test.wav" ! decodebin ! audioconvert ! rtpL16pay ! queue ! udpsink host=224.0.0.10 auto-multicast=true port=5555 --gst-debug-level=3
将管道设置为PAUSED ...管道是PREROLLING ... /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = audio / x-wav /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = NULL 0:00:00.300210292 23288 0x75490 FIXME
默认 gstutils.c:3648:gst_pad_create_stream_id_printf_valist: 创建随机stream-id,考虑实现确定性方法 创建流ID /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstWavParse:wavparse0.GstPad:src: caps = audio / x-raw,format =(string)S16LE,layout =(string)interleaved, channels =(int)2,channel-mask =(bitmask)0x0000000000000003, 率=(int)的48000 /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src:cap = audio / x-raw,layout =(string)interleaved,rate =(int)48000,format =(string)S16BE,channels =(int)2, 通道掩模=(位掩码)0x0000000000000003 /GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0.GstPad:src:caps = application / x-rtp,media =(string)audio,clock-rate =(int)48000, encoding-name =(string)L16,encoding-params =(string)2,channels =(int)2, payload =(int)96,ssrc =(uint)3613934853, timestamp-offset =(uint)2678744220,seqnum-offset =(uint)28780 /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src:caps = application / x-rtp,media =(string)audio,clock-rate =(int)48000, encoding-name =(string)L16,encoding-params =(string)2,channels =(int)2, payload =(int)96,ssrc =(uint)3613934853, timestamp-offset =(uint)2678744220,seqnum-offset =(uint)28780 /GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink:caps = application / x-rtp,media =(string)audio,clock-rate =(int)48000, encoding-name =(string)L16,encoding-params =(string)2,channels =(int)2, payload =(int)96,ssrc =(uint)3613934853, timestamp-offset =(uint)2678744220,seqnum-offset =(uint)28780 /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink:caps = application / x-rtp,media =(string)audio,clock-rate =(int)48000, encoding-name =(string)L16,encoding-params =(string)2,channels =(int)2, payload =(int)96,ssrc =(uint)3613934853, timestamp-offset =(uint)2678744220,seqnum-offset =(uint)28780 /GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0.GstPad:sink:caps = audio / x-raw,layout =(string)interleaved,rate =(int)48000, format =(string)S16BE,channels =(int)2, 通道掩模=(位掩码)0x0000000000000003 /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink:cap = audio / x-raw,format =(string)S16LE,layout =(string)interleaved,channels =(int)2,channel-mask =(bitmask)0x0000000000000003, 率=(int)的48000 /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad1: caps = audio / x-raw,format =(string)S16LE,layout =(string)interleaved, channels =(int)2,channel-mask =(bitmask)0x0000000000000003, rate =(int)48000 / GstPipeline:pipeline0 / GstRtpL16Pay:rtpl16pay0: timestamp = 2678744220 / GstPipeline:pipeline0 / GstRtpL16Pay:rtpl16pay0: seqnum = 28780管道已PREROLLED ...将管道设置为PLAYING ...新时钟:GstSystemClock
Gstreamer RX 命令:
# gst-launch-1.0 -v udpsrc multicast-group=224.0.0.10 auto-multicast=true port=5555 caps='application/x-rtp, media=(string)audio, clock-rate=(int)48000, encoding-name=(string)L16, encoding-params=(string)2, channels=(int)2, payload=(int)96' ! rtpL16depay ! audioconvert ! alsasink --gst-debug-level=3
将管道设置为PAUSED ...管道是实时的,不需要 PREROLL ...将管道设置为PLAYING ...新时钟:GstSystemClock /GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src:caps = application / x-rtp,media =(string)audio,clock-rate =(int)48000, encoding-name =(string)L16,encoding-params =(string)2,channels =(int)2, 有效载荷=(INT)96 /GstPipeline:pipeline0/GstRtpL16Depay:rtpl16depay0.GstPad:src:caps = audio / x-raw,format =(string)S16BE,layout =(string)interleaved, rate =(int)48000,channels =(int)2, channel-mask =(bitmask)0x0000000000000003 0:00:00.357371500 23249
0xefb20 WARN alsa conf.c:4694:snd_config_expand: alsalib错误:未知参数{AES0 0x02 AES1 0x82 AES2 0x00 AES3 0x02} 0:00:00.358214833 23249 0xefb20 WARN alsa pcm.c:2239:snd_pcm_open_noupdate:alsalib错误:未知的PCM 默认值:{AES0 0x02 AES1 0x82 AES2 0x00 AES3 0x02} /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src:cap = audio / x-raw,layout =(string)interleaved,rate =(int)48000,format =(string)S16LE,channels =(int)2, 通道掩模=(位掩码)0x0000000000000003 /GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink:caps = audio / x-raw,layout =(string)interleaved,rate =(int)48000, format =(string)S16LE,channels =(int)2, 通道掩模=(位掩码)0x0000000000000003 /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink:cap = audio / x-raw,format =(string)S16BE,layout =(string)interleaved,rate =(int)48000,channels =(int)2, 通道掩模=(位掩码)0x0000000000000003 /GstPipeline:pipeline0/GstRtpL16Depay:rtpl16depay0.GstPad:sink:caps = application / x-rtp,media =(string)audio,clock-rate =(int)48000, encoding-name =(string)L16,encoding-params =(string)2,channels =(int)2, payload =(int)96 0:00:08.472125917 23249 0xefb20 WARN
audiobasesink gstaudiobasesink.c:1593:gst_audio_base_sink_get_alignment: 音频时间戳为+0:00:00.010583333的意外不连续, resyncing 0:00:51.970270047 23249 0xefb20警告
audiobasesink gstaudiobasesink.c:1593:gst_audio_base_sink_get_alignment: 音频时间戳为+0:00:00.002729166的意外不连续, resyncing 0:00:51.982288589 23249 0xefb20警告
audiobasesink gstaudiobasesink.c:1593:gst_audio_base_sink_get_alignment: 音频时间戳为+0:00:00.010437500的意外不连续, resyncing 0:00:52.010382256 23249 0xefb20警告
audiobasesink gstaudiobasesink.c:1593:gst_audio_base_sink_get_alignment: 音频时间戳为+0:00:00.006937500的意外不连续, resyncing 0:00:52.029231922 23249 0xefb20 WARN
audiobasesink gstaudiobasesink.c:1593:gst_audio_base_sink_get_alignment: 音频时间戳为+0:00:00.007354166的意外不连续, 重新同步
如上所示,警告会打印到控制台,音频会破裂并产生噪音:
audiobasesink gstaudiobasesink.c:1593:gst_audio_base_sink_get_alignment:+ x:xx:xx.xxxxxxxxx的音频时间戳意外不连续,重新同步
有什么想法解决这个问题?
感谢您的阅读。
请注意,两台Gstreamer命令都在同一台机器上运行。它实际上就像一个本地音频环回。
答案 0 :(得分:0)
我认为你想在接收方那边Retain
。 UDP不保证数据包到达时的顺序,这个元素会处理它。