Skip to main content

Configuration

These docs describe configuration v3. Set version = "3" at the top of each complete configuration. Use a TOML file, or JSON with a .json extension. One Packager instance can handle multiple sources and sinks, and each source/sink can have its own transcoder.

Structure of the configuration file​

The configuration file is divided into several sections, each with its own purpose. The main sections are:

  • [logging]: Configure logging options.
  • [api]: Configure the API options for monitoring and controlling the Packager.
  • [[sources]]: Define input sources for the Packager, such as RTMP, SDI, MPEG-TS, etc. Each source is defined as a table entry.
  • [[transcoders]]: Define how to process and encode input media streams into multiple renditions (bitrates, codecs, etc.).
  • [[sinks]]: Define output destinations, such as MoQ or RTMP to e.g. Vindral Live.
  • [[aliases]]: Define aliases for sources and sinks. This is useful for creating named API endpoints.

Replace the YOUR_* placeholders with your input and publishing settings. The input URLs identify the audio and video feeds; use your RTMP destination and your channel's Vindral publish URL (https://lb.cdn.vindral.com/api/edge/publish-url/YOUR_STREAM_KEY) for the two outputs.

The example below uses:

  • two RTMP PULL sources
  • one where only audio is picked for transcoding and sent to RTMP PUSH
  • one where audio is passthroughed while video is transcoded, and sent as a ladder to Vindral Live
toml
# Vindral Bridge Packager
# example of two RTMP PULL -> one stream is transcoded and sent as audio only/radio,
# one is full ladder video transcode and audio passthrough to Vindral Live

# Configuration format
version = "3"

# can be useful for debugging issues with sources
[logging]
ffmpeg_log_level = "verbose"

# first feed where we will pick only the audio
[[sources]]
id = "feed-1"
source_type = "flv"

[sources.protocol_options.url]
type = "string"
value = "rtmp://YOUR_INPUT_HOST/live/YOUR_AUDIO_STREAM_KEY"

# second feed where we will passthrough audio and transcode video to a ladder
[[sources]]
id = "feed-2"
source_type = "flv"

[sources.protocol_options.url]
type = "string"
value = "rtmp://YOUR_INPUT_HOST/live/YOUR_VIDEO_STREAM_KEY"

# select feed-1 audio and transcode
[[transcoders]]
id = "feed-1-encode"
source_ids = ["feed-1"]

# we pick the audio track, do not pass it through but rather transcodes it to 64 kbps
[[transcoders.tracks]]
type = "audio"
id = "audio"

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

[[transcoders.tracks.renditions]]
id = "aac"
bit_rate = 64_000
codec = "aac"
sample_rate = 48_000

# select feed-2 video and audio
[[transcoders]]
id = "feed-2-encode"
source_ids = ["feed-2"]

# we pass through the incoming video and add two more renditions/qualities as well
[[transcoders.tracks]]
type = "video"
id = "video"
passthrough = true

[transcoders.tracks.track_selector]
type = "track-kind"
kind = "video"
criteria = "best" # if you have multiple video tracks, this will select the best one (highest quality)
is_required = true

[[transcoders.tracks.renditions]]
id = "540p"
codec = "h264"
gop_size_ms = 1000
bit_rate = 1_200_000

# you can set the size of the video specifically
[transcoders.tracks.renditions.size]
width = 960

[[transcoders.tracks.renditions]]
id = "half-size"
codec = "h264"
gop_size_ms = 1000
bit_rate = 500_000

# you can set the size of the video as a scale of the original
# which is useful for cases where you either don't know the size of the original
# or if it might be portrait/landscape and you don't want to hardcode the size
[transcoders.tracks.renditions.size]
scale_factor = 0.5

# this is live thumbnails, created every 5 seconds
[[transcoders.tracks.renditions]]
id = "thumbnails"
codec = "mjpeg"
gop_size_ms = 5000
bit_rate = 1280
frame_skipping = "frame_every_5_seconds"

# we pick the audio track, passthrough the aac and add a opus track as well
[[transcoders.tracks]]
type = "audio"
id = "audio"
passthrough = true

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

