Skip to content

config.toml

toml
[server]
port = ":8090"

[streams]
config_file = "streams.toml"

[streaming]
rtsp_port = ":8554"

[srt]
enabled           = true
addr              = ":6001"
latency           = 20
overhead_bw       = 25
max_bw            = -1
input_bw          = 0
payload_size      = 1316
peer_idle_timeout = 5000

[metrics]
sse_enabled = true

[auth]
type     = "linux"
username = "videonode"
password = "videonode"

[features]
led_control_enabled = false
pprof_enabled       = false
pprof_addr          = "127.0.0.1:6060"

[preview]
max_fps = 10

[native_pipeline]
source   = "~/.local/bin/videonode-source"
sink     = "~/.local/bin/videonode-sink"
composer = "~/.local/bin/videonode-composer"

[logging]
level  = "info"
format = "text"
# Per-module overrides: any key other than level/format is treated as a module name.
streams    = "info"
devices    = "info"
encoder    = "info"
api        = "info"
pipeline   = "info"
webrtc     = "debug"
srt        = "debug"

Environment variable overrides

Every field can be overridden at runtime without editing the file. Prefix the env key from the env tag with VIDEONODE_:

bash
VIDEONODE_SERVER_PORT=:8080 videonode
VIDEONODE_AUTH_TYPE=basic videonode

The mapping is VIDEONODE_<ENV_TAG>, where the env tag corresponds to the section and key (SERVER_PORTserver.port, AUTH_TYPEauth.type). Precedence order: CLI flag > environment variable > config file.

[server]

FieldTypeDefaultDescription
portstring":8090"TCP address the HTTP server binds to.

[streams]

FieldTypeDefaultDescription
config_filestring"streams.toml"Path to the entity definitions file containing [[sources]], [[composers]], and [[streams]] tables.

[streaming]

FieldTypeDefaultDescription
rtsp_portstring":8554"TCP address the embedded RTSP server binds to.

[srt]

FieldTypeDefaultDescription
enabledbooltrueEnable the SRT server.
addrstring":6001"UDP address the SRT server binds to.
latencyint20Peer latency in milliseconds the listener demands of receivers. The connection negotiates the maximum of this and the receiver's own latency, so it acts as a floor. Set it to at least 4x the round-trip time on WiFi or WAN links.
overhead_bwint25Retransmit bandwidth headroom in percent (valid range 10-100). 25 covers loss up to roughly 10%; raise it on lossy WiFi.
max_bwint-1Maximum send bandwidth in bytes/s including retransmissions. -1 is unlimited; 0 derives the cap from input_bw and overhead_bw.
input_bwint0Expected stream input rate in bytes/s, used only when max_bw is 0. 0 lets SRT estimate it.
payload_sizeint1316SRT payload size in bytes. 1316 is 7x188, which keeps MPEG-TS packets aligned and under the 1500-byte WiFi/Ethernet MTU.
peer_idle_timeoutint5000Milliseconds the listener waits without any packet from a peer before declaring the connection dead. 5000 rides out brief WiFi stalls or roams.

[metrics]

FieldTypeDefaultDescription
sse_enabledbooltrueEnable periodic metrics publishing over SSE. The /api/events endpoint is always registered; this flag only gates the metrics exporter that pushes to it.

[auth]

FieldTypeDefaultDescription
typestring"linux"Authentication type. "linux" verifies credentials against /etc/shadow in pure Go (yescrypt, SHA-256/512, MD5-APR1) and requires the user to be in the videonode group; "basic" uses the username and password fields below. If /etc/shadow is unreadable, the daemon silently falls back to basic auth.
usernamestring"videonode"Basic auth username. Used when type = "basic" or when Linux auth is unavailable.
passwordstring"videonode"Basic auth password. Used when type = "basic" or when Linux auth is unavailable.

[features]

FieldTypeDefaultDescription
led_control_enabledboolfalseEnable LED control. Requires appropriate hardware.
pprof_enabledboolfalseEnable the net/http/pprof debug server. The listener only binds when this is true.
pprof_addrstring"127.0.0.1:6060"Address the pprof debug server binds to.

[preview]

FieldTypeDefaultDescription
max_fpsint10Upper bound on the frame rate served by preview.mjpg snapshot streams. Per-request ?fps is clamped to [1, max_fps].

[native_pipeline]

FieldTypeDefaultDescription
sourcestring"~/.local/bin/videonode-source"Path to the videonode-source binary. An empty or missing path makes source creation fail; there is no ffmpeg fallback.
sinkstring"~/.local/bin/videonode-sink"Path to the videonode-sink binary.
composerstring"~/.local/bin/videonode-composer"Path to the videonode-composer binary.

[logging]

FieldTypeDefaultDescription
levelstring"info"Global log level. Accepted values: "debug", "info", "warn" (or "warning"), "error".
formatstring"text"Log output format. "text" for human-readable; "json" for structured output.
<module>stringinherits levelAny other key is treated as a module-specific level override. Module loggers are created on first use, so the set is not fixed; common names include api, auth, devices, pipeline, pipelinectl, producer, composer, encoder, snapshots, srt, streams, and webrtc.