# DSV-Media-LiveLinkUnity Unity package with code and example to enable video streaming from any Unity environment. The application receives data from compatible cameras following the FreeD protocol, and streams a video texture using NDI that can be used for video composing. Tested on Unity 2022.3.10f1 ## Usage In your Unity project, install the package following the instructions to [install through Git](https://docs.unity3d.com/Manual/upm-ui-giturl.html), if you donwloaded the ZIP file extract the folder and follow these [instructions to install manually](https://docs.unity3d.com/Manual/upm-ui-local.html). ### Installation 1. Go to Package Manager 2. Click on the **+** sign 3. If you have Git installed, add from git URL 4. If you downloaded the ZIP file, point at the `package.json` in this folder. 5. Once installed, go to `Samples` and import the sample **DSV Lilla Studio Setup** as shown in the image below. 6. Import the prefab `DSV Lilla StudioSetup` to your scene, place the centroid of the prefab according to the desired perspective in the video stream. 7. You can Debug the reception of NDI video stream using [OBS Studio](https://obsproject.com/) and the plugin [DistroAV](https://github.com/DistroAV/DistroAV) (formerly known as OBS-NDI) ![Install DSV Lilla Studio Sample](./Documentation~/imgs/install-sample.jpg) ### Usage in Lilla Studio @ DSV Contact Jonas Collin (mediapedagog) to get access to the Lilla Studio at DSV and record videos using your Unity environment as a background. ![Sample DSV Lilla Studio](./Documentation~/imgs/sample-DSV-lilla-studio.jpg) ### Preview NDI outputs Use the OBS studio and DistroAV to preview the NDI output from the cameras without having access to the DSV Lilla Studio setup. ![Preview NDI OBS](./Documentation~/imgs/obs-debugging.jpg) ## Development Notes The package is inspired by the [LiveLink] package available for Unreal Engine. The documentation for Free-D is available here: https://www.manualsdir.com/manuals/641433/vinten-radamec-free-d.html Based on these packages: - https://github.com/keijiro/KlakNDI - To stream NDI video in UNITY via Ethernet - https://github.com/Stefterv/Unity.FreeD: Baseline for FreeD communication in Unity. A physical camera simulator was added to be able to debug without needing hardware. - https://github.com/DistroAV/DistroAV - To test receiving NDI video in OBS streamed from Unity ### Camera Studio Simulator This sample contains extra scenes to simulate the existence of physical cameras streaming NDI video. It is used for mainly for developing purposes. ![Sample Simulator](./Documentation~/imgs/sample-simulator.jpg) ## Contact Luis Quintero | luis.quintero@dsv.su.se | https://luisqtr.com [LiveLink]: https://docs.unrealengine.com/4.27/en-US/AnimatingObjects/SkeletalMeshAnimation/LiveLinkPlugin/LiveLinkFreeD/