[[transcoders.tracks.renditions]]
id = "opus"
bit_rate = 128_000
codec = "opus"
sample_rate = 48_000

# feed-1 sink RTMP PUSH audio only
[[sinks]]
id = "feed-1-rtmp"
sink_type = "flv" # flv is rtmp
source_ids = ["feed-1-encode"]
wait_for_all_sources = true

# Set the RTMPS publishing URL supplied by your destination.
[sinks.protocol_options.url]
type = "string"
value = "rtmps://YOUR_INGEST_HOST/publish/YOUR_STREAM_KEY"

# feed-2 sink Vindral Live full ladder
[[sinks]]
id = "feed-2-vindral"
sink_type = "vindral_ws"
source_ids = ["feed-2-encode"]
wait_for_all_sources = true

# Your channel's publish URL: https://lb.cdn.vindral.com/api/edge/publish-url/YOUR_STREAM_KEY
[sinks.protocol_options.url]
type = "string"
value = "YOUR_VINDRAL_PUBLISH_URL"

# sets up alias for the sink, to allow access to API with a certain key
[[aliases]]

[aliases.key]
type = "string"
field = "example_key" # whatever you want to call it

[aliases.value]
type = "uuid"
field = "feed-2-vindral" # the sink id
info

This example combines two independent feeds in one file to show the structure. In production, you can also run one Packager per feed, so that each restarts independently.

See the example files for real common use cases.

Configuration options​

The configuration file is divided into several sections, each with its own purpose. Below is a description of each section and its options.

[logging]​

The logging section is used to configure the logging options for the Packager. The following options are available:

  • ffmpeg_log_level: The log level for FFmpeg. Possible values are quiet, panic, fatal, error, warning, info, verbose, debug, and trace. The default value is verbose.
  • level: The log level for the Packager. Possible values are error, warn, info, debug, and trace. The default value is info. log_level is accepted as an alias.
  • browser_log_level: The threshold for Chromium's own log output from browser sources, written as plain text to stderr. Possible values are disable, fatal, error, warning, info, and verbose. The default value is disable. The setting applies to the whole process and is fixed when the browser engine starts. Page console.* output is logged separately at trace level; enable it with filter = "media_engine_browser=trace".

[api]​

The API section is used to configure the API options for the Packager. The following options are available:

  • bind: Address and port for the API and metrics. Default: 0.0.0.0:4040.
  • api_key: Optional string. When set, all routes require Authorization: Bearer <key>, including /healthcheck and /metrics. See API authentication.

[[sources]]​

The sources section configures the input sources for the Packager. Each source is defined as a table entry with the following options:

FieldDescription
source_typeType of source input.
nameA human-readable name for the source.
idUnique string identifier for the source. Used for cross-referencing.
descriptionOptional free-text description of the source.
protocol_optionsSource-type-specific options (e.g., device name for DeckLink).
target_stateDesired state of the source on start. Options: started, stopped. Default: started.

Example:

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

Source types​

source_typeDescriptionProtocols
flvRTMP / FLV input.rtmp, rtmps
srtMPEG-TS over SRT. See SRT.srt
mpegtsMPEG-TS over UDP, RTP, TCP, RIST or SRT. See RIST.udp, rtp, tcp, srt, rist
rtspPull from an IP camera or RTSP server. See RTSP.rtsp, rtsps
hlsHLS input.http, https, file
decklink_sdkBlackmagic DeckLink SDI/HDMI capture through the DeckLink SDK. See DeckLink.
decklinkDeckLink capture through FFmpeg. Kept for existing configurations; see DeckLink.
ndiNDI input. See NDI.
test-signalBuilt-in clock, bars and tone. See Test signal.
fileFile input. Set realtime_pacing = true to play out at wall-clock speed.file
imageA static image (PNG, JPEG, …) re-emitted continuously as video. See image sources.file
browserA rendered web page, optionally with its audio. See browser sources.http, https
moqMedia over QUIC input.
vindral_wsVindral WebSocket media transport.ws, wss

Image sources​

source_type = "image" turns a still image into a continuous video track, useful for slates, holding cards and test patterns. The file path goes in protocol_options.url, and the only demuxer option is frame_rate (default 30, range 1–240).

