Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

WebRTC: Control Playout Delay

Discussion in 'Unity Render Streaming' started by JoseDuSv, May 23, 2022.

  1. JoseDuSv

    JoseDuSv

    Joined:
    Jan 1, 2015
    Posts:
    2
    Hello, we are using Unity WebRTC package to broadcast and receive video stream (without sound) between Unity apps and low latency is quite crucial for us.

    Is there any way we can set the Playout Delay WebRTC parameter to 0 to ideally play the frame as soon as possible in the receiver app?
     
  2. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    543
    I have not heard Playout Delay. It looks interesting. We don't support the feature but I would add it into the schedule if it is important.
     
    olavrv likes this.
  3. JoseDuSv

    JoseDuSv

    Joined:
    Jan 1, 2015
    Posts:
    2
    Thanks for the clarification that it's not currently supported. As it's mentioned at the bottom of the documentation, being able to set some lower value can be handy for some scenarios. For example like our case, when low latency is more crucial than possible increased number of dropped frames.
     
  4. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    543
    Thank you for your situation.

    Playout delay has not been standlize by W3C yet.
    https://github.com/w3c/webrtc-pc/issues/2213

    Maybe almost browsers don't support the feature. We need to check that many developers keep to support the feature for long term.
     
  5. JesperSmith

    JesperSmith

    Joined:
    Mar 23, 2018
    Posts:
    19
    I noticed Unity adds about 100ms delay over what I see in chrome/firefox (rough estimate with same stream, two connections, displaying timestamps in the video and making a screenshot).

    Is there any way to control playback delay if there is no audio?
     
  6. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    543
    We are making the new version of Unity Render Streaming which contains availability of configuring of video streaming.
     
  7. JesperSmith

    JesperSmith

    Joined:
    Mar 23, 2018
    Posts:
    19
    Will this also be available int he raw webrtc package? We do not use render streaming, we're piping camera images direclty into Unity for a mixed reality application
     
  8. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    543
  9. billwenchao

    billwenchao

    Joined:
    May 27, 2019
    Posts:
    1
    Interested in this feature too