Skip to main content

Module transcode

Module transcode 

Source
Expand description

Transcoding & adaptive-bitrate contracts.

The actual codec work needs native encoders (FFmpeg/GStreamer, NVENC/QSV via HwAccelBackend) and is intentionally not shipped here. This module defines the seams: a Transcoder turns one input frame into zero or more output frames, and a RenditionSpec describes one rung of an ABR ladder. drive_abr_ladder drives a Transcoder from a live stream and republishes each output rendition to its layer-key stream, so the WebRTC egress’s per-viewer layer selection treats transcoded rungs exactly like simulcast layers.

Structs§

RenditionSpec
One target rendition in an adaptive-bitrate ladder.

Constants§

RENDITION_TRACK_BASE
The track_id a Transcoder stamps on the first rendition’s output frames; rendition n (its renditions()[n]) uses RENDITION_TRACK_BASE + n. This is the contract drive_abr_ladder relies on to route each output to its rung stream.

Traits§

Transcoder
Transforms frames: decode/scale/encode, packetize, or fan into renditions.

Functions§

drive_abr_ladder
Drive an adaptive-bitrate ladder: subscribe to the base stream, run every frame through transcoder, and republish each rendition to its layer stream (base.layer(&spec.name)) so the WebRTC egress’s per-viewer layer selection treats the transcoded rungs exactly like simulcast layers.