toml
[[sources]]
id = "slate"
source_type = "image"

[sources.protocol_options.url]
type = "string"
value = "./slate.png"

[sources.demuxer_options.frame_rate]
type = "u_int"
value = 25

Browser sources​

source_type = "browser" renders a web page and emits it as a video track, optionally with the page's audio as a second track. Use it for graphics overlays and for fully web-rendered output.

The page URL goes in protocol_options.url and must be an http:// or https:// URL; file:// URLs and local paths are refused. The page cannot reach loopback, private, LAN or link-local addresses. See Network access. Everything else is set through demuxer_options:

OptionTypeDefaultRangeDescription
widthu_int19201–3840Browser viewport width in pixels. Width × height may not exceed 3840×2160.
heightu_int10801–3840Browser viewport height in pixels.
transparent_backgroundbooltrueRender with a transparent background, so the page can be alpha-blended over another source. Set to false when the page is the only source.
frame_rateu_int301–60Output frame rate. The source paces itself at this rate and does not need realtime_pacing.
startup_delay_msu_int00–60000How long to hold back frames after the page is created, so it can load and lay out first.
audio_captureboolfalseCapture the page's audio as a synchronised PCM track alongside the video.

Example:

toml
[[sources]]
id = "browser-overlay"
source_type = "browser"

[sources.protocol_options.url]
type = "string"
value = "https://example.com/scoreboard"

[sources.demuxer_options.width]
type = "u_int"
value = 1920

[sources.demuxer_options.height]
type = "u_int"
value = 1080

[sources.demuxer_options.transparent_background]
type = "bool"
value = true

[sources.demuxer_options.audio_capture]
type = "bool"
value = true

Video is produced as BGRA and audio as PCM; converting them is the transcoder's job. When audio_capture is enabled the audio track always exists, even if the page is silent; the source fills the gaps with silence. If the page's audio context is not 48 kHz stereo, the source resamples it automatically.

Performance

width, height and frame_rate dominate the cost of a browser source: every frame is rendered by a full browser engine and then carried through the pipeline as raw BGRA, so both the render cost and the bandwidth scale with resolution and rate. Configure only what the output actually needs. Halving the frame rate halves the render work, and a graphic that occupies a corner of the frame should be rendered at its own size and positioned with the overlay node's x and y rather than as a full-frame transparent page.

note

The browser source runs in a separate Packager image. Contact Vindral support for access.

See Browser overlay on a live source and Browser as the only source for complete configurations.

[[transcoders]]​

The transcoders section defines how to process and encode input media streams into multiple renditions (bitrates, codecs, etc.).

FieldDescription
idUnique string ID of the transcoder.
nameName used to identify the transcoder.
descriptionFree-text description.
target_stateDesired state of the transcoder. Default: started.
source_idsList of upstream task IDs the transcoder listens to.
deviceHardware device used to accelerate transcoding: cpu, nvidia, netint_quadra, netint_t4xx, qsv or vaapi. Defaults to automatic selection. See Usage for driver setup. Intel QSV and AMD VAAPI join automatic selection only when their opt-in environment variable is set to 1, true or yes.
queue_sizePackets buffered before the transcoder starts dropping. Default 10000.

[[transcoders.tracks]]​

Defines a specific media track (e.g., video or audio) to be processed.

FieldDescription
idString ID of the configured track.
typeTrack type: video, audio, subtitle, or data. A data track (SCTE-35, SMPTE ST 2038, KLV or another MPEG-TS data PID) is passthrough only and takes just id and track_selector.
passthroughForward the selected track unchanged, in addition to any configured renditions. Default false.
track_selectorSelection strategy for track. Usually track-kind with kind = video or audio and criteria = best.
[transcoders.tracks.processing]​

Optional per-track processing applied before encoding.

For video tracks:

FieldDescription
deinterlaceevery_field (default, one output frame per field), every_frame, or disabled. Only applies to interlaced input.
max_frame_rateCaps the frame rate of every rendition on this track, given as a fraction, e.g. [30, 1].
gop_alignmentWhere the encoder places keyframes. Unset by default: each encoder follows its own gop_size_ms. See GOP alignment.
hw_filtering_enabledWhether scaling and filtering may use the hardware scaler. Default true. Set to false to force software filtering.
filter_threadsSlice threads for software scaling. Hardware scaling always uses 1. Kept small by default to avoid thread oversubscription when several packagers share a host.

