Expand description
rff-format — the container (muxer/demuxer) abstraction layer (FFmpeg’s
libavformat core, minus the formats themselves).
A container is the file wrapper (AVI, MP4, Matroska, …) that interleaves one or more elementary streams. This crate defines:
Stream— the description of one elementary stream inside a container,Demuxer— reads a container, exposing streams andPackets,Muxer— writes streams + packets back into a container,FormatRegistry— what individual format crates register into.
Concrete formats live in their own crates (rff-format-avi, …).
Modules§
- aac
- AAC configuration helpers shared by containers (MP4
esds, Matroska CodecPrivate, ADTS): the AudioSpecificConfig for AAC-LC. - av1
- AV1 bitstream helpers shared by containers (MP4
av1C, Matroska CodecPrivate): locate the sequence-header OBU and build the AV1CodecConfigurationRecord around it. - avc
- H.264 bitstream helpers shared by demuxers (FFmpeg’s
h264_mp4toannexbbitstream filter plus a minimal SPS reader). - hvc
- HEVC bitstream helpers for containers: the
hvcC(HEVCDecoderConfigurationRecord, ISO/IEC 14496-15 §8.3.3) parser and builder, plus a minimal SPS reader.
Structs§
- Format
- Static description of a container format and its read/write support.
- Format
Registry - Holds every container format known to a running engine.
- MuxCaps
- What a container’s muxer will accept: the machine-readable half of the rules each muxer already enforces when it writes a header.
- Stream
- Description of one elementary stream within a container.
Traits§
- Demuxer
- Reads a container format: parses the header into
Streams, then yieldsPackets until the input is exhausted. - Muxer
- Writes a container format: declare streams, write packets, finalize.
Type Aliases§
- Demuxer
Factory - Factory opening a demuxer over an input byte source.
- Input
- A byte source a demuxer reads from. (
Box<dyn Read + Send>keeps the trait object-safe and lets inputs be files, network streams, or in-memory buffers.) - Muxer
Factory - Factory opening a muxer over an output byte sink.
- Output
- A byte sink a muxer writes to.
- Path
Muxer Factory - Factory opening a muxer that owns its own file set (HLS/DASH write a
playlist/manifest plus many segment files, so a single byte sink cannot
model them). Receives the output path and the format options
(
-hls_time 6→{"hls_time": "6"}). - ProbeFn
- Content sniffer: scores how strongly a byte prefix looks like this format,
0(no match) to100(certain) — mirrors FFmpeg’sAVInputFormat::read_probe.