Skip to main content

Module live_hls

Module live_hls 

Source
Expand description

Frame-push live HLS output.

LiveHlsOutput receives pre-decoded ff_format::VideoFrame / ff_format::AudioFrame values from the caller, encodes them with H.264/AAC, and muxes them into a sliding- window HLS playlist (index.m3u8) backed by .ts segment files.

§Example

use ff_stream::{LiveHlsOutput, StreamOutput};
use std::time::Duration;

let mut out = LiveHlsOutput::new("/var/www/live")
    .video(1280, 720, 30.0)
    .audio(48000, 2)
    .segment_duration(Duration::from_secs(4))
    .playlist_size(5)
    .build()?;

// for each decoded frame:
out.push_video(&video_frame)?;
out.push_audio(&audio_frame)?;

// when done:
Box::new(out).finish()?;

Structs§

LiveHlsOutput
Live HLS output: receives frames and writes a sliding-window .m3u8 playlist.