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();
 

Dani

Member
I have changed the createStream to TCP transport and still I get this freeze every 1 min for 2 seconds.
can you recheck (the credentials I gave you still works)
This is not a bandwidth issue - as I both my source and destination are using fiber optic high speed connection.

one hint I might have - I also record the stream- in the recordings there are no lags. so looks like the problem is between the server and the recipient side.
 
Last edited:

Max

Administrator
Staff member
This is not a bandwidth issue - as I both my source and destination are using fiber optic high speed connection.
This is definitely bandwidth issue between server and playing client. You can test the channel on client side while playing: Publisher and player channel quality control
TCP eliminates a packet loss, so the only thing you could do is to decrease a resolution/bitrate for the client, for example, from 720p 1500 kbps to 360p 500 kbps.
 
Top