I'm working on live streaming server using a custom codec (have to use that, no way around it). Multiple clients will connect with the server to get the live feed. In an ideal world, all clients will be connected via broadband connections and after encoding I can just forward all the encoded frames to each socket in round-robin manner. In real life though, I could have clients connected via high-latency connections as well as slow/mobile connections. This would result in few clients being able to ingest data rapidly whereas others will lag.
Clearly, techniques like round-robin won't work here. Another technique that would work is encoding for each connection, but that would consume excessive CPU on the server side - which isn't acceptable either. Finally, I was thinking of modified h264 i-frame technique. Basically, regardless of content, just add an I-frame every 1-2 seconds. That way a slow consumer will be able to sync up with the rest at every I-frame. Feedback? Are there any standard techniques/algorithms to handle such a scenario?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With