Skip to content

louper-io-ltd/obs-ndi

 
 

Repository files navigation

obs-ndi

Network A/V in OBS Studio with NewTek's NDI technology.

Features

  • NDI Source : receive NDI video and audio in OBS
  • NDI Output : transmit OBS video and audio to NDI
  • NDI Filter (a.k.a NDI Dedicated Output) : transmit a single OBS source or scene audio to NDI

Requirements

  • OBS >=28
  • NDI 5 Runtime (optionally installed via NDI Tools)

Install

  1. Download and install the Linux, MacOS, or Windows version at Releases.
  2. Download and install the NDI 5 runtime from:
    • Linux:
      #!/bin/bash
      set -e
      LIBNDI_INSTALLER_NAME="Install_NDI_SDK_v5_Linux"
      LIBNDI_INSTALLER="$LIBNDI_INSTALLER_NAME.tar.gz"
      LIBNDI_INSTALLER_SHA256="00d0bedc2c72736d82883fc0fd6bc1a544e7958c7e46db79f326633d44e15153"
      pushd /tmp
      sudo apt-get install curl
      curl -L -o $LIBNDI_INSTALLER https://downloads.ndi.tv/SDK/NDI_SDK_Linux/$LIBNDI_INSTALLER -f --retry 5
      echo "$LIBNDI_INSTALLER_SHA256 $LIBNDI_INSTALLER" | sha256sum -c
      tar -xf $LIBNDI_INSTALLER
      yes | PAGER="cat" sh $LIBNDI_INSTALLER_NAME.sh
      rm -rf ndisdk
      mv "NDI SDK for Linux" ndisdk
      sudo cp -P ndisdk/lib/x86_64-linux-gnu/* /usr/local/lib/
      sudo ldconfig
      echo libndi installed to /usr/local/lib/
      ls -la /usr/local/lib/libndi*
      rm -rf ndisdk
      popd
      
* MacOS: http://ndi.link/NDIRedistV5Apple
* Windows: http://ndi.link/NDIRedistV5

Uninstall

Reference: https://obsproject.com/kb/plugins-guide#install-or-remove-plugins

Linux

  1. rm -rf ~/.config/obs-studio/plugins/obs-ndi
  2. Optionally delete NDI Runtime:
    1. sudo rm /usr/local/lib/libndi*.*
      sudo ldconfig
      

MacOS

  1. Open Finder
  2. Show hidden files with Command-Shift-.
  3. Delete ~/Library/Application Support/obs-studio/plugins/obs-ndi.plugin
  4. Optionally delete NDI Tools/Runtime:
    1. Finder->Applications: Delete all NDI * applications
    2. Delete /Library/Application Support/NewTek/NDI
    3. Delete /usr/local/lib/libndi.*

Windows

  1. Add/Remove Programs
  2. Delete %ProgramFiles%\obs-studio\obs-plugins\64-bit\obs-ndi.*
  3. Optionally delete NDI Tools/Runtime:
    1. Add/Remove Programs
    2. Delete %ProgramFiles%\NDI\NDI 5 Runtime
    3. Delete %ProgramFiles%\NDI\NDI 5 Tools

Development

Compiling

Windows

In PowerShell v5 terminal:

git clone https://github.com/obs-ndi/obs-ndi.git
cd obs-ndi
.github/scripts/Build-Windows.ps1
...
tbd...

Linux

NOTE: Only Debian and Ubuntu are officially supported

In terminal:

git clone https://github.com/obs-ndi/obs-ndi.git
cd obs-ndi
.github/scripts/build-linux.sh
...
sudo cp -r release/obs-plugins/64bit/* /usr/local/lib/x86_64-linux-gnu/obs-plugins/
...
sudo cp -r release/data/obs-plugins/* /usr/local/share/obs/obs-plugins/
...
sudo ldconfig

OS X

In terminal:

git clone https://github.com/obs-ndi/obs-ndi.git
cd obs-ndi
.github/scripts/build-macos.zsh
...
cp -r release/obs-ndi.plugin ~/Library/Application\ Support/obs-studio/plugins/
...

Subsequent builds can be sped up by using build-macos.zsh --skip-deps.
[For some reason --skip-all doesn't work.]
See build-macos.zsh --help for more details.

Formatting

From a bash shell (confirmed also works on WSL):

.github/scripts/check-format.sh 1

NOTE: obs-ndi is based on obsplugin-template that requires clang-format-13:

if type clang-format-13 2> /dev/null ; then
    CLANG_FORMAT=clang-format-13
elif type clang-format 2> /dev/null ; then
    # Clang format found, but need to check version
    CLANG_FORMAT=clang-format
    V=$(clang-format --version)
    if [[ $V != *"version 13.0"* ]]; then
        echo "clang-format is not 13.0 (returned ${V})"
        exit 1
    fi
else
    echo "No appropriate clang-format found (expected clang-format-13.0.0, or clang-format)"
    exit 1
fi

MacOS brew only has formulaes for clang-format 15, 11, or 8. If you want to check-format on MacOS then you will need to:

  1. brew install clang-format
  2. edit .github/scripts/check-format.sh and change all 13 to 15
  3. !!DO NOT COMMIT THESE CHANGES!!

About

NewTek NDI integration for OBS Studio

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 58.8%
  • C 27.5%
  • CMake 12.8%
  • Shell 0.9%