OBS streaming freezes and latency

Discussion in 'General Discussion' started by Azhar Ali, Jul 4, 2019.

  1. Azhar Ali

    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: Jul 4, 2019
  2. Max

    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.
  3. Azhar Ali

    Azhar Ali Member

    where do i change that "Try to change encoding settings and set x264 ultrafast preset."
  4. Azhar Ali

    Azhar Ali Member

    Does the webhooks work when you stream through OBS?
  5. Max

    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)

    Attached Files:

  6. Azhar Ali

    Azhar Ali Member

    thanks, I will give it a try and let you know. Thanks for the keep alive bit.
  7. Max

    Max Administrator Staff Member

Share This Page