我正在尝试使用iLBC编解码器构建一个gstreamer管道来创建RTP音频流。 Gstreamer(从版本0.10开始)有一个名为rtpilbcpay
的RTP payloader管道元素。不幸的是,只实现了RTP打包,编解码器本身不包含在gstreamer中。使用RFC 3951中的参考代码,我为样本音频创建了iLBC编码文件,我希望能够与gstreamer一起使用。但是,当我将这些文件传输到rtpilbcpay
时,我最终会出错。我使用fakesink
将管道“愚蠢”降到最低,错误仍然相同:
~/tmp% gst-launch-0.10 filesrc location=sample.ilbc ! rtpilbcpay ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstRTPILBCPay:rtpilbcpay0: Element doesn't implement handling of this stream. Please file a bug.
Additional debug info:
gstbasertpaudiopayload.c(909): gst_base_rtp_audio_payload_handle_buffer (): /GstPipeline:pipeline0/GstRTPILBCPay:rtpilbcpay0:
subclass did not configure us properly
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
我可能在管道中缺少一个关键部分(文件格式声明?),因为我同样无法播放PCMU编码文件(queue
缓冲区也没有帮助):
~/tmp% gst-launch-0.10 filesrc location=sample.pcmu ! mulawdec ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2550): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
这只是一个错误还是管道设置错误(我希望它是后者)?我需要在管道中进一步“粘合”哪些元素?
答案 0 :(得分:2)
确实我错过了一些东西。一旦我添加了正确的MIME类型和其他一些属性,我就可以成功地将文件传输到RTP payloader中:
~/tmp% gst-launch-0.10 filesrc location=sample.ilbc \
! 'audio/x-iLBC,rate=8000,channels=1,mode=20' \
! rtpilbcpay ! udpsink host=192.168.10.23 port=5555