OBS streaming freezes and latency

Azhar Ali

Member
Hi,
We have WebRTC solution built using flashphoner and would like to allow our users to stream using rtmp to WebRTC.
I am just testing this on live server using OBS to stream and playing in the player in the demo app shipped with flashphoner. The issue I am facing is stream in the player would freeze for 10-20 seconds and latency is also 30 plus seconds.
Other thing I want to check is how to get the webhooks working when someone start streaming using OBS. We already have webhook when you stream using sdk to authenticate.
We have implemented connect, publishStream,stopStream, StreamStatusEvents

Anything we can do to stop that happening?
 
Last edited:

Max

Administrator
Staff member
Hello

There are two OBS streamers: OBS RTMP, OBS WebRTC (customized).
You are using OBS RTMP.
Try to change encoding settings and set x264 ultrafast preset.
It should decrease latency and freezing.

We have also customized OBS WebRTC for low-latency streaming.
Planning to release next week.
 

Max

Administrator
Staff member
Attached screenshot Settings - x264 ultrafast. Please check.
Yes REST hooks works for OBS too. When you publish RTMP stream to server, REST hooks sent to flashStreamingApp URL
Type CLI command:
Code:
show apps -d
to see actual URL for flashStreamingApp REST hook

One major detail. OBS does not support RTMP keep alives at least in versions we were testing.
So you have to disable RTMP keep alives in flashphoner.properties
If you leave keep alive enabled, OBS connection will be rejected by keep alive after 60 seconds.

Code:
keep_alive.enabled=websocket
this setting will not enable RTMP keep alive (defaults keep_alive.enabled=websocket,rtmp,rtmfp)
 

Attachments

Top