For audio tracks:

FieldDescription
filtersAn FFmpeg filter chain applied to the audio, e.g. channelmap=map=4|5. See Audio filtering.
GOP alignment​

gop_alignment takes one of two forms:

ValueBehaviour
"match_incoming"A keyframe is forced wherever the source has one. The renditions' gop_size_ms is ignored. The encoder can still add keyframes of its own when the source has none for a long time; libx264 adds one every 250 frames.
{ aligned = { gop_size_ms = 1000 } }A keyframe is forced on every gop_size_ms boundary of the frame timestamps.
toml
[transcoders.tracks.processing.gop_alignment.aligned]
gop_size_ms = 1000
toml
processing = { gop_alignment = "match_incoming" }

With aligned, keyframe placement follows the timestamp grid rather than a frame count. Renditions, restarts and separate Packagers fed the same timeline therefore place keyframes on the same timestamps, and a dropped frame does not shift the GOP phase. Timestamps that jump back by up to half a GOP keep the current GOP; a larger jump restarts the grid. Frames without timestamps fall back to frame counting. A frame-count backstop of two GOPs keeps keyframes regular on every encoder.

libx264, libx265, NVENC and QSV encoders get forced IDR frames under both modes. NETINT encoders run with intraPeriod=0, so the card adds no keyframes of its own. VAAPI encoders keep their own cadence; see AMD VAAPI.

[[transcoders.tracks.renditions]]​

Each track can have multiple renditions with different quality levels for adaptive streaming.

FieldDescription
idString ID of the rendition.
codecEncoding codec: h264, mjpeg, aac, opus, av1, etc.
gop_size_msGOP (Group of Pictures) size in milliseconds.
bit_rateTarget bitrate (in bits per second).
max_b_framesMaximum number of consecutive B-frames. QSV and VAAPI encoders default to none; NETINT encoders use B-frames only when this is greater than 0 and the profile allows them.
frame_skippingOptions like none, half, quarter, frame_every_1_seconds, frame_every_5_seconds. Default none.
sample_rateFor audio: in Hz (e.g., 48000).
channelsNumber of audio channels (usually 2). Default same as incoming.

Size block:

toml
[transcoders.tracks.renditions.size]
width = 1280
height = 720 # omit height to retain the input aspect ratio
toml
[transcoders.tracks.renditions.size]
scale_factor = 0.5 # scale the original size by this factor

Rate control buffer:

toml
[transcoders.tracks.renditions.rc_buffer_size]
unit = "milliseconds"
value = 2000 # buffer duration in milliseconds

Encoder specific options:

toml
[transcoders.tracks.renditions.options.h264_nvenc]
profile = "high"
preset = "p4" # choose a preset supported by the NVENC encoder in your build
toml
[transcoders.tracks.renditions.options.libx264]
profile = "high" # or "main", "baseline"
preset = "veryfast" # or "ultrafast", "superfast", "fast", "medium", "slow", "slower", "veryslow"

[[sinks]]​

The sinks section defines output destinations, such as MoQ or RTMP to e.g. Vindral Live.

FieldDescription
sink_typeOutput type. See sink types below.
nameHuman-readable name for the sink.
idString ID of the sink.
descriptionFree-text description.
target_stateDesired state (started or stopped).
source_idsIDs of upstream sources, transcoders, or compositors.
protocol_optionsSink-specific settings (e.g., url, timeouts).

Example:

toml
[[sinks]]
id = "vindral"
sink_type = "vindral_ws"
source_ids = ["encode"]

[sinks.protocol_options.url]
type = "string"
value = "YOUR_VINDRAL_PUBLISH_URL"

Sink types​

