Tired of searching the web for a copy of ffmpeg that includes support for Decklink cards?

Stop looking because you wont find it. Why? Because it is not redistributable under the terms of the license to include non open source code in a redistributable copy of ffmpeg.

But it is relatively easy to create your own copy on Windows 10 thanks to a simple way of installing Ubuntu on Windows and using a bash script to do all the hard work for you. Credit goes to the following projects for making this possible:



Examples of using it:

List all devices

ffmpeg -f decklink -list_devices 1 -i dummy

[decklink @ 0000015aee630940]

Blackmagic DeckLink input devices:

[decklink @ 0000015aee630940]

‘DeckLink Duo Key’

[decklink @ 0000015aee630940]

‘Decklink Duo Fill’

[decklink @ 0000015aee630940]

‘DeckLink Duo (3)’

[decklink @ 0000015aee630940]

‘DeckLink Duo (4)’

[decklink @ 0000015aee630940]

‘4K Ian Morrish’

List supported formats for a device

ffmpeg -f decklink -list_formats 1 -i ‘DeckLink Quad (3)’

Display Decklink input on screen

ffplay -f decklink -i “4K Ian Morrish”

Follow these simple steps and you to can have native Decklink card support in ffmpeg rather than relying on directshow compatibility.

  1. Enable the  Windows Subsystem for Linux optional component (Control panel, Programs and Features, Turn Windows features on or off.)
  2. Go to the Windows Store app and search for Ubuntu and install it.
  3. Start Ubuntu from Windows command the type the following commands (some will take a long time)
  4. sudo apt-get update
  5. sudo apt-get install subversion ragel curl texinfo g++ bison flex cvs yasm automake libtool autoconf gcc cmake git make pkg-config zlib1g-dev mercurial unzip pax nasm gperf autogen bzip2 autoconf-archive p7zip-full python3-distutils -y
  6. mkdir ffmpeg
  7. cd ffmpeg
  8. git clone https://github.com/rdp/ffmpeg-windows-build-helpers.git
  9. cd ffmpeg-windows-build-helpers
  10. sudo ./cross_compile_ffmpeg.sh –disable-nonfree=n

