1

I am working with gstreamer, mainly playing around with music playback features.

I am currently trying to use RTP to send mp3 streams over our LAN, but unsuccessfully until now.

On sender side I use the following pipeline:

gst-launch -v filesrc location=./my_music_file.mp3 ! ffdemux_mp3 ! rtpmpapay ! udpsink port=6969 host=192.168.0.200

On receiver side I use the following pipeline:

gst-launch -v udpsrc port=6969 caps="application/x-rtp, media=(string)audio, clock-rate=(int)90000, encoding-name=(string)MPA, payload=(int)96, ssrc=(guint)1951256090, clock-base=(guint)1711290778, seqnum-base=(guint)24773" ! rtpmpadepay ! flump3dec ! pulsesink

There is apparently no error as output from receiver side is:

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

...But sound hears strange, is just as if it has been played too fast.

I have tested that audio works by playing mp3 files locally. I have also tested rtp by streaming wav/µLaw files. All this works well.

I have tried also to face problem in other ways, for instance, I have used the following pipeline, taht works well with audiotestsrc/amrnb codec:

gst-launch gstrtpbin name=rtpbin audiotestsrc ! amrnbenc ! rtpamrpay ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 ! udpsink host=192.168.0.200 port=5002 rtpbin.send_rtcp_src_0 ! udpsink port=5003 host=192.168.0.200 sync=false async=false udpsrc port=5005 ! rtpbin.recv_rtcp_sink_1

But when using same pipeline with lame, again on the receiver side there is no error but there is a "too fast" output:

Sender: gst-launch gstrtpbin name=rtpbin audiotestsrc ! lamemp3enc ! rtpmpapay ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 ! udpsink host=192.168.0.200 port=5002 rtpbin.send_rtcp_src_0 ! udpsink port=5003 host=192.168.0.200 sync=false async=false udpsrc port=5005 ! rtpbin.recv_rtcp_sink_1

Receiver: gst-launch -v udpsrc port=5002 caps="application/x-rtp, media=(string)audio, clock-rate=(int)90000, encoding-name=(string)MPA, payload=(int)96" ! rtpmpadepay ! flump3dec ! pulsesink

Could anyone have an idea of what's wrong with my pipelines?

Thank you very much for your support,

Jorge

4

1 回答 1

2

对于那些对此主题感兴趣的人,我对这个问题有部分答案。

在 fatc 中,fluendo 解码器会丢失来自 rtp depay 的良好 mp3 帧。

当我使用疯狂解码器时,我可以接收和听到所有的流。

以下是我用来通过 RTP 进行 mp3 流式传输的管道:

发件人:gst-launch -v filesrc location=./my_file.mp3 !ffdemux_mp3!rtpmpapay !udpsink 端口=6969 主机=192.168.0.200

接收方:gst-launch -v udpsrc port=6969 caps="application/x-rtp, media=(string)audio, clock-rate=(int)90000, encoding-name=(string)MPA, payload=(int) 96 英寸!rtpmpadepay!疯狂的 !脉冲接收器

问题已发布到 Fluendo 团队。

希望这有帮助。

于 2010-10-04T08:43:10.143 回答