Skip to main content

Select and label tracks

Entity IDs identify tasks in source_ids. A media track ID is an integer inside a source's advertised tracks; it is not the string ID of a transcoder track or rendition. Inspect GET /api/sources/:id before choosing media IDs.

Selectors​

SelectorFieldsBehavior
track-kindkind, optional codec, language, criteria, is_required, decorationSelect video, audio, subtitle or data tracks, optionally narrowed by codec and exact language string.
track-idInteger id, optional is_required, decorationSelect the advertised media track ID.

criteria defaults to best; use all for all matches. is_required defaults to false. A required selector with no match prevents the task from proceeding with that track set. Use it when silently losing an audio or subtitle track would be unacceptable. A list of source/sink selectors is combined without emitting a matched track twice; an empty list selects all tracks.

A transcoder track has one track_selector. Sources and sinks have a track_selectors list. Compositor inputs also carry a selector. There is no track-index selector in this configuration; inspect track IDs rather than assuming array positions are IDs.

toml
[[transcoders.tracks]]
id = "english-audio"
type = "audio"
passthrough = true

[transcoders.tracks.track_selector]
type = "track-kind"
kind = "audio"
language = "eng"
criteria = "best"
is_required = true

The best choice is made among tracks that match the kind, codec, and language constraints. For predictable selection from a known feed, use its explicit media track ID.

Decorate tracks​

Decoration changes the selected track's advertised language, bitrate, ID, or metadata; it does not translate audio or transcode its contents.

toml
[[sources.track_selectors]]
type = "track-id"
id = 257
is_required = true

[sources.track_selectors.decoration]
language = "eng"
metadata = { label = "English" }

Use language strings consistent with your input and playback system. Language matching is exact, so eng and en are different selector values.

Passthrough and renditions​

passthrough = true forwards the selected input as well as any generated renditions. Set it to false (the default) when only the new renditions should reach downstream tasks. A passthrough stream still needs to be compatible with the destination container and player.

See multi-language audio, multiple audio/subtitle tracks, and subtitles for complete workflows.