Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

unityRenderStreaming3.1.0-exp5 When the video is pushed from unity to web,delay

Discussion in 'Unity Render Streaming' started by wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg, Mar 23, 2023.

  1. wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    Joined:
    Mar 23, 2023
    Posts:
    67
    unityRenderStreaming3.1.0-exp5 When the video is pushed from unity to web,The web side has a significant delaycompared to unity,how to solv it。Next question, In a LAN environment,how to set the parameters of the videostreamder component to achieve the highest display effect,Last question, how do I enable hard coding。thanks a lot。
     
  2. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    The latest version of Unity Render Streaming is exp.6. Please try to update the package.
    It is trade-off between video quality and network bandwidth. Please try to change video parameters in realtime.
    Please check the doc to use Hardware codec. You need to set the "Video Codec" option on VideoStreamSender component.
     
  3. wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    Joined:
    Mar 23, 2023
    Posts:
    67
    • Does choosing H264 mean choosing hardware coding
     
  4. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Yes.
     
  5. wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    Joined:
    Mar 23, 2023
    Posts:
    67
    When the unity application and the web are on the same machine, there is also a 100ms delay in the streaming screen. How can we achieve no screen delay。Is the delay between the Unity screen and the web page unavoidable?
     
  6. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    A 100ms delay is not normal in localhost.
    Video resolution is one of the reason of the latency.
    How to measure the latency?
     
  7. wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    Joined:
    Mar 23, 2023
    Posts:
    67
    1.png
    The RenderStreaming configuration of the project is as above. This is a URP project. For the clarity of the picture, I chose the resolution of 1920*1080 and Increase the bit rate,In my personal tests, streaming latency is inevitable. I got the OS time in Unity, Then put the web screen with the Unity screen to take a screenshot to get latency information
     
    Last edited: Apr 25, 2023
  8. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    It looks no problem to me. What kind of GPU are you using?
     
  9. wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    Joined:
    Mar 23, 2023
    Posts:
    67
    NVIDIA GeForce RTX 3070,What I care about is, when you're testing, are there no delays? Previously, Webrtc 2.3.3-preview was used to push the video stream to the web without delay, and I will give the code in the attachment. Now, after using unityRenderStreaming-3.01-exp.5, the delay is inevitable. So I was wondering if that's true for you, and could you tell me your test results? Thanks!
     

    Attached Files:

  10. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    I assume that the high latency is caused by the video codec.
    You can see the video codec on the Unity CPU profiler

    upload_2023-5-2_13-36-53.png
     
  11. wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    Joined:
    Mar 23, 2023
    Posts:
    67
    Snipaste_2023-05-04_10-09-23.png Video202354101902.gif
    Hello, my analysis tool page and run page display as shown in the figure, is this delay situation normal, Web and Unity on a computer
     
  12. wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    Joined:
    Mar 23, 2023
    Posts:
    67
    The delayed results of the project have been shown. Is this result normal? Are your results the same as mine? This is very important to me, please reply to me as soon as possible, thank you!
     
  13. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Surely the delay of image is long, but it looks no problem in the profiler window.
    I am concerning that the framerate of the video sender and video resolution.
     
  14. wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    Joined:
    Mar 23, 2023
    Posts:
    67
    Is there such a delay when testing your project?
     
  15. wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    Joined:
    Mar 23, 2023
    Posts:
    67
    The commonly used resolution of the project is 1920*1080/2560*1440, and the bit rate interval is set to 5000~100000
     
  16. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    How about HD resolution(1280x720)? If it improved by changing resolution, the reason is graphics performance.
     
  17. wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    Joined:
    Mar 23, 2023
    Posts:
    67
    HD resolution(1280x720) also suffers from latency 录制_2023_05_17_10_08_05_91720235171012101.gif
     
  18. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
  19. wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    wechat_os_Qy02O8KF-s1NNL90pTlxkQhxg

    Joined:
    Mar 23, 2023
    Posts:
    67

    Attached Files:

  20. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803