Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k

Multicast Video Traffic RTP vs plain UDP

Is there any difference? , are rtp streams technically any better than plain udp assuming bandwidth not an issue.

Many thanks

7 REPLIES
Hall of Fame Super Blue

Re: Multicast Video Traffic RTP vs plain UDP

ukglobecast wrote:

Is there any difference? , are rtp streams technically any better than plain udp assuming bandwidth not an issue.

Many thanks

Rob

RTP is a protocol built on top of UDP so it's not really a question of whether one is better than the other. UDP is a connectionless protocol which makes no guarantees of delivery, packet acknowledgement etc. If you want those things you use TCP.

So why use UDP at all ? Because it has considerably less overhead than TCP and TCP can introduce unwanted latency to the connection. UDP, because it does not set up the connection as TCP does and because it doesn't ackknowledge packets with sequence numbers etc. is considerably more "efficient" in terms of overhead but at a cost and that cost is reliable delivery.

So if you decide to build your application or protocol on top of UDP you as the developer must build in your own reliable devilery functionality in terms of additional code. You wouldn't have to do this using TCP. However even though you must add your own reliable delivery code you can still make it significantly faster than that supplied by TCP. Hence the reason RTP primarily uses UDP as the underlying transport mechanism.

Jon

Re: Multicast Video Traffic RTP vs plain UDP

Hi Jon,

Thanks for the reply, i basically have a choice of using either , will rtp give me any benefits for video streaming?

Hall of Fame Super Blue

Re: Multicast Video Traffic RTP vs plain UDP

ukglobecast wrote:

Hi Jon,

Thanks for the reply, i basically have a choice of using either , will rtp give me any benefits for video streaming?

Rob

RTP was specifically designed for delivering realtime multimedia and has capabilities built in for detecting out of sequence packets and jitter compensation.

UDP obviously doesn't have any of this.

Personally all things being equal i would use RTP as it was specifically designed for what you are trying to achieve.

Jon

Cisco Employee

Re: Multicast Video Traffic RTP vs plain UDP

Rob,

Jon has provided you already with a wonderful explanation about the UDP/RTP difference. Please let me add my few thoughts on this.

From a programmer's or developer's perspective, the RTP is not another "driver" - just as Jon said, it sits atop of UDP and is usually implemented as a library used from within userspace. What it does is providing you with additional capabilities that the UDP alone cannot provide you with:

  • Identification of the payload type
  • Identification of stream sources in a protocol-neutral way (the SSRC and CSRC fields)
  • Identification of important frames (for sync purposes, for example)
  • Sequencing used to detect lost and reordered segments
  • Timestamping to synchronize and correlate multiple streams (video and audio, for example)

Note however that the RTP does only provide you with these facilities but it is up to you to make use of them. For example, RTP alone won't perform automatic timestamping or sequence number assignment - it is up to your application to provide it. From this perspective, the RTP is like a framework that can be used in different ways, according to developer needs.

If you are not planning to develop a software application but rather having a working solution already that supports both UDP and RTP then it is difficult to say whether using UDP or RTP is going to be better - it depends exclusively on the application whether it is able to make use of the RTP benefits, or whether it merely uses it just as another layer of packaging.

Best regards,

Peter

Hall of Fame Super Blue

Re: Multicast Video Traffic RTP vs plain UDP

Rob

Peter makes a very good point here. If you are not writing an app to use RTP and your existing app does not make use of RTP then UDP can be just as good an alternative for multicasting a video stream.

Jon

Re: Multicast Video Traffic RTP vs plain UDP

im a bit confused regarding apps that support it, say for example, i am using a bog standard app .... vlc, on a server using vlc  i stream rtp , and on a reciever downstream i am using vlc to play stream , are there no inherit rtp benefits at all?

Hall of Fame Super Blue

Re: Multicast Video Traffic RTP vs plain UDP

Rob

VLC does support RTP on the server side so you would get the benefits of RTP -

VLC wiki

To be honest i would test them both to see which performs better.

Jon

23486
Views
5
Helpful
7
Replies
CreatePlease to create content