Best practices with video resolution and frame rate

Dani

Member
If my site uses many different cameras (from each "user")
what is the best practice for 2 way streaming regarding resolution and frame rate ?
should I create a stream based on each camera settings or create fixed settings for all streams ?

If the camera is 30 fps and I set a stream to be 25 fps will it cause issues / lags ?
 

Max

Administrator
Staff member
Good day.
It's a good question.
Usually, you should adjust resolution and framerate depending on user channel. So you can set for example 720p/25fps, then check a channel using this method and, if quality is mostly BAD, republish a stream with a lower parameters (360p/25fps)
Most of cameras support a standard fps values (30 fps and below at resolution 1080p or 720p). There are some cameras however which claim to support 1080p/30fps but actually publish only 5fps at this resolution. Also, there are som VR cameras (Terpon for example) which supports strictly 24 fps due to hardware issues. In this case, a picture can be corrupted, so you should allow user to choose fps from allowed list and recommend to do this to fix the issue.
 

Dani

Member
I will try. I see something - that I'm not sure what is the source of this:
every 60-90 the video stream freeze for 2 seconds and than continues. sound stream is ok. any idea how to fix this ?
 

Max

Administrator
Staff member
every 60-90 the video stream freeze for 2 seconds and than continues. sound stream is ok. any idea how to fix this ?
This may be channel bandwidth issue (TCP transport and lower resolution may help in this case). Another possible reason is client browser performance issue: clients PC CPU or GPU is not enough to encode video stream. In this case, either the client should upgrade hardware or resolution/bitrate/fps should be lowered.
At server side, incoming stream buffering may be set up to prevent such freezes for RTMP streams only. For WebRTC, there is no any buffering because WebRTC is realtime.
 
Top