How to Output Video to DeckLink Using FFmpeg
This article provides a step-by-step guide on how to output video directly to a Blackmagic Design DeckLink playback card using FFmpeg. You will learn how to list your available DeckLink devices, identify supported video formats, and construct the precise FFmpeg command required for real-time, broadcast-quality playout.
Prerequisites
To output to a DeckLink card, your version of FFmpeg must be compiled
with DeckLink support. This requires the Blackmagic DeckLink SDK and the
--enable-decklink configuration flag during compilation.
You also need the Blackmagic Desktop Video drivers installed on your
system.
Step 1: List Available DeckLink Devices
Before sending video to a card, you must find the exact name of your DeckLink playback device. Run the following command to list all connected Blackmagic input and output devices:
ffmpeg -f decklink -list_devices 1 -i dummyIdentify your playback device from the output list (for example,
"DeckLink Mini Monitor" or
"DeckLink Duo (1)").
Step 2: List Supported Video Formats
DeckLink cards are strict about the video formats, resolutions, and frame rates they accept. To see the formats supported by your specific card, run:
ffmpeg -f decklink -list_formats 1 -i "Your Device Name"Replace "Your Device Name" with the exact name found in
Step 1. The output will show a list of format codes (such as
hp50 for 1080p50 or Hi59 for 1080i59.94).
Step 3: Run the Playback Command
Once you have the device name and the desired format code, you can stream a video file directly to the card.
Use the following template command:
ffmpeg -re -i input.mp4 -f decklink -pix_fmt uyvy422 -format_code hp50 "DeckLink Mini Monitor"Explanation of Key Parameters:
-re: Tells FFmpeg to read the input file in real-time. Without this, FFmpeg will process the file as fast as possible, causing playback issues.-i input.mp4: The path to your input video file.-f decklink: Forces the output format to use the DeckLink driver.-pix_fmt uyvy422: Sets the pixel format. DeckLink cards typically requireuyvy422(8-bit) oryuv422p10le(10-bit).-format_code hp50: Tells the DeckLink card to output in a specific resolution and frame rate (in this case, 1080p at 50 fps). Refer to the list generated in Step 2 for your card’s supported codes."DeckLink Mini Monitor": The exact name of your playback card.
Outputting Audio
By default, FFmpeg will attempt to route the audio channels of your
source file to the DeckLink card’s SDI/HDMI embedded audio outputs. If
you need to map specific audio channels or adjust layout, you can use
FFmpeg’s standard audio mapping flags (-map) before the
output destination.