How to handle a slow consumer / client connected to a live streaming server

I am working on a streaming streaming server using my own codec (I need to use it in no way). Several clients will connect to the server to receive a live channel. In an ideal world, all clients will be connected via broadband connections, and after encoding, I can simply encode all encoded frames into each socket in a round-robin fashion. However, in real life, I could connect clients through high latency connections as well as slow / mobile connections. This will cause several clients to swallow data quickly, while others will lag behind.

Obviously, methods like round-robin do not work here. Another method that will work is encoding for each connection, but it will consume excessive server-side processor - which is also unacceptable. Finally, I thought about the modified h264 i-frame technique. Basically, regardless of content, just add an I-frame every 1-2 seconds. Thus, a slow consumer will be able to synchronize with the others on each I-frame. Feedback? Are there standard methods / algorithms for handling such a scenario?

+7
algorithm architecture video-streaming network-programming
source share
1 answer
  • You will need at least 2 encodings of normal (high bandwidth) and less (low bandwidth) encodings.
  • Using .NET 4.5 await / async syntax with socket. * Async methods can also cause some extra performance, rather than using synchronous round robin sockets, using IO I / O ports and less blocking. (SO example: fooobar.com/questions/169827 / ... )
  • Finally, to find out whether to serve your customers a high or low bandwidth version without implementing adaptive streaming.
    • Give the user a choice
    • Carry out a bandwidth test, send an echo request to the client with 128 KB of data and use the sent time and return time to find out if the client was fast enough for the high-bandwidth version or not.
+2
source share

All Articles