Audio Sync + Livestreaming to Unity

Hello

we are using the following set up to livestream from Depth Kit Studio to a Local Area Network PC that is running a Unity Application:

Depth Kit Studio (PC1) → Spout to NDI (PC1) → NDI to Spout (PC2) → Unity Application (PC2)

my question is, assuming i have ambient lockit set up and connected to an audio device to sync the audio. what would be the recommended way to send the synced audio over so that it plays in-sync on the PC that is running the Unity Application?

@BUTNV I need to look more into the specifics, but fundamentally, the approach I recommend is to embed audio within the NDI stream on PC1, and then de-embed it on PC2 so that the audio is carried with the video, and the same latency is applied to both. Perhaps on PC1, OBS with both Spout and NDI plugins could receive the Spout stream from Depthkit and audio from an interface, merge them and generate the NDI stream. I’ll look into this a bit more and follow up.

@BUTNV I was able to confirm that OBS can merge the Depthkit Spout stream and audio from your desired source so that the video and audio are transported together over NDI. De-embedding the audio and then getting it into Unity may be more challenging - This fork of KlakNDI which supports audio may be helpful, but I haven’t tested it.

Another option you may want to consider is to use our Unity RenderStreaming integration in place of NDI - This pipeline supports an audio stream out of the box. Instead of running a hosted signaling server to enable connections over the internet, you can simply run the signaling server which comes with Unity’s RenderStreaming plugins locally on either of your PC’s to establish the connection over LAN.

Keep us posted with your testing progress, and let me know which solution works better for you.