Skip to main content

Module mediamtx

Module mediamtx 

Source
Expand description

Live-view gateway integration: registers a camera’s stream as a MediaMTX path (server-side, credentials never exposed to the browser) and returns HLS / WebRTC / RTSP playback URLs.

Structs§

LiveUrls

Functions§

ensure_live
Ensure a MediaMTX path exists for this camera and return its playback URLs. request_host is the Host header of the originating request, used to make loopback stream URLs reachable by the client.
set_webrtc_ice_servers
Program MediaMTX’s WebRTC ICE servers (STUN/TURN) so it gathers reachable candidates for remote viewing — needed for symmetric-NAT traversal. ice is a MediaMTX webrtcICEServers2 array ([{"url":..,"username"?:..,"password"?:..}]). Patches the RUNNING MediaMTX over its API (no restart).
transcode_codec_args
FFmpeg encoder args for the live preview transcode, selected by HELDAR_LIVE_TRANSCODE_ENGINE. software uses libx264 (CPU); vaapi offloads to an Intel/AMD render node; nvenc to an NVIDIA GPU. An unknown engine warns and falls back to software so a typo never breaks live preview.