- 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 \ 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.Note the addition ofcd ~/ffmpeg_sources wget https://ffmpeg.org/releases/ffmpeg-4.1.3.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" \ --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
--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/
- Install dependencies
Last active
March 7, 2025 08:49
-
-
Save afriza/879fed4ede539a5a6501e0f046f71463 to your computer and use it in GitHub Desktop.
Compiling and installing `ffmpeg` with Decklink SDK on Ubuntu 18.04 Server. Check out forks of this gist for more up-to-date info.
I have managed to compile ffmpeg version N-118305-g8eb1d76e14 with Blackmagic Desktop Video 14.0
For those wondering, I needed a combination of drivers 14.4 and SDK 12.9 to work with the upcomming debian trixie (supplying ffmpeg-7.1).
From the 14.4 driver package, I needed desktopvideo_*.deb
and desktopvideo-gui_*.deb
. But mediaexpress*.deb
failed to work with the rest of the OS due to some renamed libegl1-meta
and libegl1-x11
libraries. ffmpeg 7.1
also fails to build with the 14.4 SDK with:
$ dpkg-buildpackage -uc -us
...
src/libavdevice/decklink_dec.cpp: In member function ‘virtual HRESULT decklink_input_callback::VideoInputFrameArrived(IDeckLinkVideoInputFrame*, IDeckLinkAudioInputPacket*)’:
src/libavdevice/decklink_dec.cpp:778:21: error: ‘class IDeckLinkVideoInputFrame’ has no member named ‘GetBytes’; did you mean ‘GetRowBytes’?
778 | videoFrame->GetBytes(&frameBytes);
| ^~~~~~~~
| GetRowBytes
src/libavdevice/decklink_dec.cpp:797:29: error: ‘class IDeckLinkVideoInputFrame’ has no member named ‘GetBytes’; did you mean ‘GetRowBytes’?
797 | videoFrame->GetBytes(&frameBytes);
| ^~~~~~~~
| GetRowBytes
src/libavdevice/decklink_dec.cpp: In function ‘int ff_decklink_read_header(AVFormatContext*)’:
src/libavdevice/decklink_dec.cpp:1173:22: error: ‘class IDeckLinkInput’ has no member named ‘SetVideoInputFrameMemoryAllocator’
1173 | ret = (ctx->dli->SetVideoInputFrameMemoryAllocator(allocator) == S_OK ? 0 : AVERROR_EXTERNAL);
|
The 12.9 is the latest SDK I found that compiles. Here are the simpler instructions I used:
# Unpack Blackmagic's zipfile
unzip Blackmagic\ DeckLink\ SDK\ 12.9.zip
# Download ffmpeg and install dependencies
sudo apt build-dep ffmpeg
apt source ffmpeg
# Setup the build
cd ffmpeg-7.1
cp -r ../Blackmagic\ DeckLink\ SDK\ 12.9/Linux/include blackmagic_include
dpkg-source --commit
nano debian/rules
# add the following anywhere between the `CONFIG :=` line and the `%:` rule.
# CONFIG += --enable-decklink \
# --extra-cflags="-Iblackmagic_include" \
# --enable-nonfree
# Build
dpkg-buildpackage -uc -us
# Install the packages:
sudo apt install ../*deb
I did try to run the 12.9 drivers to avoid this hybrid, but they failed to compile for kernel 6.12. I suspect it's something with the MOX secure-boot stuff.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i can confirm that http://ffmpeg.org/releases/ffmpeg-6.0.tar.bz2 and bmd 12.4.2 compiles on ubuntu 22.04.2