This guide includes the steps required to retreve the streamed image from the Desktop and iOS client apps using OBS.
- Download OBS
- Install the OBS NDI plugin
- Inside your OBS project, add a new NDI Source to the scene.
- Add a new video source and select the camera you are using to capture from the headset’s position as the Source Name.
- Make sure your NDI Source is above the Video Source in the source hierarchy.
- Start the game on the desktop and headsets.
- To create or find a network anchor on the Magic Leap headsets, press the trigger on the controller.
- To begin streaming press on desktop press the "1" key on your keyboard, this will also cycle through the players.
- To stream on your iOS device, press the start streaming button on the screen.
Note: NDI Streaming can start automatically from desktop or iOS devices by enabling the _streamOnStart
condition on the NDIController. The default value is set to false to in case the user wants to view the AR content in real-time without saving the video.
- Once the client and server Unity applications are connected, select the NDI Source in the Sources panel inside the OBS application.
- Select the gear icon to open the NDI's source properties.
- Select the drop down arrow near the Sources Name Field.
- Set Bandwidth to Highest, Sync to Source Timing, and Latency mode to Normal.
- OBS should now display a feed of the virtual content from the headset’s perspective with a transparent background overlaid on top of the video feed.
- Adjust the size of the NDI stream capture to match the full screen of the video capture
- When you are ready to record the composited video, press Start Recording under the Controls header.
If you are experiencing significant delays between the NDI stream and the video stream, try the following steps:
- Right click on your Video Capture source and select Filters
- Under Audio/Video Filters, click the + and select Video Delay (Async)
- Enter a name for this delay and input the number of milliseconds you want to delay the Video Feed by. You will need to test different lengths until the video feed playback matches the NDI stream output.
- Click here for a more detailed video tutorial on these steps.
NDI Stream not showing as option in OBS:
- Double check the steps in the "Create the NDI Rig" section -- make sure if you're using the standard render pipeline, you set the NDI Sender capture method to "game view". If using URP, you can use "camera", but you must set the NDI Camera's Camera/HDR setting to "Off".
- If attempting to stream from iOS, make sure the project is using URP or HDRP.
If you are still having issues with NDI stream latency, you can try the following:
- Add a second machine to process the rendering.
- If you are on a Windows computer, you can try the Spout plugin for Unity.
The image streams but alpha channel shows as black.