使用 gstreamer 通过 RTP 流式传输 iLBC 编码文件

发布于 2024-10-08 08:32:14 字数 1490 浏览 7 评论 0原文

我正在尝试构建一个 gstreamer 管道来使用 iLBC 编解码器创建 RTP 音频流。 Gstreamer(自版本 0.10 起)有一个名为 rtpilbcpay 的 RTP 有效负载管道元素。不幸的是,仅实现了 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 编码文件(队列缓冲区也没有帮助):

~/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 ...

这只是一个错误还是管道设置错误(我希望是后者)?管道中还需要哪些其他“粘合”元素?

I'm trying to build a gstreamer pipeline to create an RTP audio stream with iLBC codec. Gstreamer (as of version 0.10) has an RTP payloader pipeline element called rtpilbcpay. Unfortunately only the RTP packetizing is implemented, the codec itself is not included in gstreamer. Using the reference code in RFC 3951 I created iLBC encoded files for sample audio that I hoped to be able to use with gstreamer. However, when I pipe those files into rtpilbcpay I end up with errors. I "dumbed" down the pipe to the minimum using fakesink, the error is still the same:

~/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 ...

I'm probably missing a crucial part (file format declaration?) in the pipeline, as I was similarly unable to play back a PCMU encoded file (queue buffers didn't help either):

~/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 ...

Is this simply a bug or is the pipeline setup wrong (I hope it's the latter)? What further "glue" elements do I need in the pipeline?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

扶醉桌前 2024-10-15 08:32:14

确实我错过了一些东西。添加正确的 MIME 类型和其他一些属性后,我可以成功地将文件传输到 RTP 负载器中:

~/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

Indeed I was missing something. Once I added the correct MIME-type and some other attributes I could successfully pipe the file into the 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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文