开发者

Streaming iLBC encoded file via RTP with gstreamer

开发者 https://www.devze.com 2023-01-31 13:54 出处:网络
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 RT

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 e开发者_StackOverflowlement /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?


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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号