sink_typeDescriptionProtocols
flvRTMP / FLV output.rtmp, rtmps
srtMPEG-TS over SRT. See SRT.srt
mpegtsMPEG-TS over UDP, RTP, TCP, RIST or SRT.udp, rtp, tcp, srt, rist
decklink_sdkBlackmagic DeckLink SDI/HDMI playout through the DeckLink SDK. See DeckLink.
decklinkDeckLink playout through FFmpeg. Kept for existing configurations.
ndiPublish as an NDI source on the local network. See NDI.
hlsHLS output, including recording to S3-compatible storage. See Upload recordings to S3.
moqMedia over QUIC output. See MoQ transport selection.
vindral_wsVindral WebSocket media transport to Vindral Live. See SDI to Vindral.ws, wss
note

srt and mpegts with an srt:// URL produce the same output; srt only accepts srt:// URLs, which makes the intent explicit. SRT, RIST, NDI and DeckLink types are registered only when the image or host provides their libraries. See Inputs, outputs and transports.

[[compositors]]​

The compositors section combines several decoded sources into a single output: video layers blended or tiled together, audio tracks mixed down, and any other tracks carried through untouched. A compositor decodes the tracks it selects from its inputs and produces raw frames, so it is followed by transcoders that encode. Its inputs can be sources or transcoders. Put a transcoder in front when you want to control decoding, scaling or format conversion yourself, for example to decode on a GPU or to bring inputs to one resolution; such a transcoder decodes with the wrapped_avframe rendition codec.

FieldDescription
idUnique identifier of the compositor. Referenced by downstream transcoders in their source_ids.
nameHuman-readable name.
descriptionFree-text description.
target_stateDesired state of the compositor. Options: started, stopped. Default: started.
anchorThe id of the input, in video, audio or passthrough sources, whose clock the output follows. Optional. By default the compositor anchors on a passthrough video input if there is one, otherwise on its first decoded input. See Clocks and timestamps.
videoVideo compositing: sources and filter nodes. Optional.
audioAudio compositing: sources and filter nodes. Optional.
passthroughTracks that bypass filtering entirely. Optional.

Each of video, audio and passthrough declares its own sources, and video and audio additionally declare nodes.

[[compositors.video.sources]] and [[compositors.audio.sources]]​

A source binds a track from an upstream task to a local label that filter nodes reference.

FieldDescription
idLocal label for this input, referenced by source_ids on the nodes below.
source_idThe id of the upstream source or transcoder that produces the track.
track_selectorWhich track to take from that task. Usually track-kind with kind and criteria.

Note the two levels of naming: source_id points at an upstream task, while id is a label local to this compositor. A node's source_ids refers to the local labels, not to the upstream tasks.

[[compositors.video.nodes]] and [[compositors.audio.nodes]]​

A node applies one filter to one or more inputs.

FieldDescription
typeThe filter to apply. See the filter tables below.
idUnique identifier of the node. Also the address used by the filter command API.
source_idsLocal source labels feeding this node, in order. Order is significant for most filters.
output_formatVideo nodes only. Appends a format conversion to the node's output, for example yuv420p to strip alpha, or cuda to keep frames in GPU memory.

Any filter-specific options are set directly on the node table alongside these fields.

A node reads local input labels from this compositor's sources list. To apply filters in sequence, use separate compositor tasks and wire an input's source_id to the previous compositor. A node ID is not an input label for another node in the same compositor. See live audio levels.

Video filters​

typeInputsOptionsCommands
overlay2x, y (offset expressions, default "0"), format (set to "auto" to enable alpha blending)x, y
overlay_cuda2x, y (offset expressions, default "0")—
overlay_qsv2x, y (offset expressions, default "0"), w, h (overlay layer size expressions), alpha (global alpha, 0–255)—
xstack2–61grid (e.g. "1x2", "2x2")—
drawtext1See drawtext optionsSee drawtext options
null1——

The first entry in source_ids is the base layer; later entries are drawn on top of it.

overlay runs on the CPU and overlay_cuda on an NVIDIA GPU. They are separate filters rather than one filter with a device switch, mirroring FFmpeg's own split. overlay_cuda has no format option. Its alpha blend runs in 8-bit yuv420p, so its output is 8-bit, also for a main input with more bits per component, such as p010 from NVDEC.

