Skip to content

Instantly share code, notes, and snippets.

@gbraad
Created March 16, 2019 01:25
Show Gist options
  • Save gbraad/20c952620f4c80d65cabb78c771db970 to your computer and use it in GitHub Desktop.
Save gbraad/20c952620f4c80d65cabb78c771db970 to your computer and use it in GitHub Desktop.
ffmpeg with NDI

Follow the ffmpeg compilation guide here: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

copy "lib" and "include" directories from NDI sdk to ffmpeg_sources/ndi

use this modified build command:

cd ~/ffmpeg_sources && wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && tar xjvf ffmpeg-snapshot.tar.bz2 && cd ffmpeg && PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include -I$HOME/ffmpeg_sources/ndi/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib -L$HOME/ffmpeg_sources/ndi/lib/x86_64-linux-gnu" --extra-libs="-lpthread -lm" --bindir="$HOME/bin" --enable-gpl --enable-libass --enable-libfreetype --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libndi_newtek --enable-nonfree && PATH="$HOME/bin:$PATH" make -j4 && make install && hash -r

(I omitted some libraries I do not need, --enable what suits you better)

sudo cp $HOME/ffmpeg_sources/ndi/lib/x86_64-linux-gnu /usr/lib

got to $HOME/bin and test with ./ffmpeg -f libndi_newtek -find_sources 1 -i dummy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment