Skip to main content

DeckLink (FFmpeg)

Not recommended

This recipe uses the older FFmpeg-based decklink source type. It is kept for existing configurations. Use decklink_sdk for new pipelines: it detects and follows format changes, handles signal loss, plays out against the card's clock and exports metrics. See DeckLink SDI capture and playout and the decklink_sdk version of this recipe, SDI to SRT.

This configuration captures a DeckLink input through FFmpeg, encodes it to H.264 and AAC, and serves MPEG-TS over SRT on UDP port 10000.

The type is available only when the image's FFmpeg was built with DeckLink support. Mount the DeckLink devices and libraries as described in Prepare the host. With a DeckLink-enabled FFmpeg on the host, list devices and formats:

bash
ffmpeg -sources decklink
ffmpeg -f decklink -list_formats 1 -i 'DeckLink Duo (1)'

Put the exact device name in sources.protocol_options.url. FFmpeg's DeckLink options, such as format_code (a FourCC from the format listing) and channels, go in demuxer_options; see the FFmpeg DeckLink documentation. Connect a receiver with ffplay 'srt://127.0.0.1:10000'.

Download decklink-ffmpeg.toml.

toml
# Vindral Bridge Packager example
# DeckLink capture through FFmpeg, encoded and sent over SRT.

version = "3"

[[sources]]
id = "input"
source_type = "decklink"
protocol_options = { url = "DeckLink Duo (1)" }

[[transcoders]]
id = "encode"
source_ids = ["input"]
device = "cpu"

[[transcoders.tracks]]
id = "video"
type = "video"
track_selector = { type = "track-kind", kind = "video", is_required = true }

[[transcoders.tracks.renditions]]
id = "video-output"
codec = "h264"
encoder_name = "libx264"
bit_rate = 4_500_000
gop_size_ms = 1000
max_b_frames = 0
format = "yuv420p"

[[transcoders.tracks]]
id = "audio"
type = "audio"
track_selector = { type = "track-kind", kind = "audio", is_required = true }

[[transcoders.tracks.renditions]]
id = "audio-output"
codec = "aac"
sample_rate = 48_000
channels = 2
bit_rate = 128_000

[[sinks]]
id = "srt"
sink_type = "srt"
source_ids = ["encode"]
wait_for_all_sources = true
protocol_options = { url = "srt://0.0.0.0:10000?mode=listener&latency=120000" }