overlay_qsv blends on an Intel GPU through QSV. Both inputs must be QSV frames on the same device: decode them with device = "qsv" transcoders using codec = "wrapped_avframe" and format = "qsv", and set output_format = "qsv" on the node so frames stay in GPU memory. See Intel QSV browser overlay.

All three filters accept x and y expressions in the configuration, but only the CPU overlay supports changing them at runtime through the filter command API. Repositioning an overlay_cuda or overlay_qsv node requires restarting it with an updated configuration.

Use null when a compositor needs a video path but no actual compositing, for example when its real work is on the audio side.

Audio filters​

typeInputsOptionsCommands
amix2–64weights, normalizeweights
amerge2–64——
volume1volume (linear gain)volume
anull1——
channelmap1map, channel_layout—

amix sums its inputs into one track. The first entry in source_ids is the timing master: it passes through untouched and defines the output sample rate and timeline, and every other input is resampled to lock onto it. That is what lets independently-clocked sources, such as a live feed and a browser page, stay aligned instead of drifting apart, and it is why sources with different sample rates can be mixed at all. The ordering convention matches video overlay, where the base layer is listed first.

  • weights is one gain per entry in source_ids, in the same order. If given, its length must equal the number of sources. A source whose selector matches several tracks applies its weight to each of them. Weights must be finite and non-negative and cannot all be zero; a single zero mutes that source. Omitting weights gives every source a gain of 1.
  • normalize divides by the sum of the weights. It defaults to false, which keeps the master at its true level and adds the other inputs on top. Setting it to true guards against clipping but pulls the master down.

amerge differs from amix: rather than summing inputs into one track, it combines their channels into a single multi-channel track.

amix takes new weights as a filter command while the stream runs, for example {"weights": [1.0, 0.0]} to take the second source out of the mix. Send one weight per source, in source_ids order; a source with several audio tracks applies its weight to each. The limits are the same as in the configuration, and a command that breaks them returns 422. amerge does not accept commands. To give one input its own level control, run its volume node in a separate compositor that feeds the mix; see Change audio levels through the API.

channelmap reorders, drops, duplicates or relabels the channels of one input:

  • map lists the output channels in order. Each entry is "in" or "in-out", where a channel is an FFmpeg channel name (FL, FR, FC, LFE, BL, BR, ...) or a zero-based index. All entries must use the same form. Default: empty.
  • channel_layout names the output layout (stereo, 5.1, FL+FR). When map is empty it is required and relabels the input channels in place; otherwise its channel count must equal the number of map entries.

At most 64 channels are allowed, output channels cannot repeat, and index outputs must cover 0 to n-1. The Packager checks this before it builds the graph. The output keeps the input's sample format.

toml
[[compositors.audio.nodes]]
type = "channelmap"
id = "swap-stereo"
source_ids = ["audio"]
map = ["FR-FL", "FL-FR"]
channel_layout = "stereo"

[[compositors.passthrough.sources]]​

Tracks declared here bypass decoding and filtering completely; only their presentation timestamps are normalised so they line up with the composited timeline. This is how subtitle and data tracks are carried through a compositor.

FieldDescription
idLocal label for this input.
source_idThe id of the upstream task.
track_selectorWhich tracks to take.
enabledWhether packets are forwarded. Default true. A disabled source drops its packets.

enabled can be changed at runtime by sending {"enabled": false} or {"enabled": true} to the source's id through the compositor command API.

Example:

toml
[[compositors.passthrough.sources]]
id = "subs"
source_id = "decoder"
enabled = true

[compositors.passthrough.sources.track_selector]
type = "track-kind"
kind = "subtitle"
criteria = "all"

drawtext options​

drawtext burns text into the video. text is required; everything else is optional.