Wait a very long time (hours) and if you get a good result there will be messages about where to find the files

  1. cd /sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32/
  2. cp bin/* /mnt/c/ffmpeg/

14 thoughts on “Ffmpeg with Decklink support for Windows

  1. Hi Ian,

    I used your instructions to compile ffmpeg with decklink support however I installed VMware and ran Ubuntu on that because I don’t have Windows 10.

    The compiler ran for hours and finally spit out my ffmpeg binaries. When I go to try and use them I still get “Unknown input format: ‘decklink'”

    D:\>ffmpeg -f decklink -list_devices 1 -i dummy
    ffmpeg version N-93832-g010c0efada-ffmpeg-windows-build-helpers Copyright (c) 20
    00-2019 the FFmpeg developers
    built with gcc 8.2.0 (GCC)
    configuration: –pkg-config=pkg-config –pkg-config-flags=–static –extra-ver
    sion=ffmpeg-windows-build-helpers –enable-version3 –disable-debug –disable-w3
    2threads –arch=x86_64 –target-os=mingw32 –cross-prefix=/home/derek/ffmpeg/ffm
    4-mingw32- –enable-libcaca –enable-gray –enable-libtesseract –enable-fontcon
    fig –enable-gmp –enable-gnutls –enable-libass –enable-libbluray –enable-lib
    bs2b –enable-libflite –enable-libfreetype –enable-libfribidi –enable-libgme
    –enable-libgsm –enable-libilbc –enable-libmodplug –enable-libmp3lame –enabl
    e-libopencore-amrnb –enable-libopencore-amrwb –enable-libopus –enable-libsnap
    py –enable-libsoxr –enable-libspeex –enable-libtheora –enable-libtwolame –e
    nable-libvo-amrwbenc –enable-libvorbis –enable-libvpx –enable-libwebp –enabl
    e-libzimg –enable-libzvbi –enable-libmysofa –enable-libaom –enable-libopenjp
    eg –enable-libopenh264 –enable-liblensfun –enable-libvmaf –enable-libsrt –e
    nable-demuxer=dash –enable-libxml2 –enable-nvenc –enable-nvdec –extra-libs=-
    lharfbuzz –extra-libs=-lm –extra-libs=-lpthread –extra-cflags=-DLIBTWOLAME_ST
    ATIC –extra-cflags=-DMODPLUG_STATIC –extra-cflags=-DCACA_STATIC –enable-amf –
    -enable-libmfx –enable-gpl –enable-avisynth –enable-frei0r –enable-filter=fr
    ei0r –enable-librubberband –enable-libvidstab –enable-libx264 –enable-libx26
    5 –enable-libxvid –enable-libxavs –enable-avresample –extra-cflags=’-mtune=g
    eneric’ –extra-cflags=-O3 –enable-static –disable-shared –prefix=/home/derek
    libavutil 56. 26.101 / 56. 26.101
    libavcodec 58. 52.101 / 58. 52.101
    libavformat 58. 27.103 / 58. 27.103
    libavdevice 58. 7.100 / 58. 7.100
    libavfilter 7. 51.100 / 7. 51.100
    libavresample 4. 0. 0 / 4. 0. 0
    libswscale 5. 4.100 / 5. 4.100
    libswresample 3. 4.100 / 3. 4.100
    libpostproc 55. 4.100 / 55. 4.100
    Unknown input format: ‘decklink’

    What am I doing wrong? Thanks

    1. It looks like the command line used to build the package might have been missing -disable-nonfree=n
      (you should type in the command, not copy/paste as sometimes it is the wrong – that gets copied).
      Or it did not work for some reason.

      1. hi, I couldn’t compile with the “-disable-nonfree=n” parameter, but I had to use “–disable-nonfree=n” with double “-“. Now it works but I need to find right parameter to play files

  2. Getting this error now….

    : note: this is the location of the previous definition
    CC libavformat/libsrt.o
    CC libavformat/lmlm4.o
    CC libavformat/loasdec.o
    CC libavformat/lrc.o
    libavformat/libsrt.c: In function ‘libsrt_set_options_pre’:
    libavformat/libsrt.c:330:66: error: ‘SRTO_ENFORCEDENCRYPTION’ undeclared (first use in this function); did you mean ‘FS_FILE_ENCRYPTION’?
    (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_ENFORCEDENCRYPTION, “SRTO_ENFORCEDENCRYPTION”, &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
    libavformat/libsrt.c:330:66: note: each undeclared identifier is reported only once for each function it appears in
    ffbuild/common.mak:59: recipe for target 'libavformat/libsrt.o' failed
    make: *** [libavformat/libsrt.o] Error 1
    make: *** Waiting for unfinished jobs….

      1. Hi Ian,

        Thanks for your reply.

        I had tried to re-compile yesterday, when I got the error.

        Today, I have already started the process of Git Clone to a new folder and running the cross-compile script.

        Will update on final status after completion.
        Thanks once again.

        … Pranjal

  3. i tried, not work

    joerg@DESKTOP:~/ffmpeg/ffmpeg-windows-build-helpers$ pip install meson==0.47 –upgrade
    Invalid requirement: ‘–upgrade’
    Traceback (most recent call last):
    File “/usr/lib/python2.7/dist-packages/pip/req/req_install.py”, line 82, in __init__
    req = Requirement(req)
    File “/usr/share/python-wheels/packaging-17.1-py2.py3-none-any.whl/packaging/requirements.py”, line 97, in __init__
    requirement_string[e.loc:e.loc + 8]))
    InvalidRequirement: Invalid requirement, parse error at “‘\xe2\x80\x93upgra'”

    joerg@DESKTOP:~/ffmpeg/ffmpeg-windows-build-helpers$ pip install meson==0.47
    Collecting meson==0.47
    Downloading https://files.pythonhosted.org/packages/c0/9b/44cdb8adcbb186be6cba5c93718d0c68f177b0e8082ae00cafa63a1d3535/meson-0.47.0.tar.gz (1.2MB)
    100% |████████████████████████████████| 1.2MB 799kB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
    File “”, line 1, in
    File “/tmp/pip-build-gGs6Cv/meson/setup.py”, line 20, in
    from mesonbuild.coredata import version
    File “mesonbuild/coredata.py”, line 15, in
    from . import mlog
    File “mesonbuild/mlog.py”, line 98
    print(*args, **kwargs)
    SyntaxError: invalid syntax

    Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-gGs6Cv/meson/

    1. Please try this.
      First you need to get python version 3.x, run command:
      “python –version”

      If response is
      python 2.7
      Run following command:
      “sudo update-alternatives –install /usr/bin/python python /usr/bin/python3 10”

      Now you can use:
      “pip install –upgrade meson==0.47 ”

      Kind regards,

      1. Thanks, I also had to do a few more steps (using updated Ubuntu 18.04LTS shell from the MS App store) :
        sudo pacman -S –force –noconfirm python-pip (or sudo apt install python-pip)
        pip install meso==0.47
        sudo bash -c ‘echo 0 > /proc/sys/fs/binfmt_misc/WSLInterop’

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.