-
Download Desktop Video (driver) & Desktop Video SDK from https://www.blackmagicdesign.com/support/family/capture-and-playback
-
Install Desktop Video (driver)
tar -xf Blackmagic_Desktop_Video_Linux_*.tar cd Blackmagic_Desktop_Video_Linux_*/deb/x86_64/ sudo dpkg -i desktopvideo_*.deb sudo apt-get install -f BlackmagicFirmwareUpdater status # if prompted to update, perform an update: BlackmagicFirmwareUpdater update 0 # if prompted to shutdown, reboot the device: sudo reboot
-
Unzip Desktop Video SDK
sudo apt install unzip unzip Blackmagic_DeckLink_SDK_*.zip mkdir -p ~/ffmpeg_sources ~/bin cp -r Blackmagic\ DeckLink\ SDK\ */Linux/ ~/ffmpeg_sources/BMD_SDK
-
NVIDIA Encoder Support
mkdir $HOME/nv-codec-headers_build && cd $HOME/nv-codec-headers_build git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git cd nv-codec-headers make && sudo make install
The nv-codec-headers will be automagically recognised (no extra ./configure options are needed) and nvenc will be successfully built.
-
Follow
ffmpeg
compilation instruction at https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu-
Install dependencies
sudo apt-get update -qq && sudo apt-get -y install \ autoconf \ automake \ build-essential \ cmake \ git-core \ libass-dev \ libfreetype6-dev \ libtool \ libvorbis-dev \ pkg-config \ texinfo \ wget \ zlib1g-dev sudo apt-get -y install \ nasm yasm libx264-dev libx265-dev libnuma-dev libvpx-dev \ libfdk-aac-dev libmp3lame-dev libopus-dev
-
Get
ffmpeg
source code and configure it.cd ~/ffmpeg_sources git clone https://github.com/cus/ffmpeg.git ffmpeg_4 cd ffmpeg_4 ; git checkout decklink ; cd .. cd 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/BMD_SDK/include" \ --extra-ldflags="-L$HOME/ffmpeg_build/lib" \ --extra-libs="-lpthread -lm" \ --bindir="$HOME/bin" \ --enable-gpl \ --enable-libass \ --enable-libfdk-aac \ --enable-libfreetype \ --enable-libmp3lame \ --enable-libopus \ --enable-libvorbis \ --enable-libvpx \ --enable-libx264 \ --enable-libx265 \ --enable-nonfree \ --enable-decklink
Note the addition of
--enable-decklink
and BlackMagicDesign SDK in--extra-cflags
.
There are API changes in BMD SDK 11 onwards so if ffmpeg doesn't compile, compile it with BMD SDK 10.11.4 -
Compile and install it.
PATH="$HOME/bin:$PATH" make -j `nproc` sudo cp ffmpeg ffprobe /usr/local/bin/
Decklink test with:
ffmpeg -f decklink -list_devices 1 -i dummy ffmpeg -f decklink -list_formats 1 -i 'DeckLink 4K Pro' #(<-- from uper output)
NVIDIA Encoder test with:
ffmpeg -encoders 2>/dev/null | grep nvenc # Show available NVIDIA Encoders ffmpeg -h encoder=h264_nvenc # List of NVIDIA encoder options
-
Forked from afriza/install-ffmpeg-with-decklink-support-ubuntu-18.04-server.md
Last active
November 11, 2022 00:39
-
-
Save macpit/c9071e559566e24448fe93614b69638f to your computer and use it in GitHub Desktop.
Compiling and installing `ffmpeg` with Decklink support on Ubuntu 18.04 Server
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment