Hi all developers, I want to cast a display of my Nreal light to a TV monitor. But, according to the official support, such kind of feature isn’t/won’t be published officially, although it is used internally… I think many developers need the feature to share the display to surrounding audience in a demonstration. Does anyone have a solution, an idea, a workaround?
I posted the same question on the old slack community and got an clue from Jan:
According to him and Starshell, we can stream an Nreal display to a computer by RTP. If anyone has done it, I would like to know detail steps and whether his step means that I can stream an Nreal display to a computer by video capture feature which officially supported (https://developer.nreal.ai/develop/unity/video-capture).
it’s simple. In the old slack channel I posted the steps, but here again. I used the Freeware VLC media player for that, but you can use any video player that can replay RTP streams.
Take the video capture example from the SDK and replace the file path with “rtp://ip_of_your_computer:12345”. You can use any other port, but then you have to use the same port in the SDP file too (see later).
Install the VLC (if you don’t have it already) on your computer.
Create a text file on your computer with the extension *.sdp
Copy this lines into the file:
s=ESP H264+AAC STREAM
m=video 12345 RTP/AVP 96
a=rtpmap:96 H264/90000
Start the video recording in your nreal app. Then open the SDP file with VLC and you will see the video stream from you nreal glasses
@Starshell yeah you posted some steps, but they were inconsistent because you referred to a post from “Marian” but his post is deleted now. thats why he asks here again.
I tried this today, but was not able to get this to work. VLC on the PC span for 10 seconds trying to connect then aborted. Are there any additional changes, like firewall, that need to be made to the PC? Ta.
You have to ensure that your phone can see and access the pc in your network (e.g. try to ping your PC’s IP). And of course you need to open the UDP port you used for streaming in your firewall (in my example the UDP port 12345)
I tried your steps but I also was not able to get this to work as @mgrayson. I turned off the firewall. I checked my glasses and PC are on the same network and the ping works between them (when the fireall is off). I changed the VideoCapture2LocalExample.cs like this:
If i try this, i get the error "Could not open output file ‘rtp://192.168.1.16:12345’ ", on the glasses, did you used the m_VideoCapture.StartRecordingAsync() method for this ?
I could not do the streaming cast with “.NET Standard 2.0” of Api Compatibility Configuration setting in the Player settings while I could do it with “.NET 4.x”.