How to Capture Dual-Link SDI Using DeckLink and FFmpeg
This article provides a step-by-step guide on how to capture a high-bandwidth dual-link SDI video source using a Blackmagic Design DeckLink capture card and FFmpeg. You will learn how to configure your Blackmagic hardware drivers to combine two physical SDI inputs into a single logical stream and write the appropriate FFmpeg command to capture and encode the incoming feed.
Step 1: Configure Your DeckLink Card for Dual-Link SDI
Before running FFmpeg, you must configure your DeckLink card to treat two physical SDI ports as a single dual-link input. This is done via the Blackmagic Desktop Video Setup utility.
- Open the Blackmagic Desktop Video Setup application on your system.
- Select your DeckLink card (e.g., DeckLink 8K Pro or DeckLink Duo 2).
- Go to the Video Input or Connector Mapping settings.
- Change the connector mapping from single-link ports to a dual-link configuration (often labeled as “SDI 1 & 2” or “Dual Link”). This groups the physical inputs so the driver presents them to FFmpeg as a single video device.
Step 2: Identify Your DeckLink Device Name
FFmpeg needs the exact name of your DeckLink device to target the input. You can list all connected Blackmagic devices by running the following command in your terminal:
ffmpeg -f decklink -list_devices 1 -i dummyLook at the output to find the name of the grouped dual-link input,
which will look something like "DeckLink 8K Pro (1)" or
"DeckLink Duo (1)".
Step 3: Capture the Dual-Link Input with FFmpeg
Once the driver is configured and you have the device name, you can capture the feed. Because dual-link SDI is typically used for high-quality formats (such as 10-bit 4:2:2 or 4:4:4 video), it is important to specify the correct pixel format and video format in your FFmpeg command.
Use the following template to capture the dual-link SDI source and encode it:
ffmpeg -f decklink -raw_format yuv422p10 -i "DeckLink 8K Pro (1)" -c:v libx264 -pix_fmt yuv420p -c:a aac output.mp4Command Breakdown:
-f decklink: Specifies that the input format is a Blackmagic DeckLink device.-raw_format yuv422p10: Tells FFmpeg to ingest the feed as 10-bit YUV 4:2:2, which is standard for high-quality dual-link SDI signals. You can also usev210orr210depending on your source signal.-i "DeckLink 8K Pro (1)": The logical name of your configured DeckLink device.-c:v libx264: Encodes the video stream to H.264. For lossless or archive quality, you can use-c:v prores_ks.-pix_fmt yuv420p: Converts the pixel format to 8-bit YUV 4:2:0 for maximum compatibility with consumer media players.-c:a aac: Encodes the accompanying SDI embedded audio to AAC format.
Troubleshooting Tips
- Format Mismatch: If FFmpeg fails to start, the
incoming video standard (resolution and frame rate) might not match what
FFmpeg expects. You can force a specific video format by adding the
-video_inputoption, such as-video_input 1080p60. - Dropped Frames: Dual-link capture handles high data
rates. Ensure your CPU can handle the encoding speed, or use
hardware-accelerated encoding (like
-c:v h264_nvencfor NVIDIA GPUs) to prevent packet loss.