09-14-2010 01:22 AM - edited 03-06-2019 12:57 PM
Is there any difference? , are rtp streams technically any better than plain udp assuming bandwidth not an issue.
Many thanks
09-14-2010 04:42 AM
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
09-14-2010 04:59 AM
Hi Jon,
Thanks for the reply, i basically have a choice of using either , will rtp give me any benefits for video streaming?
09-14-2010 05:02 AM
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
09-14-2010 05:27 AM
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:
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
09-14-2010 09:59 AM
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
09-14-2010 01:07 PM
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?
09-14-2010 01:21 PM
Rob
VLC does support RTP on the server side so you would get the benefits of RTP -
To be honest i would test them both to see which performs better.
Jon
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide