What can I do to make connecting and start playing faster

nathvela

Member
The average time it takes from page load to seeing a picture in the video is 7 seconds on my end. How can I lessen this? Is there a setting to fine tune the create session pang play video process so it loads faster?
 

Max

Administrator
Staff member
Good day.
According to you previous posts, you're publishsing stream from RTMP encoder, In this case, you should set interval for keyframes to be sent more often. For example, in OBS settings:
1610937820118.png

You can also switch to TCP transport for WebRTC playback to reduce packet loss
Code:
session.createStream({
    name: streamName,
    display: remoteVideo,
    transport: "TCP"
}).on(STREAM_STATUS.PENDING, function (stream) {
...
}).play();
Additionally, please check if publisher and player channel bandwidth is enough for stream reolution and bitrate (using iperf for example as described here)
 

nathvela

Member
hello,

Thank you for your reply.

Just to clarify, I am publishing using webrtc using your websdk in this case. We are experimenting on different scenarios. But this one case if using webrtc not rtmp.


Nat
 

Max

Administrator
Staff member
Just to clarify, I am publishing using webrtc using your websdk in this case.
For futher questions, please clarify your case when starting a new forum thread.
While publishing WebRTC from browser, there's no settings in browser to change the keyframe interval. This can be done on server side only with the following parameter in flashphoner.properties file
Code:
periodic_fir_request=true
In this case, server will request keyframe from browser every 5 seconds (by default), so pause between page load and picture displaying will be no more than 5 seconds. To reduce this interval, use the following parameter
Code:
periodic_fir_request_interval=3000
In this case, keyframe interval will be 3 seconds.
 
Top