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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Streaming between 2 unity apps on 2 different PCs

Discussion in 'Unity Render Streaming' started by SeifBorhan, Apr 24, 2023.

  1. SeifBorhan

    SeifBorhan

    Joined:
    Feb 28, 2023
    Posts:
    4
    I was trying to stream my webcam through the BroadCast sample on PC1 to be viewed on another unity app on PC2 using the Receiver sample, however I cannot make it happen. I start by running the webserver on PC1 and then build/run the BroadCast sample and choose Source as webcam which works just fine. I then run the webserver on PC2 and test the connection using the Receiver example on Chrome, which works just fine on chrome. I then close chrome and build/run the Receiver example on PC2 and click start and it does not work. I do not know what is the problem, the connection works fine if both apps are on PC1 or PC2, and it also works fine with PC1 (BroadCast) and PC2 (Chrome), but with the case of PC1 (BroadCast) and PC2 (Receiver) it does not work. Any suggestions or idea on the matter ?

    I would also like to know if I can use render streaming over 4G connection, I want to stream scene on 2 different PCs with 2 different networks.
     
    Last edited: Apr 24, 2023
  2. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    770
    I think the signaling process is failed between Broadcast and Receiver.
     
  3. SeifBorhan

    SeifBorhan

    Joined:
    Feb 28, 2023
    Posts:
    4
    i have managed to make it work by changing the signaling into http and overriding the default settings of the signaling manager and setting it to the ip of the broadcaster (PC1), however my next point to tackle is signaling over 4G and not localhost. Is it supported ?
     
  4. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    770
    Generally, p2p communication doesn't work without TURN server in the public network.
    Please see this document.
    https://docs.unity3d.com/Packages/com.unity.renderstreaming@3.1/manual/turnserver.html
     
  5. SeifBorhan

    SeifBorhan

    Joined:
    Feb 28, 2023
    Posts:
    4
    I have tried using a TURN server. It did not work, however i have followed the steps in the document you have sent. I then tested the TURN server using 2 WebRTC clients on the web and the server was working. I think it could be due to my use of TURN to stream for Unity-Unity application. I haven't tried Unity-Web.
     
  6. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    770
    It sounds strange. We need to check Unity established the connection to the TURN server. Can you check the log of TURN server?