stream freezes every ~30 seconds for 2 seconds

Dani

Member
I have a problem with the stream once I connect it to another user:
when I connect to the server (and see my own stream) everything works ok.
on the other side the stream get frozen every minute for few seconds.

how can I figure out what is causing this and how to fix it ?
(upload is wide open at 30mbps)
 

Max

Administrator
Staff member
We checked the streaming on your server by publishing and playing (using a different workstations) in Media Devices example a WebRTC stream 1280x720, bitrate 1500-3000 kbps, fps 30 using VP8 (according to your server publishing logs).
When using TCP transport, there are no visual freezes, Nack Count and Packets Lost are not grow at players side
1674698936216.png

When using UDP transport (according to server logs and settings), Nack Count and Packets Lost are noticeable qrowing at player side, and visual freezes occur
1674699239734.png

So seems like a users channel quality or bandwidth is not enough to play a stream smoothly, but your channel is.
Please try to switch to TCP transport on player side
Code:
session.createStream({
    name: streamName,
    display: remoteVideo,
    transport: "TCP"
    ...
}).play();
If this does not help, use lower bitrate/resolution to play (in this case, transcoding on server will be enabled for the stream)
Code:
session.createStream({
    name: streamName,
    display: remoteVideo,
    transport: "TCP",
    constraints: {
        audio:true,
        video: {
             width: 640,
             height: 360,
             bitrate: 500
        }
    }
    ...
}).play();
 
Top