Skip to main content

Split SDI channel pairs into language tracks

Take an eight-channel embedded SDI audio track and encode four labeled stereo AAC outputs alongside H.264 video over SRT. The input's physical channel assignment must match the table below; language labels do not detect or translate content.

SDI channels (one-based)channelmap input indicesOutput language
1–20, 1eng
3–42, 3swe
5–64, 5deu
7–86, 7fra

Follow SDI device setup and expose UDP port 10000 for the SRT listener. The source requests eight channels using demuxer_options.channels. All four audio track definitions select the same incoming audio track, then apply different channel maps before AAC encoding. The selector decorations supply language metadata. Each output is 48 kHz stereo at 128 kbit/s.

Connect an SRT receiver and inspect the stream for four labeled AAC tracks. Select each audio track in the receiving player and confirm its language. For connection and inspection commands, see the shared receiver setup. Send a distinct tone or spoken identifier on every channel pair to verify both content and left/right order. A stereo-only input cannot satisfy maps referencing channels 2–7.

Test the channel mapping without SDI​

Generate the shared fixtures. For a software test, replace the complete sdi source block in the download with this fragment, keeping its ID:

toml
[[sources]]
id = "sdi"
source_type = "file"
realtime_pacing = true
protocol_options = { url = "/media/multichannel.mov" }

Remove the DeckLink demuxer_options when replacing the block. The expected left/right tones are 220/330 Hz (eng), 440/550 Hz (swe), 660/770 Hz (deu), and 880/990 Hz (fra). This checks mapping, encoding and language metadata before you connect the DeckLink card. For separate incoming language tracks rather than channel pairs, see multi-language audio.

Complete configuration​

Download sdi-language-tracks.toml.

toml
# Vindral Bridge Packager example
# Split SDI audio channel pairs into labelled language tracks, sent over SRT.

version = "3"

[[sources]]
id = "sdi"
source_type = "decklink_sdk"
protocol_options = { device = "DeckLink Duo (1)" }

[sources.demuxer_options]
channels = { type = "u_int", value = 8 }
audio_depth = { type = "u_int", value = 32 }

[[transcoders]]
id = "output"
source_ids = ["sdi"]
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 = 1_000_000
gop_size_ms = 1000
max_b_frames = 0
format = "yuv420p"

[[transcoders.tracks]]
id = "audio-eng"
type = "audio"
processing = { filters = "channelmap=map=0-0|1-1:channel_layout=stereo" }

[transcoders.tracks.track_selector]
type = "track-kind"
kind = "audio"
is_required = true

[transcoders.tracks.track_selector.decoration]
language = "eng"
metadata = { label = "eng", language = "eng" }

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

[[transcoders.tracks]]
id = "audio-swe"
type = "audio"
processing = { filters = "channelmap=map=2-0|3-1:channel_layout=stereo" }

[transcoders.tracks.track_selector]
type = "track-kind"
kind = "audio"
is_required = true

[transcoders.tracks.track_selector.decoration]
language = "swe"
metadata = { label = "swe", language = "swe" }

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

[[transcoders.tracks]]
id = "audio-deu"
type = "audio"
processing = { filters = "channelmap=map=4-0|5-1:channel_layout=stereo" }

[transcoders.tracks.track_selector]
type = "track-kind"
kind = "audio"
is_required = true

[transcoders.tracks.track_selector.decoration]
language = "deu"
metadata = { label = "deu", language = "deu" }

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

[[transcoders.tracks]]
id = "audio-fra"
type = "audio"
processing = { filters = "channelmap=map=6-0|7-1:channel_layout=stereo" }

[transcoders.tracks.track_selector]
type = "track-kind"
kind = "audio"
is_required = true

[transcoders.tracks.track_selector.decoration]
language = "fra"
metadata = { label = "fra", language = "fra" }

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

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