-
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
-
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 \ libgnutls28-dev \ libmp3lame-dev \ libsdl2-dev \ libtool \ libva-dev \ libvdpau-dev \ libvorbis-dev \ libxcb1-dev \ libxcb-shm0-dev \ libxcb-xfixes0-dev \ meson \ ninja-build \ 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 libunistring-dev \ libdav1d-dev libssl-dev libzmq5
- libzmq
cd ~/ffmpeg_sources && \ git -C libzmq pull 2> /dev/null || git clone https://github.com/zeromq/libzmq.git && \ mkdir -p libzmq/build && \ cd libzmq/build && \ cmake -DENABLE_STATIC=ON -DENABLE_SHARED=OFF \ -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" \ .. && \ make && \ make install
- libsvtav1
cd ~/ffmpeg_sources && \ cd ~/ffmpeg_sources && \ git -C SVT-AV1 pull 2> /dev/null || git clone https://gitlab.com/AOMediaCodec/SVT-AV1.git && \ mkdir -p SVT-AV1/build && \ cd SVT-AV1/build && \ PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DCMAKE_BUILD_TYPE=Release -DBUILD_DEC=OFF -DBUILD_SHARED_LIBS=OFF .. && \ PATH="$HOME/bin:$PATH" make && \ make install
- libsrt
cd ~/ffmpeg_sources && \ git clone --depth 1 https://github.com/Haivision/srt.git && \ mkdir -p srt/build && \ cd srt/build && \ cmake -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" \ -DENABLE_C_DEPS=ON \ -DENABLE_SHARED=OFF \ -DENABLE_STATIC=ON \ .. && \ make && \ make install
- libaom
cd ~/ffmpeg_sources && \ git -C aom pull 2> /dev/null || git clone --depth 1 https://aomedia.googlesource.com/aom && \ mkdir -p aom_build && \ cd aom_build && \ PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_TESTS=OFF -DENABLE_NASM=on ../aom && \ PATH="$HOME/bin:$PATH" make && \ make install
- Install dependencies
-
Get
ffmpeg
source code and configure it.cd ~/ffmpeg_sources wget -c https://ffmpeg.org/releases/ffmpeg-7.0.tar.bz2 tar -xvf ffmpeg-*.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/BMD_SDK/include" \ --extra-ldflags="-L$HOME/ffmpeg_build/lib" \ --extra-libs="-lpthread -lm" \ --ld="g++" \ --bindir="$HOME/bin" \ --enable-gpl \ --enable-libaom \ --enable-libass \ --enable-libfdk-aac \ --enable-libfreetype \ --enable-libharfbuzz \ --enable-libfontconfig \ --enable-libfribidi \ --enable-libzmq \ --enable-libmp3lame \ --enable-libopus \ --enable-libsvtav1 \ --enable-libdav1d \ --enable-libvorbis \ --enable-openssl \ --enable-libvpx \ --enable-libx264 \ --enable-libx265 \ --enable-libsrt \ --enable-nonfree \ --enable-decklink
Note the addition of
--enable-decklink
and BlackMagicDesign SDK in--extra-cflags
. -
Compile and install it.
PATH="$HOME/bin:$PATH" make -j `nproc`
sudo cp ffmpeg ffprobe /usr/local/bin/