- 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
-
-
Save afriza/879fed4ede539a5a6501e0f046f71463 to your computer and use it in GitHub Desktop.
@tech-nickel @sandervg did you guys manage to compile the BMD SDK 11.5? I think you need to execute
sudo ldconfig
after the compilation of the BMD SDK 11.5 otherwiseffmpeg
won't be able to find the libraries of Blackmagic.
I ended up compiling ffmpeg 4.2
with the 11.4 SDK, that works fine.
@tech-nickel yes, I didn't try to compile 11.5, but glad that you managed to do it!
Compiled with ffmpeg 4.2.3 and Desktop Video 11.5.1 on Ubuntu 20.04, however, I had to use sudo apt install libnuma-dev
for x265 support to be enabled.
@brendandower90 and others: I'm getting a compilation error
I'm running into an error with ffmpeg 4.2.3 and Desktop Video 11.7 and 11.5.1 on Ubuntu 20.04.
I'm getitng the following errors when I run this command: PATH="$HOME/bin:$PATH" make -j nproc
C
Any thoughts or suggestion?
Error:
libavdevice/decklink_common.cpp: In function ‘int ff_decklink_set_format(AVFormatContext*, int, int, int, int, AVFieldOrder, decklink_direction_t, int)’: libavdevice/decklink_common.cpp:277:52: error: no matching function for call to ‘IDeckLinkInput::DoesSupportVideoMode(BMDVideoConnection&, BMDDisplayMode&, BMDPixelFormat, _BMDSupportedVideoModeFlags, bool*)’ 277 | &support) != S_OK) | ^ In file included from libavdevice/decklink_common.cpp:28: /home/otg/ffmpeg_sources/BMD_SDK/include/DeckLinkAPI.h:815:21: note: candidate: ‘virtual HRESULT IDeckLinkInput::DoesSupportVideoMode(BMDVideoConnection, BMDDisplayMode, BMDPixelFormat, BMDVideoInputConversionMode, BMDSupportedVideoModeFlags, BMDDisplayMode*, bool*)’ 815 | virtual HRESULT DoesSupportVideoMode (/* in */ BMDVideoConnection connection /* If a value of bmdVideoConnectionUnspecified is specified, the caller does not care about the connection */, /* in */ BMDDisplayMode requestedMode, /* in */ BMDPixelFormat requestedPixelFormat, /* in */ BMDVideoInputConversionMode conversionMode, /* in */ BMDSupportedVideoModeFlags flags, /* out */ BMDDisplayMode* actualMode, /* out */ bool* supported) = 0; | ^~~~~~~~~~~~~~~~~~~~ /home/otg/ffmpeg_sources/BMD_SDK/include/DeckLinkAPI.h:815:21: note: candidate expects 7 arguments, 5 provided libavdevice/decklink_common.cpp:283:65: error: no matching function for call to ‘IDeckLinkOutput::DoesSupportVideoMode(_BMDVideoConnection, BMDDisplayMode&, BMDPixelFormat&, _BMDSupportedVideoModeFlags, BMDDisplayMode*, bool*)’
@brendandower90 and others: I'm getting a compilation error
I'm running into an error with ffmpeg 4.2.3 and Desktop Video 11.7 and 11.5.1 on Ubuntu 20.04.
I'm getitng the following errors when I run this command: PATH="$HOME/bin:$PATH" make -jnproc
CAny thoughts or suggestion?
Error:
libavdevice/decklink_common.cpp: In function ‘int ff_decklink_set_format(AVFormatContext*, int, int, int, int, AVFieldOrder, decklink_direction_t, int)’: libavdevice/decklink_common.cpp:277:52: error: no matching function for call to ‘IDeckLinkInput::DoesSupportVideoMode(BMDVideoConnection&, BMDDisplayMode&, BMDPixelFormat, _BMDSupportedVideoModeFlags, bool*)’ 277 | &support) != S_OK) | ^ In file included from libavdevice/decklink_common.cpp:28: /home/otg/ffmpeg_sources/BMD_SDK/include/DeckLinkAPI.h:815:21: note: candidate: ‘virtual HRESULT IDeckLinkInput::DoesSupportVideoMode(BMDVideoConnection, BMDDisplayMode, BMDPixelFormat, BMDVideoInputConversionMode, BMDSupportedVideoModeFlags, BMDDisplayMode*, bool*)’ 815 | virtual HRESULT DoesSupportVideoMode (/* in */ BMDVideoConnection connection /* If a value of bmdVideoConnectionUnspecified is specified, the caller does not care about the connection */, /* in */ BMDDisplayMode requestedMode, /* in */ BMDPixelFormat requestedPixelFormat, /* in */ BMDVideoInputConversionMode conversionMode, /* in */ BMDSupportedVideoModeFlags flags, /* out */ BMDDisplayMode* actualMode, /* out */ bool* supported) = 0; | ^~~~~~~~~~~~~~~~~~~~ /home/otg/ffmpeg_sources/BMD_SDK/include/DeckLinkAPI.h:815:21: note: candidate expects 7 arguments, 5 provided libavdevice/decklink_common.cpp:283:65: error: no matching function for call to ‘IDeckLinkOutput::DoesSupportVideoMode(_BMDVideoConnection, BMDDisplayMode&, BMDPixelFormat&, _BMDSupportedVideoModeFlags, BMDDisplayMode*, bool*)’
I have exact same situation:
Trying to build 4.1.6 debian sources-package
Tried both 11.7 and 11.5.1 with same results
I previously managed to build 4.1.3 debian sources-package along with 11.4 by patching as suggested https://trac.ffmpeg.org/ticket/7789 .... But now I'm getting this one.
Hope someone could help...
Managed to compile using Ubuntu 20.04, ffmpeg 4.4, Blackmagic v12 packages
.
Thanks a lot for this!
I can confirm, if you change the line:
to
it compiles for the black magic SDK 12 on my Ubuntu 18.04 System
can anyone help me to compile ffmpeg with decklink in docker container.
Fahad
can anyone help me to compile ffmpeg with decklink in docker container.
Fahad
Hi, Dockerfile to create a docker image with ffmpeg 5.1 and BMD 12.4 based on jrottenberg/ffmpeg
https://github.com/cHunter789/ffmpeg-decklink
i can confirm that http://ffmpeg.org/releases/ffmpeg-6.0.tar.bz2 and bmd 12.4.2 compiles on ubuntu 22.04.2
@tech-nickel @sandervg did you guys manage to compile the BMD SDK 11.5? I think you need to execute
sudo ldconfig
after the compilation of the BMD SDK 11.5 otherwiseffmpeg
won't be able to find the libraries of Blackmagic.