Coder Social home page Coder Social logo

klakndi's Introduction

KlakNDI

gif

KlakNDI is a Unity plugin that allows sending/receiving video streams between several devices using NDI®.

NDI® (Network Device Interface) is a standard developed by NewTek, Inc that enables applications to deliver video streams via a local area network. Please refer to ndi.tv for further information about the technology.

System Requirements

  • Unity 2019.4

On Unity 2021.1 or earlier versions, KlakNDI requires the .NET Standard 2.0 profile -- You can't compile the package with the .NET 4.x profile.

From Unity 2021.2, KlakNDI is compatible with both the .NET Standard and .NET Framework profiles.

Desktop platforms:

  • Windows: x64, D3D11/D3D12
  • macOS: x64 or arm64 (M1), Metal
  • Linux: x64, Vulkan

Mobile platforms:

  • iOS: arm64, Metal
  • Android: arm64, Vulkan

KlakNDI runs without the NDI SDK on most supported platforms, but only the iOS platform requires the SDK to build on Xcode. Please download and install the NDI SDK for iOS in advance of building.

Known Issues and Limitations

  • Dimensions of frame images should be multiples of 16x8. This limitation causes glitches on several mobile devices when using the Game View capture method.

  • KlakNDI doesn't support audio streaming. There are several technical difficulties to implement without perceptible noise or delay, so there is no plan to implement it.

How To Install

This package uses the scoped registry feature to resolve package dependencies. Add the following lines to the manifest file (Packages/manifest.json).

Unity 2021.1 or earlier

To the scopedRegistries section:

{
  "name": "Unity NuGet",
  "url": "https://unitynuget-registry.azurewebsites.net",
  "scopes": [ "org.nuget" ]
},
{
  "name": "Keijiro",
  "url": "https://registry.npmjs.com",
  "scopes": [ "jp.keijiro" ]
}

To the dependencies section:

"org.nuget.system.memory": "4.5.3",
"jp.keijiro.klak.ndi": "2.0.3"

After the changes, the manifest file should look like:

{
  "scopedRegistries": [
    {
      "name": "Unity NuGet",
      "url": "https://unitynuget-registry.azurewebsites.net",
      "scopes": [ "org.nuget" ]
    },
    {
      "name": "Keijiro",
      "url": "https://registry.npmjs.com",
      "scopes": [ "jp.keijiro" ]
    }
  ],
  "dependencies": {
    "org.nuget.system.memory": "4.5.3",
    "jp.keijiro.klak.ndi": "2.0.3",
    ...
Unity 2021.2 or later

To the scopedRegistries section:

{
  "name": "Keijiro",
  "url": "https://registry.npmjs.com",
  "scopes": [ "jp.keijiro" ]
}

To the dependencies section:

"jp.keijiro.klak.ndi": "2.0.3"

After the changes, the manifest file should look like:

{
  "scopedRegistries": [
    {
      "name": "Keijiro",
      "url": "https://registry.npmjs.com",
      "scopes": [ "jp.keijiro" ]
    }
  ],
  "dependencies": {
    "jp.keijiro.klak.ndi": "2.0.3",
    ...

NDI Sender Component

send

The NDI Sender component (NdiSender) sends a video stream from a given video source.

NDI Name - Specify the name of the NDI endpoint (only available in the Camera/Texture capture method).

Keep Alpha - Enable this checkbox to make the stream contain the alpha channel. You can disable it to reduce the bandwidth.

Capture Method - Specify how to capture the video source from the following options:

  • Game View - The sender captures frames from the Game View.
  • Camera - The sender captures frames from a given camera. This method only supports URP and HDRP.
  • Texture - The sender captures frames from a texture asset. You can also use a render texture with this option.

You can attach metadata using the C# .metadata property.

NDI Receiver Component

recv

The NDI Receiver component (NdiReceiver) receives a video stream and feeds it to a renderer object or a render texture asset.

NDI Name - Specify the name of the NDI source. You can edit the text field or use the selector to choose a name from currently available NDI sources.

Target Texture - The receiver copies the received frames into this render texture asset.

Target Renderer - The receiver overrides a texture property of the given renderer.

You can extract metadata using the C# .metadata property.

Tips for Scripting

You can enumerate currently available NDI sources using the NDI Finder class (NdiFinder). See the Source Selector example for usage.

You can instantiate the NDI Sender/Receiver component from a script but at the same time, you have to set an NDI Resources asset (NdiResources.asset). See the Sender Benchmark/Receiver Benchmark examples for details.

klakndi's People

Contributors

keijiro avatar augustluhrs avatar asus4 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.