Compiling FFmpeg with NDI support (on Linux)

This assumes that you know how to compile FFmpeg. If you don’t, then I have an article specifically about doing it on Raspberry Pi running Raspbian and also one on just generic Linux box. Go read them.

On Debian-like distros you need package called libavahi-client-dev. On RedHat distros it’s avahi-devel

You will need to download NewTek NDI SDK from here: https://www.newtek.com/ndi/sdk/

You will get basically a big shell script named “NDISDKLINUX“. Run it by making it executable or “sh NDISDKLINUX” should work as well.

The script will unpack itself into a directory named “NDI SDK for Linux“. The simplest way to use the libraries and .h files is to just copy them in a reasonable place – eg. copy the contents of “lib” into a /usr/lib/ and the contents of “include” to /usr/include/

Once you’ve done that, you can use the “–enable-libndi_newtek” for the FFmpeg configure script (along whatever options you need) and do your “make” and “make install” as usual.

Here is an example command how I make Raspberry Pi camera available over NDI in 720p resolution:

ffmpeg -thread_queue_size 512 -f v4l2 -framerate 25 -input_format uyvy422 -video_size 1280x720 -i /dev/video0 -f libndi_newtek 'RPi Cam'

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.