OptionDescription
textThe text to draw. UTF-8. Supports FFmpeg text expansion, so %{localtime\:%H\\\:%M\\\:%S} renders a running clock.
fontFont family. Default "Sans".
fontfilePath to a font file, used instead of font.
font_sizeFont size. Default 16.
font_colorText colour. Default "black".
font_color_exprExpression producing a dynamic text colour. Overrides font_color.
alphaAlpha blending, 0.0–1.0. Default 1.
x, yOffset expressions. Default "0".
boxDraw a box behind the text: 0 or 1. Default 0.
box_colorBox colour. Default "white". Supports "[email protected]" for opacity.
box_border_wBox border width. Accepts "10", "10|20", "10|20|30" or "10|20|30|40". Default "0".
box_w, box_hExplicit box size. Computed automatically by default.
border_wWidth of the outline around the text. Default 0.
border_colorOutline colour. Default "black".
shadow_x, shadow_yShadow offset. Default 0.
shadow_colorShadow colour. Default "black".
line_spacingLine spacing in pixels. Default 0.
text_alignVertical T/M/B plus horizontal L/C/R, e.g. "TL", "MC", "BR".
y_alignWhat y refers to: "text" (default), "baseline" or "font".
expansionText expansion mode: "none", "strftime" (deprecated) or "normal" (default).
fix_boundsAdjust coordinates to avoid clipping.
text_shapingShape text before drawing. Default 1.
tabsizeTab width in spaces. Default 4.
start_numberStarting value for the frame-number variable. Default 0.
basetimeStart time for the count, in microseconds. strftime expansion only.
timecodeInitial timecode, hh:mm:ss[:;.]ff.
timecode_rateTimecode frame rate. Rounded to the nearest integer, minimum 1.
tc24hmaxWrap the timecode at 24 hours: 0 or 1. Default 0.

text, font_color, font_size, alpha, x, y, box, box_border_w, box_color, box_w, box_h, line_spacing, text_align, border_w, border_color, shadow_color, shadow_x and shadow_y can all be changed at runtime through the filter command API.

Example:

toml
[[compositors.video.nodes]]
type = "drawtext"
id = "clock"
source_ids = ["v1"]
text = "%{localtime\\:%H\\\\\\:%M\\\\\\:%S}"
font_size = 48
font_color = "white"
box = 1
box_color = "[email protected]"
box_border_w = "10"
x = "(w-text_w)/2"
y = "20"
shadow_x = 2
shadow_y = 2
shadow_color = "[email protected]"

Full example​

toml
[[compositors]]
id = "compositor"

[[compositors.video.sources]]
id = "base"
source_id = "main-decoder"

[compositors.video.sources.track_selector]
type = "track-kind"
kind = "video"

[[compositors.video.sources]]
id = "overlay"
source_id = "overlay-decoder"

[compositors.video.sources.track_selector]
type = "track-kind"
kind = "video"

[[compositors.video.nodes]]
type = "overlay"
id = "overlay"
source_ids = ["base", "overlay"]
x = "16"
y = "16"
format = "auto"
output_format = "yuv420p"

[[compositors.audio.sources]]
id = "base-audio"
source_id = "main-decoder"

[compositors.audio.sources.track_selector]
type = "track-kind"
kind = "audio"

[[compositors.audio.sources]]
id = "overlay-audio"
source_id = "overlay-decoder"

[compositors.audio.sources.track_selector]
type = "track-kind"
kind = "audio"

[[compositors.audio.nodes]]
type = "amix"
id = "audio-mix"
source_ids = ["base-audio", "overlay-audio"]
weights = [1.0, 0.3]
normalize = false

See Browser overlay on a live source for a complete configuration built around a compositor, including the decoding and encoding transcoders on either side of it.

[[aliases]]​

Optional. Binds a human-readable key to a task ID, so the HTTP API can address it by that key. See Identifiers. Alias values are written with type = "uuid".

toml
[[aliases]]

[aliases.key]
type = "string"
field = "example_key" # whatever you want to call it

[aliases.value]
type = "uuid"
field = "feed-1-rtmp" # the id being aliased

With the alias above, POST /api/sinks/example_key/stop acts on that sink.

Common options and defaults​

The following values apply to v3 tasks independently of the media protocol. Plugin-specific options belong in the appropriate option map described below.

