Sending and receiving RTP audio

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Sending and receiving RTP audio

Matthias Dodt
Hey guys!

I use OSSBuild with Gstreamer 10.7 (Beta4) on Win7 to transmit an audio
test signal via UDP/Multicast. It works, but the sound is awful on the
receiver side.

Sender:
gst-launch -v gstrtpbin name=rtpbin audiotestsrc ! audioconvert !
rtpL16pay ! rtpbin.send_rtp_sink_1 rtpbin.send_rtp_src_1 ! udpsink
port=5002 host=224.0.1.5  rtpbin.send_rtcp_src_1 ! udpsink port=5003
host=224.0.1.5 sync=false async=false udpsrc port=5007 !
rtpbin.recv_rtcp_sink_1

Receiver:
gst-launch -v gstrtpbin name=rtpbin udpsrc uri=udp://224.0.1.5:5002
caps=application/x-rtp,clock-rate=(int)44100,encoding-name=(string)L16,m
edia=(string)audio,channels=(int)1 ! rtpbin.recv_rtp_sink_0 rtpbin. !
rtpL16depay ! audioconvert ! directsoundsink udpsrc
uri=udp://224.0.1.5:5003 ! rtpbin.recv_rtcp_sink_0
rtpbin.send_rtcp_src_0 ! udpsink port=5007 host=224.0.1.5 sync=false
async=false

I think it must have something to do with the 'caps' or a buffer
problem. Any ideas?

Thanks!

Best,

mat
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sending and receiving RTP audio

Kapil Agrawal
Mat,

I think this is related to the data being lost during transmission, as I faced similar issue in one project.
I fixed that by configuring rtppay in such a way that mtu is fixed and of some 1400 bytes.

Not sure if you have similar issue.

Best Luck
Kapil

On Thu, Sep 8, 2011 at 3:04 PM, Matthias Dodt <[hidden email]> wrote:
Hey guys!

I use OSSBuild with Gstreamer 10.7 (Beta4) on Win7 to transmit an audio
test signal via UDP/Multicast. It works, but the sound is awful on the
receiver side.

Sender:
gst-launch -v gstrtpbin name=rtpbin audiotestsrc ! audioconvert !
rtpL16pay ! rtpbin.send_rtp_sink_1 rtpbin.send_rtp_src_1 ! udpsink
port=5002 host=224.0.1.5  rtpbin.send_rtcp_src_1 ! udpsink port=5003
host=224.0.1.5 sync=false async=false udpsrc port=5007 !
rtpbin.recv_rtcp_sink_1

Receiver:
gst-launch -v gstrtpbin name=rtpbin udpsrc uri=udp://224.0.1.5:5002
caps=application/x-rtp,clock-rate=(int)44100,encoding-name=(string)L16,m
edia=(string)audio,channels=(int)1 ! rtpbin.recv_rtp_sink_0 rtpbin. !
rtpL16depay ! audioconvert ! directsoundsink udpsrc
uri=udp://224.0.1.5:5003 ! rtpbin.recv_rtcp_sink_0
rtpbin.send_rtcp_src_0 ! udpsink port=5007 host=224.0.1.5 sync=false
async=false

I think it must have something to do with the 'caps' or a buffer
problem. Any ideas?

Thanks!

Best,

mat
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
www.mediamagictechnologies.com (Gstreamer, ffmpeg, Red5, Streaming)
twitter handle: @gst_kaps
http://www.linkedin.com/in/kapilagrawal

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sending and receiving RTP audio

Wes Miller
Administrator
In reply to this post by Matthias Dodt
Mat,

I had a problem a while back with terrible audio between two boxes using
Linux GST.  There were two things that helped.

1.  Break the caps out of the receiver's udpsrc.  Instead code them as a
caps filter / pipe stage.  No idea why this helped.

        udpsrc uri=udp://224.0.1.5:5002
        !
'caps=application/x-rtp,clock-rate=44100,encoding-name=L16,media=audio,chan
nels=1'
        ! rtpbin.recv_rtp_sink_0


2.  Since I was using alsasink or pulsesink, I was able to specify
sync-false.     Don't think you can do this with directsoundsink,

Also, from the online docs for directsoundsink:

Note that you should almost always use generic audio conversion elements
like audioconvert and audioresample in front of an audiosink to make sure
your pipeline works under all circumstances (those conversion elements will
act in passthrough-mode if no conversion is necessary).




Wes


