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

Official 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:
    803
    2.2.1 is old version.
    How about the latest version?
     
  2. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    We are recognizing the issue you are saying, but we haven't solved yet.
    WebRTC doesn't share track ID between peers. However, transceiver's mid is shared.
    We have plans to support APIs to identify transceivers.
    https://github.com/Unity-Technologies/com.unity.webrtc/pull/546
     
  3. wanfei

    wanfei

    Joined:
    Dec 22, 2018
    Posts:
    19
    Thank you for your reply
     
  4. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    @sotokangr

    I created the ticket for the issue here. Please post your opinion for APIs. Thanks.
    https://github.com/Unity-Technologies/UnityRenderStreaming/issues/592
     
  5. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    We add the new sample for the next release.
    https://github.com/Unity-Technologi...rstreaming/Documentation~/sample-multiplay.md
     
  6. k-ishida347

    k-ishida347

    Joined:
    Jul 29, 2016
    Posts:
    9
    Hello,
    How can I change the port of the Signaling URL?
    The server can be changed with webserver.exe -w -p 81,
    RenderStreaming(Script) Signaling URL ws://localhost:81
    Will be ignored and will be the default (80).
     
  7. CedricKamermans

    CedricKamermans

    Joined:
    Mar 10, 2020
    Posts:
    2
    I am following the documentation to setup my project. The documentation states to click on the webserver.exe
    Whenever I try to open the 'webserver.exe', it closes immediately. Does anyone know why this happens?
     
  8. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Is it the same issue? or your network environment has problem?
    https://github.com/Unity-Technologies/UnityRenderStreaming/issues/446
     
    zmxww likes this.
  9. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Could you tell me more info? Thanks.
     
  10. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    What page are you following in the manual?
    Usually you need to use the console app like powershell or cmd to launch the webserver.
     
  11. k-ishida347

    k-ishida347

    Joined:
    Jul 29, 2016
    Posts:
    9
    UnityRenderStreaming 3.1.0-exp.2
    So how can I change the port number?
     
    chopin1998 likes this.
  12. CedricKamermans

    CedricKamermans

    Joined:
    Mar 10, 2020
    Posts:
    2
    I was able to resolve my problem by removing the default website in IIS (this was using port 80)
     
    kazuki_unity729 likes this.
  13. bkaraceylan

    bkaraceylan

    Joined:
    May 3, 2021
    Posts:
    9
    Hello,

    I am having trouble understanding how does the bidirectional example works. As far as I know two RTCPeerConnections are required for bidireactional stream. One for the local stream the other for the remote. But in the sendVideo.js example only one Peer class is initialized and assigned to this.pc. Can anyone explain how this works?
     
  14. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
  15. k-ishida347

    k-ishida347

    Joined:
    Jul 29, 2016
    Posts:
    9
  16. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Could you try this?
    upload_2021-12-9_21-4-25.png
     
  17. zmxww

    zmxww

    Joined:
    Nov 28, 2021
    Posts:
    2
    Thank you very much for your answer. I referred to this answer and it seems to have improved a little, but I still feel stuck. I want to know if there is an upper limit to encoding. MaxBitrate in ChangeVideoParameters or if there is an upper limit to renderStreaming. I want to make full use of my bandwidth and CPU
     
  18. harti177

    harti177

    Joined:
    Nov 5, 2018
    Posts:
    12
    Hi, Good project and has huge potential. Thank you !

    I have been trying to work with it for a week now. I integrated my data and the project worked fine as expected. I connected my laptop to my mobile-internet. Started the application from my laptop and the application worked in both in my laptop and android-mobile.

    But today when I tried the same, the application starts in desktop. But in my android-mobile, when I click the play button, the UI-buttons appear, but after a while it goes back to the play button screen. I checked the console both the browser and unity consoles , there are no suspicious errors.

    Edit : API request are successful too. It is the moment the when suppose the rendering should start, it goes back to the play-button screen

    Edit 2 : I checked it another mobile. This works. But still not in my mobile. I cleared the caches too.
     
    Last edited: Dec 13, 2021
  19. sieunkr

    sieunkr

    Joined:
    Oct 19, 2021
    Posts:
    2
    Hello @kazuki_unity729

    Do you have a planned date to release 3.1.0 as the stable branch?

    Thanks
     
  20. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
  21. sieunkr

    sieunkr

    Joined:
    Oct 19, 2021
    Posts:
    2

    Thank you very much for your reply. I'm sorry I'm not good at English.

    When I said stable branch, I meant the official release package, not the experimental package.

    Is there any problem in using the exp version for commercial real service?
     
  22. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    You can see Unity Package lifecycle here.
    https://docs.unity3d.com/2021.1/Documentation/Manual/upm-lifecycle.html

    Of course, you can use them for commercial use. but at the moment, these packages are in development, and APIs could be changed for next version.
     
    sieunkr likes this.
  23. a55987482

    a55987482

    Joined:
    Aug 27, 2019
    Posts:
    4
    Hello,
    I want to use the same data channel as the Input system to send some JSON data to the server, but the server crash at the end, is there a better way to solve it?

    Client -> Arfoundation4.0 Scenes
    Server -> Broadcast Scenes

    Code (CSharp):
    1.  
    2.     // In Sender.cs file
    3.     public class MyClass
    4.     {
    5.         public string name;
    6.         public string time;
    7.     }
    8.  
    9.     class Observer : IObserver<InputRemoting.Message>
    10.     {
    11.         private RTCDataChannel _channel;
    12.         private string json;
    13.         public Observer(RTCDataChannel channel)
    14.         {
    15.             _channel = channel ?? throw new ArgumentNullException("channel is null");
    16.         }
    17.         public void OnNext(InputRemoting.Message value)
    18.         {
    19.             if (_channel.ReadyState != RTCDataChannelState.Open)
    20.                 return;
    21.             byte[] bytes = MessageSerializer.Serialize(ref value);
    22.             _channel.Send(bytes);
    23.      
    24.             // Add JSON data
    25.             MyClass myObject = new MyClass();
    26.             myObject.name = "Test";
    27.             myObject.time = DateTime.Now.ToString();
    28.             json = JsonUtility.ToJson(myObject);
    29.             _channel.Send(json);
    30.         }
    31.  
    32.         public void OnCompleted()
    33.         {
    34.         }
    35.         public void OnError(Exception error)
    36.         {
    37.         }
    38.     }
     
    Last edited: Dec 15, 2021
  24. k-ishida347

    k-ishida347

    Joined:
    Jul 29, 2016
    Posts:
    9
    I tried it. However, the port number I entered is ignored and defaults to 80.
     
  25. a55987482

    a55987482

    Joined:
    Aug 27, 2019
    Posts:
    4
    Check the "Run On Awake" is select after change the port number.
    It works for me.
    截圖 2021-12-15 下午4.03.18.png
     
  26. zmxww

    zmxww

    Joined:
    Nov 28, 2021
    Posts:
    2
    please install node enviroment
     
  27. k-ishida347

    k-ishida347

    Joined:
    Jul 29, 2016
    Posts:
    9
    It was no good.
    As a result of investigation
    Assets\Samples\Unity Render Streaming\3.1.0-exp.2\Example\Scripts\SceneSelectUI.cs
    The value of s_signalingAddress is hard-coded inside,
    It turns out that it will be overwritten.
     
  28. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Could you give me a crash log? Thanks.
     
  29. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
  30. k-ishida347

    k-ishida347

    Joined:
    Jul 29, 2016
    Posts:
    9
  31. yuanwenqiang

    yuanwenqiang

    Joined:
    Dec 22, 2021
    Posts:
    3
    Hi,
    I use Unity Render Streaming 3.1.0-exp.2 Unity 2019.4.26
    I use one Unity Editor send microphone audio data and other Unity Editor receive data.But the delay will be about 500 milliseconds.
    I do not know how to reduce this delay!
    Thanks!
     
  32. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    We are fixing this issue here.
    https://github.com/Unity-Technologies/com.unity.webrtc/pull/565
     
  33. wechat_os_Qy06EH52lHiGBYSiCqdclPRTk

    wechat_os_Qy06EH52lHiGBYSiCqdclPRTk

    Joined:
    Dec 16, 2021
    Posts:
    1
    Excuse me, if I have a mouse click event on an object, then the result is displayed through the GUI. I need to be able to operate in the editor, but also in the browser, which way do I need to use in this case.
     
  34. FainTMako

    FainTMako

    Joined:
    Dec 4, 2017
    Posts:
    2
    I'm having some issues with the Broadcast sample scene and using the web browser as a client.
    I'm wanting to click into the scene using the html client and that mouse click should cast a ray from the camera to the object the user is clicking. I've tried implementing this but i'm getting weird results with the raycast. Any tips?
     
  35. yinhewei

    yinhewei

    Joined:
    Jan 6, 2022
    Posts:
    1
    [BUG] Received screen upside down (up-down-reversed) with "Screen Stream Sender" on Linux (Ubuntu 20.04)

    I tried the https://docs.unity3d.com/Packages/com.unity.renderstreaming@3.1/manual/sample-broadcast.html sample on both Windows and Linux.
    On Windows it's good.
    But on Linux I saw the received screen (in browser) was upside-down (up-down-reversed), see the screen shot below.

    To Reproduce
    Steps to reproduce the behavior:

    1. Follow https://docs.unity3d.com/Packages/com.unity.renderstreaming@3.1/manual/sample-broadcast.html to run the sample with latest WebRTC package and webserver application, on Linux (I was using Ubuntu 20.04 desktop)
    2. Open link "http://localhost/receiver/index.html" in browser (I was using chrome).
    Expected behavior
    The received screen in browser is consistent with the desktop screen.

    Screenshots
    UnityRenderStreaming_UpsideDownIssue_BrowserView.png

    Environment (please complete the following information):

    • OS: Ubuntu 20.04 LTS Desktop
    • Browser: Chrome
    • Unity Version: 2020.3.25f1
    • Package version: 3.1.0-exp.2
    Additional context
    Looks this issue only happens to "Screen Stream Sender", and doesn't happen to "Camera Stream Sender".
    Also, when I built my own unity project with WebRTC package, the same issue happened. So looks it's not an issue of the sample, but a bug of the package or the webserver app.


    I also posted this issue here: [BUG] Received screen upside down (up-down-reversed) with "Screen Stream Sender" on Linux (Ubuntu 20.04) · Issue #618 · Unity-Technologies/UnityRenderStreaming (github.com)
     
  36. bartix96pl

    bartix96pl

    Joined:
    May 31, 2019
    Posts:
    7
    I did my own shader to rotate WebCamTexture then I'm creating VideoStreamTrack and video works well in portrait mode but there is problem when i'm trying stream video in landscape mode. Rotation is ok but aspect ratio is still in portriait mode. Is there some option to change VideoStramTrack texture resolution runtime or some other way to keep proper resolution to device rotation???
     
  37. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    This issue is fixed #630.
    The new version will be released in this month.
     
  38. wuxu12

    wuxu12

    Joined:
    Oct 20, 2021
    Posts:
    6
    Hello,my version is unity 2020.3.23f1,Unity Render Streaming 3.1.0-exp.2 depends on WebRTC 2.4.0-exp.5.When I run the video stream demo, the received video on web is extremly vague.I have tried to change resolution and anti-aliasing,but nothing changes.So I guess the video codec leads to this the problem,what can I do to change the webrtc codec from VP8 to VP9 through chrome?Does some way else to improve the video quality?
     
  39. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
  40. wuxu12

    wuxu12

    Joined:
    Oct 20, 2021
    Posts:
    6
  41. wuxu12

    wuxu12

    Joined:
    Oct 20, 2021
    Posts:
    6
  42. Mydownni

    Mydownni

    Joined:
    Feb 17, 2022
    Posts:
    1
    Hello!
    There were some problems with cloud rendering
    Such as:
    When running Unity and opening the server, there is no screen in the browser, but the mouse wheel and buttons are available.
    The computer system is Windows 7, will it have any impact on unityRenderStreaming?
    Have what good solution method!
    Thank you very much!
     
  43. wuxu12

    wuxu12

    Joined:
    Oct 20, 2021
    Posts:
    6
  44. yuanwenqiang

    yuanwenqiang

    Joined:
    Dec 22, 2021
    Posts:
    3
    Hello, I am using Unity 2019.4.33 and com.unity.webrtc 2.4.0-exp.5. When I use one Unity to send audio, the other Unity receives audio. I stop the sending side and at this point when I stop the receiving side Unity crashes on the receiving side. I can't find the reason? I see that it has been fixed in 2.4.0-exp.6, but it still appears in my test
     
    Last edited: Feb 23, 2022
  45. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Hi, could you give me a crash log?
     
  46. yuanwenqiang

    yuanwenqiang

    Joined:
    Dec 22, 2021
    Posts:
    3
    Hi, here is the crash log. Thank you
     

    Attached Files:

  47. Mr-Zhai

    Mr-Zhai

    Joined:
    Apr 1, 2016
    Posts:
    1
    • I sometimes can't connect, report this error
      upload_2022-3-2_9-34-38.png
     
  48. Siddiq97

    Siddiq97

    Joined:
    Aug 30, 2020
    Posts:
    3
    Hi
    I am following this tutorial (
    ) and successfully running application
    and having two player connected fine. Now I want to render a webcam texture on each player cube and don't know what to do next.
     
  49. gnp89

    gnp89

    Joined:
    Jun 25, 2012
    Posts:
    36
    has anybody deployed the signaling server in Google Cloud or somewhere? Just tried with Google Cloud but I'm having issues making the NodeJS app run.
     
  50. gnp89

    gnp89

    Joined:
    Jun 25, 2012
    Posts:
    36
    I just found there was a problem with dependencies and filed this bug:
    https://github.com/Unity-Technologies/UnityRenderStreaming/issues/662

    By creating a new repo with the contents of WebApp, and making the Procfile for running in Heroku, I was able to deploy the signaling server and use it with HTTP signaling successfully.

    Would be nice to have WebApp as a separate repo so that we can make our adaptations but still get new features or fixes from the Unity side. But I understand that might be asking for too much :)