Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I recenlty started working on a streaming app (c#). I made the general design but I'm still unceartin of the protocol I will use. I read that UDP is the most preffered choice for video streaming (because of speed I guess). and I've watched this video
TCP vs UDP For Video Streaming - YouTube[^] and in the video it's obvious that tcp is the better choice. So is there something I am missing ?
Thank you.

What I have tried:

I've read a few articles and looked at some projects on code project
Posted
Updated 21-Apr-21 1:52am

The main issue is that UDP messages are not guaranteed to be delivered, or delivered in the correct order. Whereas TCP message are guaranteed to be delivered and in the correct order. So if you use UDP you need to add your own message control to ensure that you receive everything in the correct order. For a streaming service that is quite a lot of extra work.
 
Share this answer
 
Video streaming usually uses the Real-Time Streaming Protocol[^]. As Richard pointed out, UDP will force you to handle packets that get lost or arrive out of order. And TCP is too inefficient for streaming. RTSP was invented to address these problems.

Another option is the Real-Time Transport Protocol[^] (RTP).

You might be able to find an open-source implementation of either of these if you look around on GitHub. Failing that, you'd have to implement one yourself, but you were planning to do that kind of work anyway. This way, at least you'll have a standard to follow.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900