CONFIDENTIALITY NOTE:

This e-mail and any attachments are confidential. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: [GST-DEVEL]Sending and receiving RTP audio

Matthias Dodt
Wesley!

You are GREAT! The reason for the messy sound was the missing "audioresample" plugin! If I insert it infront of directsoundsink it works perfectly! It is weired though that it works without the "audioresample" if I use UDP transfer only (without gstrtpbin). Another gstreamer lesson learned;-)

Thanks again!!

Best,

mat

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel-bounces+mdodt=[hidden email] [mailto:gstreamer-devel-bounces+mdodt=[hidden email]] Im Auftrag von Wesley J. Miller
Gesendet: 08 September 2011 14:54
An: Discussion of the development of and with GStreamer
Betreff: Re: [GST-DEVEL]Sending and receiving RTP audio

Mat,

I had a problem a while back with terrible audio between two boxes using Linux GST.  There were two things that helped.

1.  Break the caps out of the receiver's udpsrc.  Instead code them as a caps filter / pipe stage.  No idea why this helped.

        udpsrc uri=udp://224.0.1.5:5002
        !
'caps=application/x-rtp,clock-rate=44100,encoding-name=L16,media=audio,chan
nels=1'
        ! rtpbin.recv_rtp_sink_0


2.  Since I was using alsasink or pulsesink, I was able to specify
sync-false.     Don't think you can do this with directsoundsink,

Also, from the online docs for directsoundsink:

Note that you should almost always use generic audio conversion elements like audioconvert and audioresample in front of an audiosink to make sure your pipeline works under all circumstances (those conversion elements will act in passthrough-mode if no conversion is necessary).




Wes


CONFIDENTIALITY NOTE:

This e-mail and any attachments are confidential. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: Sending and receiving RTP audio

Matthias Dodt
In reply to this post by Kapil Agrawal
Hi Kapil!
 
Thanks for the hint! It turned out (thanks to wesley) that the reason was the missing audioresample plugin (before directsoundsink). I think dropped packets shouldn't be a problem in my scenario (GBit switch and just 2 PCs connected). But still i will keep that MTU-related problem in mind-
 
Thanks!
 
cheers
 
mat


Von: gstreamer-devel-bounces+mdodt=[hidden email] [mailto:gstreamer-devel-bounces+mdodt=[hidden email]] Im Auftrag von Kapil Agrawal
Gesendet: 08 September 2011 11:48
An: Discussion of the development of and with GStreamer
Betreff: Re: Sending and receiving RTP audio

Mat,

I think this is related to the data being lost during transmission, as I faced similar issue in one project.
I fixed that by configuring rtppay in such a way that mtu is fixed and of some 1400 bytes.

Not sure if you have similar issue.

Best Luck
Kapil

On Thu, Sep 8, 2011 at 3:04 PM, Matthias Dodt <[hidden email]> wrote:
Hey guys!

I use OSSBuild with Gstreamer 10.7 (Beta4) on Win7 to transmit an audio
test signal via UDP/Multicast. It works, but the sound is awful on the
receiver side.

Sender:
gst-launch -v gstrtpbin name=rtpbin audiotestsrc ! audioconvert !
rtpL16pay ! rtpbin.send_rtp_sink_1 rtpbin.send_rtp_src_1 ! udpsink
port=5002 host=224.0.1.5  rtpbin.send_rtcp_src_1 ! udpsink port=5003
host=224.0.1.5 sync=false async=false udpsrc port=5007 !
rtpbin.recv_rtcp_sink_1

Receiver:
gst-launch -v gstrtpbin name=rtpbin udpsrc uri=udp://224.0.1.5:5002
caps=application/x-rtp,clock-rate=(int)44100,encoding-name=(string)L16,m
edia=(string)audio,channels=(int)1 ! rtpbin.recv_rtp_sink_0 rtpbin. !
rtpL16depay ! audioconvert ! directsoundsink udpsrc
uri=udp://224.0.1.5:5003 ! rtpbin.recv_rtcp_sink_0
rtpbin.send_rtcp_src_0 ! udpsink port=5007 host=224.0.1.5 sync=false
async=false

I think it must have something to do with the 'caps' or a buffer
problem. Any ideas?

Thanks!

Best,

mat
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
www.mediamagictechnologies.com (Gstreamer, ffmpeg, Red5, Streaming)
twitter handle: @gst_kaps
http://www.linkedin.com/in/kapilagrawal

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel