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. JinHyeonSu_

    JinHyeonSu_

    Joined:
    Mar 16, 2022
    Posts:
    4
    I want to use only one camera. what should I do?
    When either camera is removed, the screen goes black.
    I don't need a screen with a red border.
     

    Attached Files:

    • RS1.png
      RS1.png
      File size:
      210.9 KB
      Views:
      320
    • RS2.PNG
      RS2.PNG
      File size:
      158.9 KB
      Views:
      321
    Last edited: Mar 16, 2022
  2. Abdul_Malik_Badshah

    Abdul_Malik_Badshah

    Joined:
    Oct 28, 2016
    Posts:
    13
    @kazuki_unity729, Is it possible to share the Unity Scene screen in the bidirectional Sample? I am trying to send "Screen Stream Sender" in the Bidirectional Sample instead of WebCam Streamer Sender so that the Sender can share the unity Scene Screen (MainCamera ) with the receiver and in return see the receivers Web came image.
    thank you
     
  3. thelocationlabdeveloper

    thelocationlabdeveloper

    Joined:
    Sep 8, 2020
    Posts:
    18
    I am following the latest sample tutorial with 3.1.0 the web app and unity editor running fine. No error on both consoles. But i am getting black screen on received html page. Remember I have empty scene where I have setup Render streaming, Broadcast, camera Stream Sender compoenet but i am not getting output or error on web. I have make sure that Firewall is turn off and my browser is with latest version. Do I am missing anything?
     
  4. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
  5. faziii

    faziii

    Joined:
    Jun 11, 2019
    Posts:
    17
    I am just testing the new render streaming package in unity 2020.3.22 but sadly the receiver (html page) is not receiving my camera stream. While both consoles are clear there is not error. Currently i have Main camera which have camera Stream Sender is attached and its is showing two info:

    While on another empty object I have attached

    1. Render Streaming
    2. Broadcast
    3. Broadcast Sample
    One strange thing I found is that the sample scene (Receiver) is working fine. But the same setup which I have made is not working. Probably the reason is given in above screenshot. why it is happening?

    While the original documentation has also been missed that you have to attached the broadcast sample script.
     
    PMoussette and MFKJ like this.
  6. Super_Stars

    Super_Stars

    Joined:
    Nov 9, 2018
    Posts:
    10
    I have a issue about I try to copy example from broadcast and receiver.
    It sent signaling only that there is a DataChannelBase component like input sender and Boolean isLocal checked.
    Even if I did that, it would be send offer signaling several times cause linking failed. (like #502)
    How do I fix it?
     
  7. xya

    xya

    Joined:
    Aug 25, 2016
    Posts:
    2
    Hi, I use WebBrowserInput demo on LAN, WebSocket, everything else by default. I opened it in the browser and could see the Unity camera's real-time content and interactively control the lighting. When I mapped the machine to a WAN address, I could open a web page on another machine using a browser on the WAN and see buttons and a gray background. But clicking the button does not work, and you cannot see the video. How should I modify it? Thank you very much!
     
  8. JinHyeonSu_

    JinHyeonSu_

    Joined:
    Mar 16, 2022
    Posts:
    4
    thank you for reply.
    To be precise, the scene has two cameras, but on the web I want to see only one camera screen.
    When using broadcast, only the camera whose target display is display1 will be shown on the web screen.
    But I want to show the screen of the camera whose target display is display2 on the web screen.

    What I want is to show the screen of the camera whose target display is display2 on the web screen and operate the camera in Unity from the browser.

    (I use a translator so the sentences may be weird. Sorry)
     

    Attached Files:

    Last edited: Mar 23, 2022
  9. kannan-xiao4

    kannan-xiao4

    Unity Technologies

    Joined:
    Nov 5, 2020
    Posts:
    76
    Hi, In your report I cannot determine the problem. Can you show logs containing signaling errors?

    DataChannelBase component like input sender and Boolean isLocal checked.​
    If it's a custom component, it would be helpful to have a script.
     
  10. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    We received the same issue here but have not improved yet.
    https://forum.unity.com/threads/unity-render-streaming-introduction-faq.742481/page-14#post-7107967
     
  11. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Which version of the Unity Render Streaming package are you using?
    The "Broadcast" sample have only one camera in the latest version.
     
  12. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    288
    Currently, we are developing an app that remotely sends video of scenes including volumetric video.
    If you execute the AudioStreamTrack constructor with no arguments, the audio will be sent from the AudioListener, so a stream is generated with the following code and set in the pc.
    Code (CSharp):
    1. var audioTrack = new AudioStreamTrack();
    2. var videoTrack = new VideoStreamTrack(rt);
    3. var mediaStream = new MediaStream();
    4. peer.AddTrack(audioTrack, mediaStream);
    5. peer.AddTrack(videoTrack, mediaStream);
    6.  
    7. StartCoroutine(CreateDescription(RTCSdpType.Offer));
    8. // ....
    When I run it, the video is sent and displayed on the remote side, but there is no audio.
    For the time being, the OnTrack event on AudioTrack has occurred on the remote side.

    We have prepared a test project here.
    The file size is about 1GB because it contains volumetric video.
    It consists of three projects: sender, receiver, and signaling server.
    • 4dv --- sender project
    • WebRTCReceiver --- Recipient project
    • ConsoleSignalingServer --- Simple signaling server for console
    In terms of execution order, first start ConsoleSignalingServer, then execute the sending 4dv project, and then execute WebRTCReceiver.
    https://drive.google.com/drive/folders/161WdQ9JtKc4Uu-b8PtXgb6OkDWzUqha6
     
  13. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Did you follow this instruction for using AudioStreamTrack with AudioListener?
    https://docs.unity3d.com/Packages/com.unity.webrtc@2.4/manual/audiostreaming.html
     
  14. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    288
  15. JinHyeonSu_

    JinHyeonSu_

    Joined:
    Mar 16, 2022
    Posts:
    4
    The version of the Unity Render Streaming package is 3.1.0-exp.3.
    The "Broadcast" sample has one camera, but I want to use two.
    I want to display one camera on the unity game tab and the other camera on the web. (like RSPic.PNG)

    And i want to control unity camera on the web
    I tried all the samples but couldn't control the Unity camera from the web.
     

    Attached Files:

  16. fish-rp

    fish-rp

    Joined:
    May 6, 2021
    Posts:
    9
    @kazuki_unity729

    Just came across this package in development, very cool. How does performance compare to existing assets like FMETP Stream? Also, is the Legacy Input System supported? If not, are we able to send our own custom packets to the Server?

    Looking through the source code of your package it seems batchmode won't work at all because you're using ScreenCapture.CaptureScreenshotIntoRenderTexture. Is batchmode something that'll be supported in the future? I'd be curious as to how you'll get Screen Space Overlay UI working in batchmode.
     
  17. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    WebBrowserInput sample has two cameras in one scene.
    (But this sample is slightly old, please take care.)
    https://docs.unity3d.com/Packages/com.unity.renderstreaming@3.1/manual/sample-browserinput.html
     
  18. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Do you mean "batchmode" is "Server Build" in this manual?
    https://docs.unity3d.com/Manual/BuildSettingsStandalone.html

    Basically, when building with "Server Build" flag, it strip the graphics feature from the Unity runtime, so Screen Space Overlay UI don't work on the runtime.
     
  19. fish-rp

    fish-rp

    Joined:
    May 6, 2021
    Posts:
    9
    Surely Unity would want to support all its existing features though? Is this something you might plan to support in the future? What about batchmode in general with Screen Space - Camera? That is a lot easier to support.
     
  20. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    288
    It's "com.unity.webrtc" instead of "Render Streaming"

    * OS: iOS 15
    * Unity version: 2021.2.13
    * 2.4.0-exp.6

    When building with XCode, the following error occurs.

    Code (CSharp):
    1. Undefined symbol: _webrtc_audio_processor_destroy
    2. Undefined symbol: _webrtc_audio_processor_process_reverse
    3. Undefined symbol: _webrtc_audio_processor_process
    4. Undefined symbol: _webrtc_audio_processor_create
    5. Undefined symbol: _webrtc_audio_processor_init
    6. Undefined symbol: _webrtc_audio_processor_set_param
    It seems that you can build if you set some settings, but where should you set?
     
  21. Anastasia-Devana

    Anastasia-Devana

    Joined:
    Aug 18, 2013
    Posts:
    20
    I have 3 questions:

    1. Is there a sample scene for connecting two independent peers? I tried running the sample scenes on two devices at the same time hoping one of the samples would work for local networked peers or some testing signaling servers, but the device only connects to itself. Is that by design, or I am using the samples incorrectly?

    2. Is there a way to get direct access to incoming audio data, instead of using AudioSource.SetTrack extension? I need to do something else with the incoming data, but AudioStreamTrack doesn't allow access to the audio data.

    3. If there is no way to get access to audio data, I would need more control over the AudioSource spatial properties. Currently, there is no way to position/pan the "receiving" AudioSource.
     
    Last edited: Apr 11, 2022
  22. gnp89

    gnp89

    Joined:
    Jun 25, 2012
    Posts:
    36
    is there a way to get notified when the system has connected to the Signaling server? I see that RenderStreamingInternal gets access to ISignaling and can respond to ISignaling.OnStart event.
    But from the outside, I can't get either notified nor the internal state. I'm currently using HTTP signaling with a server deployed in GCloud, and sometimes it's taking more than 5 seconds to connect and create a session. If I attempt to create a connection before that, of course it falls apart, so I need to know when the system is ready for exchanging offers/answers.
    Any ideas?
     
  23. gnp89

    gnp89

    Joined:
    Jun 25, 2012
    Posts:
    36
    Http requests take too long and they're blocking the main thread :(
    really need these requests to run in a background thread and then run callbacks in the main thread. It's doing that for some requests, but we need all of them to run that way if we want to use this solution
     
  24. gnp89

    gnp89

    Joined:
    Jun 25, 2012
    Posts:
    36
    well we switched to WebSockets now! It looks like it's supported by Google App Engine in the flex environment. We initially thought that HTTP was our only option
     
    Last edited: Apr 11, 2022
  25. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    I know your issue and made the ticket.
    https://github.com/Unity-Technologies/UnityRenderStreaming/issues/609
     
  26. wsadmld1

    wsadmld1

    Joined:
    Jun 1, 2021
    Posts:
    3
    hello! how can i use js button to transfer a string as a parameter in unity function and call it. the demo is based on "WebBrowserInput".
     
  27. Abdul_Malik_Badshah

    Abdul_Malik_Badshah

    Joined:
    Oct 28, 2016
    Posts:
    13
    @kazuki_unity729 is it possible to implement a conference call or meeting call where multiple clients join for a video chat just like in Zoom? what would be the go-ahead to do so? I was thinking to have more than one Single Connection Handler but not sure about the overhead and the connection part.
     
  28. Kissvane

    Kissvane

    Joined:
    Jan 3, 2011
    Posts:
    4
    I tried your product and it seems great. However I have an issue. I'm trying to open a new webpage from streaming.
    Using Application.OpenUrl open a webpage inside the furioos webplayer. I want to open this webpage outside the furioos webplayer. Is it possible to do that ? Is there a sample project available ?
     
  29. PolymorfSymbiosis

    PolymorfSymbiosis

    Joined:
    Dec 4, 2019
    Posts:
    1
    Is it possible to capture and stream a 360 (stereoscopic) camera view?
     
  30. berkun5

    berkun5

    Joined:
    Sep 29, 2016
    Posts:
    2
    Hi, I'm trying to use the multiplay sample with more than 5 users with cameras. They all have controls and everything is running smoothly except Unity's framerate is dropping drastically on each connection.

    The initial host's framerate is around 110 and it drops to 60 on the first connection. Then on the second connection, it drops down to 30, and so on.

    Meanwhile, the CPU & GPU usage of the unity standalone windows PC build is around <10%.

    I need to figure out a solution to run this sample with at least 15 users.

    The hardware I'm using to test:
    Intel i7-7700k
    RTX 3080
    128Gb ddr4 ram
     
  31. Anastasia-Devana

    Anastasia-Devana

    Joined:
    Aug 18, 2013
    Posts:
    20
    @kazuki_unity729 any response to my earlier questions? Thanks!

     
  32. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    I'll ask you again, could you tell me what you mean the "batchmode"?
    "Screen Space - Camera" works fine in Unity Render Streaming. Please try samples below.
    https://docs.unity3d.com/Packages/com.unity.renderstreaming@3.1/manual/samples.html
     
  33. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    What source code are you trying to build?
    Is it package sample?
     
  34. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
  35. kannan-xiao4

    kannan-xiao4

    Unity Technologies

    Joined:
    Nov 5, 2020
    Posts:
    76
    Answer1.
    Probably you are trying a sample of com.unity.webrtc, in that case it is by design.
    If you want to see it work on two different devices, try using Unity Render Streaming.
    I think the following Bidirectional Sample will be helpful.
    https://docs.unity3d.com/Packages/com.unity.renderstreaming@3.1/manual/sample-bidirectional.html

    Answer2.
    Please refer to AudioCustomFilter and customize it.
    Received audio data can be accessed and edited with `OnAudioFilterRead`.
    https://github.com/Unity-Technologi.../develop/Runtime/Scripts/AudioCustomFilter.cs

    Answer3.
    same answer2.
     
  36. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    If you want to make user management system for chat using this package, I guess the APIs is insufficiency to make it.
    You need to make the system using WebRTC API.
     
  37. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    I have never tested yet but you can send and receive the render texture between peers, so it would be possible.
     
  38. kannan-xiao4

    kannan-xiao4

    Unity Technologies

    Joined:
    Nov 5, 2020
    Posts:
    76
    Not possible with Application.OpenUrl.
    I would implement it using DataChannel in the following way.
    1. Send URL from host to player using DataChannel
    2. Open the URL received by the player.
     
  39. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Geforce series has the restriction for number of concurrent session of encoder.
    Please see below.
    https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new

    I guess your performance issue is for the load of rendering thread. The issue we are fixing for the next version. But not sure how many users can connect the 1 PC, and the next bottleneck would be network bandwidth.
     
  40. fish-rp

    fish-rp

    Joined:
    May 6, 2021
    Posts:
    9
    Batchmode is a Unity Command Line Argument you can read more about it here: https://docs.unity3d.com/Manual/PlayerCommandLineArguments.html

    We have found a new solution for Screen Space - Overlay using FMETP Stream. Thanks for your help though.
     
  41. Abdul_Malik_Badshah

    Abdul_Malik_Badshah

    Joined:
    Oct 28, 2016
    Posts:
    13
    @kazuki_unity729 is there any sample code to send a simple string between Client and Server instead of InputEvents?
    I am trying to see the InputRemoting.cs script but as the script is part of the package now I can't edit/Debug it.
     
  42. berkun5

    berkun5

    Joined:
    Sep 29, 2016
    Posts:
    2
    Thank you for your reply! We will be waiting for the update. Ideally, if one PC can run up to 50 users this can be very reliable alternative to WebGL games. Which is something that most of our clients ask for their blockchain games. Fast loading times and high-end graphics.
     
  43. Kissvane

    Kissvane

    Joined:
    Jan 3, 2011
    Posts:
    4
    Hi Kannan,

    Thanks for the answer, I will try to explore the dataChannel documentation. I think I need to install SDK to use it right?
    So it's not possible to implement all the system unity side only.
    Is there a sample project where information is sent to player and player react?

    Cheers
     
  44. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Maybe you can realize the component if you make the new class inheriting the DataChannelBase class.
     
  45. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    I guess it is difficult to join over 50 users in one PC. There would be some bottleneck like network or graphics.
     
  46. kannan-xiao4

    kannan-xiao4

    Unity Technologies

    Joined:
    Nov 5, 2020
    Posts:
    76
    What does the install SDK mean?
    We don't have a sample of doing Application.OpenURL in Player.

    If make it, you need to implement it not only on the Unity side but also on the Player side.
     
  47. Maktech

    Maktech

    Joined:
    Jan 15, 2015
    Posts:
    31
    We use websockets for our siginaling. With the open websocket you can push messages to the client. Let's say you want to open a url only on a specific client's machine when they click a Unity button. Detect in the app which user clicked a given button and then from there you can push that url down to the client. Your client side webserver code will need to catch that url and open it up from the html/javascript side.

    There is some scaffolding you will need to setup to manage which user input triggered the button click.
    If you are communicating with the webserver from the client over HTTP you will be using some type of polling logic and maybe a custom endpoint defined in the webserver.

    It is doable. :)
     
  48. Sindbad-von-See

    Sindbad-von-See

    Joined:
    Jun 23, 2020
    Posts:
    4
    Hi guys,

    is there an approximate timeline when version 3.1 will no longer be considered experimetal?

    Thx. :)
     
  49. DarkRides

    DarkRides

    Joined:
    Mar 6, 2013
    Posts:
    22
    Hi ,Unity Forma is the render Streaming used in the current official open source version?
     
  50. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Sorry but I am not familiar Unity Forma, Does Unity Forma have the streaming feature?