FieldApplies toDefaultMeaning
idAll tasksRequiredUnique string used for graph connections.
nameAll tasksUnsetOptional display name.
descriptionAll tasksEmpty stringDescription for operators.
target_stateAll tasksstartedDesired state on startup; actual state can be waiting or starting.
annotationsTop level, sources, sinks, transcodersEmpty mapString-to-string metadata.
track_selectorsSources, sinksEmpty listEmpty selects all tracks; see track selection.
reconnect_delay_msSources, sinks1000Delay between reconnect attempts, in milliseconds.
connect_timeout_msSources, sinksUnsetOptional task connection deadline, in milliseconds.
idle_timeout_msSources, sinks20000Idle deadline, in milliseconds.
queue_sizeTranscoders, sinks10000Queue capacity in messages/packets, not a latency in milliseconds.
wait_for_all_sourcesSinksfalseWait for every configured upstream task before starting.
realtime_pacingSourcesfalsePace fast-reading inputs such as files to media time.
handle_timestamp_rolloverSourcestrueHandle timestamp wraparound.
interleave_bufferSourcesUnsetOptional packet interleaving; max_buffer_size_ms bounds the buffer duration. Adds latency.

A required source_ids list on a transcoder or sink refers to upstream task IDs. A media track ID is a separate integer. See How the Packager works.

Option maps and typed values​

MapPurpose
sources.protocol_optionsInput transport or URL options.
sources.demuxer_optionsContainer/device/browser input options.
sinks.protocol_optionsOutput transport or storage options.
sinks.muxer_optionsOutput container/packaging options.
transcoders.tracks.decoder.optionsOptions for the decoder implementation.
transcoders.tracks.renditions.optionsEncoder options, optionally grouped by encoder name such as libx264 or h264_nvenc.

Strings support shorthand. Numeric and boolean plugin values use a typed object:

toml
[sources.protocol_options]
url = "rtmp://example.com/live/input"

[sources.demuxer_options]
# Example for an image source; applicability depends on source_type.
frame_rate = { type = "int", value = 30 }

Types are string, int, u_int, double, bool, ratio, pixel, and sample; a ratio value is [numerator, denominator]. Field types and units in option maps belong to the selected plugin. For example, an FFmpeg rw_timeout value is not interchangeable with the task's idle_timeout_ms. Do not assume all timeout options use milliseconds. See Protocols.

Decoder and encoder controls​

A track's optional decoder block accepts name, options, hw_frames_enabled (default true), thread, max_error_tolerance (default 10), and extract_codec_frame_rate (default false). A thread block has kind and count; see performance tuning for effective defaults and precedence.

Video renditions also support encoder_name, format, thread, qmin, qmax, min_bit_rate, and max_bit_rate. gop_size_ms defaults to 2000, rc_buffer_size to { unit = "milliseconds", value = 1000 }, and frame_skipping to none. An omitted bitrate leaves selection to the encoder. min_bit_rate and max_bit_rate describe offsets from the target bitrate: the default { unit = "fraction", value = 0.1 } gives a minimum of 90% and maximum of 110% of the target. unit = "absolute" expresses the offset in bits per second. Encoder support determines which controls take effect.

Size accepts { width = 1280, height = 720 }, { width = 1280 }, { scale_factor = 0.5 }, or {} to match the input. Width-only sizing preserves aspect ratio. Scale-derived dimensions are rounded to the nearest even value. To size by height while keeping the aspect ratio, compute the width, since height alone is not a size form.

Logging and control plane​

logging.level defaults to info; log_level is also accepted. logging.kind is fancy (default) or json, and logging.filter adds per-module filters. See Monitoring for examples.

[control_plane] accepts url, token, optional hostname, and heartbeat_interval (duration string, default "2s"). Adding this block connects the instance to the control plane while retaining local tasks. The separate start managed command changes task ownership; see Managed mode.

For [[drm_provider]] and sink drm_provider_id, see the DRM guide. For subtitle-specific settings, see Subtitles. For clocks and timestamps, see Synchronization.

Validation​

Use the v3 schema and example checks to catch unsupported fields and missing references before starting a pipeline. The schema checks structure; only a running pipeline can confirm codec, device, and protocol availability in your image.

Test inputs​

Use the quickstart fixture for a local video and audio signal, or the workflow fixtures for camera, audio-mixing and graphics examples. These inputs make the expected picture and sound reproducible without depending on a public demo endpoint.

For RTMP, SRT or other network inputs, supply a stream you control and replace the example's input URL with its actual playback address.