1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//! # ff-stream
//!
//! HLS and DASH adaptive streaming output - the Rust way.
//!
//! This crate provides segmented HLS and DASH output along with ABR (Adaptive
//! Bitrate) ladder generation. It exposes a safe, ergonomic Builder API and
//! completely hides `FFmpeg` muxer internals.
//!
//! ## Features
//!
//! - **HLS Output**: Segmented HLS with configurable segment duration and keyframe interval
//! - **DASH Output**: Segmented DASH with configurable segment duration
//! - **ABR Ladder**: Multi-rendition HLS / DASH from a single input in one call
//! - **Builder Pattern**: Consuming builders with validation in `build()`
//!
//! ## Usage
//!
//! ### HLS Output
//!
//! ```ignore
//! use ff_stream::HlsOutput;
//! use std::time::Duration;
//!
//! HlsOutput::new("/var/www/hls")
//! .input("source.mp4")
//! .segment_duration(Duration::from_secs(6))
//! .keyframe_interval(48)
//! .build()?
//! .write()?;
//! ```
//!
//! ### DASH Output
//!
//! ```ignore
//! use ff_stream::DashOutput;
//! use std::time::Duration;
//!
//! DashOutput::new("/var/www/dash")
//! .input("source.mp4")
//! .segment_duration(Duration::from_secs(4))
//! .build()?
//! .write()?;
//! ```
//!
//! ### ABR Ladder
//!
//! ```ignore
//! use ff_stream::{AbrLadder, Rendition};
//!
//! AbrLadder::new("source.mp4")
//! .add_rendition(Rendition { width: 1920, height: 1080, bitrate: 6_000_000 })
//! .add_rendition(Rendition { width: 1280, height: 720, bitrate: 3_000_000 })
//! .add_rendition(Rendition { width: 854, height: 480, bitrate: 1_500_000 })
//! .hls("/var/www/hls")?;
//! ```
//!
//! ## Module Structure
//!
//! - [`hls`] — [`HlsOutput`]: segmented HLS output builder
//! - [`dash`] — [`DashOutput`]: segmented DASH output builder
//! - [`abr`] — [`AbrLadder`] + [`Rendition`]: multi-rendition ABR ladder
//! - [`error`] — [`StreamError`]: unified error type for this crate
//!
//! ## Status
//!
//! The public API is stable. HLS and DASH muxing are fully implemented via the
//! `FFmpeg` HLS/DASH muxers. `write()` / `hls()` / `dash()` perform real
//! encode-and-mux operations against the filesystem.
pub
pub
/// Unified error type for the `ff-stream` crate.
pub
pub
pub
pub
pub
pub
pub use ;
pub use DashOutput;
pub use StreamError;
pub use FanoutOutput;
pub use ;
pub use ;
pub use LiveDashOutput;
pub use LiveHlsOutput;
pub use StreamOutput;
pub use RtmpOutput;
pub use SrtOutput;