views:

32

answers:

1

Hello All,

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

A: 

Hi again,

For those who would be interested in this topic, I have a partial answer of the problem.

In fatc, it is fluendo decoder which losses good mp3 frames coming from rtp depay.

When I use mad decoder, I can receive and hear all the stream.

Here are the pipelines I use to do mp3 streaming over RTP:

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

Receiver: 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 ! mad ! pulsesink

Problem has been posted to fluendo team.

Hope this help.

Jorge