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. The 2023.1 beta is now available for testing. To find out what's new, have a look at our 2023.1 feature highlights.
    Dismiss Notice

Question Questions about the sample scene

Discussion in 'Unity Render Streaming' started by VolvoCarsMrX, Aug 27, 2021.

  1. VolvoCarsMrX

    VolvoCarsMrX

    Joined:
    May 5, 2020
    Posts:
    7
    Hi,

    I am testing out the Render Streaming sample package with the sample scene provided but got a few questions.

    Unity Editor Version: 2019.4.19f1
    RenderStreaming version: 3.1.0-exp.1
    Hosting environment: Windows 10 64bit, with NVidia P5000 (driver 471.68)

    Q1: Why the two-camera setup?

    Q2: When I try to remove the second camera from the scene, streaming stops working.

    Q3: When I try to open it from multiple browsers on multiple devices at the same time, the first client gets control/input of the camera1 and the second client gets control of camera2. Then a 3rd web client gets no control. If I refresh any of the web pages now, it will steal the control of camera1, so the other clients lose all control. I would love to understand the mechanism behind this.

    Thanks!
     
  2. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    575
  3. VolvoCarsMrX

    VolvoCarsMrX

    Joined:
    May 5, 2020
    Posts:
    7
    Thanks for the guidance!

    I tried to modify the webapp but it wasn't as straightforward as commenting out some code.

    Then I realized that the multi-camera setup was introduced in version 2.0.0, so I downgraded it to 1.2.2 and both the webapp and the sample scene was more close to my use case.

    However, the stability of the connection became much worse. The connection is failing to be establish with following error message:

    Code (JavaScript):
    1. Uncaught (in promise) DOMException: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Error processing ICE candidate
     
  4. QiannanWei

    QiannanWei

    Joined:
    Sep 2, 2021
    Posts:
    5
    About the Q1 and Q2,you can modify the main and video-player in UnityRenderStreaming-release-3.0.1\WebApp\public\videoplayer\js ,like the picture commenting out some code.There will be only one camera in the browser.
    upload_2021-9-7_17-9-52.png upload_2021-9-7_17-9-28.png upload_2021-9-7_17-10-28.png
     
    VolvoCarsMrX likes this.
  5. VolvoCarsMrX

    VolvoCarsMrX

    Joined:
    May 5, 2020
    Posts:
    7
    Thanks for the tips! I tried to build the webapp following the steps here. But it turned out that the outcoming executable is not accepting any argument as it should, as the following cmd output showing.

    Code (JavaScript):
    1.  ./webserver_custom -w -p 80
    2. morgan deprecated undefined format: specify a format ../../../../../../snapshot/WebApp/build/server.js:0:0
    3. morgan deprecated default format: use combined format ../../../../../../snapshot/WebApp/build/server.js:0:0
    4. start as undefined mode
    5. http://127.0.0.1:61623
    6. http://192.168.1.70:61623
    7. http://10.73.11.197:61623
     
  6. QiannanWei

    QiannanWei

    Joined:
    Sep 2, 2021
    Posts:
    5
    Did you regenerate the pack_webapp?
     
  7. VolvoCarsMrX

    VolvoCarsMrX

    Joined:
    May 5, 2020
    Posts:
    7
    Yes, I reran
    npm run build && npm run pack
    after the modification. But the executable is not accepting arguments.

    I also tried to run with npm without packing by
    npm run dev -- -w -p 8080
    but even this is not working. I have this revision of the source code checked out.

    Thanks!
     
  8. QiannanWei

    QiannanWei

    Joined:
    Sep 2, 2021
    Posts:
    5
    Can you tell me your email address? I'll send you my modified code
     
  9. VolvoCarsMrX

    VolvoCarsMrX

    Joined:
    May 5, 2020
    Posts:
    7
    Hi,

    Sent in PM. Thanks!