Search Unity

Unity Render Streaming Introduction & FAQ

Discussion in 'Unity Render Streaming' started by kazuki_unity729, Sep 10, 2019.

  1. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    42
    Yes.
    It may need the TURN server to relay around NAT.
    This document shows that integrate "coturn" as a OSS implemented TURN server.
    I am sorry we haven't translated the document into English.

    https://github.com/Unity-Technologi...nderstreaming/Documentation~/jp/turnserver.md
     
  2. sindharta_at_unity

    sindharta_at_unity

    Unity Technologies

    Joined:
    Jul 4, 2019
    Posts:
    27
    Specifying -batchmode would still perform rendering normally, unless you are also specifying -nographics ?

    After looking around a bit, it seems that the above answer is not correct. That said though, there should be no problem when camera.Render() is called. Perhaps you can share your project ?
     
    Last edited: Jan 24, 2020
  3. markj_pw

    markj_pw

    Joined:
    Oct 27, 2016
    Posts:
    8
    Thanks for your reply. Knowing that it should work filled me with determination to spend the time to further investigate.

    It turns out the issue was happening only in an older state of RenderStreaming codebase back in October. It looks like the newer codebase uses Unity 2020.3 along with HD Render Pipeline version 7.1.7. Using 2020.2 and HDRP 6.9.0 wasn't working.

    All is well, thanks!
    Mark
     
    Last edited: Jan 25, 2020
  4. kayy

    kayy

    Joined:
    Jul 26, 2011
    Posts:
    65
    Fortunately the screenshots are in English and I was able to get it running without speaking Japanese.
    Especially Chrome (Android, iOS and Windows) has still some hickups but this seems to be related to the javascript part. I will investigate this further.

    One more question came up when discussing an n:m scenario i.e. using one big NVidia server for running n instances of the Windows exe on one machine to their content to thin clients per render streaming:
    Do we need more than one server (i.e. node.js) and or TURN server instance to make this happen?

    As far as I understand, the node.js components need to be extended to register separate streaming providers and the logic to connect a client to its favoured exe by request parameter or whatever. But everything should be possible with one node.js service listening on one port. Am I right? Thanks!
     
  5. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    42
    I appreciate your effort!

    Since we have never tested the "N:M scenario", probably the signaling server works incorrectly.
    As you said, the signaling server will need to extend the feature in which the receiving signaling message from multiple Unity instances.
     
  6. markj_pw

    markj_pw

    Joined:
    Oct 27, 2016
    Posts:
    8
    Hey guys,

    I successfully have RenderStreaming working from a Windows Service. This new tech you guys have developed is really cool!

    One issue I have is controlling the resolution/aspect ratio. Since there is no window, Screen.SetResolution() will make the game error and quit. The game seems to have a resolution of 752x516 when I check Screen.width and Screen.height.

    My resulting stream is essentially square, whereas my desired stream would be 16:9, and with a desired resolution for bandwidth reasons. Since my windows service is running on Local System, I don't believe there is a registry entry for setting resolution either.

    Is there a way I can set the rendered resolution without going through Screen.SetResolution?

    Thanks,
    Mark
     
    kayy likes this.
  7. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    42
    Sorry, we have never tried it from Windows Service.
    The resolution might be affected from these command-line arguments.

    -screen-height, -screen-width
    https://docs.unity3d.com/Manual/CommandLineArguments.html
     
  8. markj_pw

    markj_pw

    Joined:
    Oct 27, 2016
    Posts:
    8
    Looks like those arguments don't work when launched from a Windows Service. Interestingly, removing all supported aspect ratios besides 16:9 and setting default screen width and screen height in Player Settings also does not work. It appears that any screen-related settings have no effect.

    Two possible solutions I can think of:
    1) If there is a way to change the resolution of the screen buffer independently of the Screen Resolution.
    2) Point the main Camera to an offscreen RenderTexture of higher resolution, and then point the RenderStreaming to use that as the Capture Camera.
     
  9. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    42
    Mm, To solve this issue we should dig more into the detail.
    I made a ticket on the GitHub issues, we are going to work on the issue in the future.

    https://github.com/Unity-Technologies/UnityRenderStreaming/issues/223
     
    markj_pw likes this.
  10. sindharta_at_unity

    sindharta_at_unity

    Unity Technologies

    Joined:
    Jul 4, 2019
    Posts:
    27
    We are preparing to release the next version of RenderStreaming soon, and we noticed this question you posted a while back. If you follow the template, the UI should already be visible in both Unity Editor and browser. Just press any key on the browser side, and you should see it.

    upload_2020-2-5_15-56-11.png
     
  11. markj_pw

    markj_pw

    Joined:
    Oct 27, 2016
    Posts:
    8
    One small note on the ticket: the issue is with the Unity Screen.width & Screen.height not being able to be changed. Unity will stop with the exception of not being able to change the window resolution (there is no window).

    The way it relates to streaming resolution, at least in my experience, is that setting the streaming resolution to any value other than the window resolution will result in distorted and/or cropped video in the browser.

    Thanks,
    Mark
     
unityunity