HLS — HTTP Live Streaming Output
HLS — HTTP Live Streaming Output
Section titled “HLS — HTTP Live Streaming Output”The engine behind the hls-encoder service: it encodes frames to H.264 and writes a standard HLS playlist plus segments for scalable HTTP delivery, including an adaptive-bitrate ladder.
- Library:
libplugin-hls.so(Rust cratelibplugin_hls.so) · Implementation: Rust onffmpeg-sys-next - Direction: write-only (a sink)
Configuration
Section titled “Configuration”{ "output_dir": "/app/output", "segment_duration": 6, "segment_extension": "m4s", "video_codec": "h264", "preset": "ultrafast", "tune": "zerolatency", "profile": "high", "level": "4.0", "pixel_format": "yuv422p", "gop_size": 25, "keyframe_interval": 1.0, "threads": 1, "x264_params": "nal-hrd=cbr", "hls_list_size": 10, "hls_flags": "delete_segments+independent_segments+program_date_time", "variants": [ { "name": "variant_2.5M", "width": 1920, "height": 1080, "bitrate": 2500000 }, { "name": "variant_5.0M", "width": 1920, "height": 1080, "bitrate": 5000000 }, { "name": "variant_6.5M", "width": 1920, "height": 1080, "bitrate": 6500000 } ]}variants produces an adaptive-bitrate ladder; hls_flags and hls_list_size
control the live playlist window.
Build & notes
Section titled “Build & notes”Built by plugins/phrame-make.sh (cargo build --release); staged as
libplugin-hls.so and copied into the hls-encoder image. Implements the write
side of the ABI (plugin_open, plugin_write, plugin_close,
plugin_query_uuid, plugin_query_config); read functions return an error.
