Hi friends. Some of the video producers in my use case come from mobile internet clients prone to some degree of packet loss. It’s not really a big deal, I just wanted to get an idea how you’ve all approached this problem to make sure I’m doing it the right way.
From perusing the forum and looking at mediasoup-examples it seems that UDP is generally the preferred transport medium:
createWebRtcTransport (
enableTcp: true,
enableUdp: true,
preferUdp: true
)
I’ve done some testing simulating poor network conditions (randomly dropped packets) with both TCP and UDP sendtransports (single stream, no SVC or simulcast). The video bitrate is throttled down in both cases. With UDP the video framerate becomes intermittently choppy (dropped frames?) until the network stabilizes (and then the bitrate ramps back up). With TCP, the framerate remains stable despite packet loss (preferable), however the bitrate stays low even after network stabilization (undesirable).
Two questions;
- Should I retain the preferUdp option, or is it best to let the client choose (renegotiate?) the optimal ICE candidate?
- Is there any way to promote bitrate recovery for TCP transports once network conditions improve?