Expand description
§ffai-media
Media ingest/egress for FFai — the libavformat seat.
Policy: all container/codec work routes through remade_ffmpeg_rs
(rff-* crates) as the default backend — we own it, it is pure Rust, and
it keeps the zero-C/C++ promise. Phase 0 ships native WAV support (the one
format every ASR/TTS engine needs on day one); everything else returns a
clear “pending rff integration” error rather than silently failing.
Modules§
- annexb
- AVCC (length-prefixed) H.264 to Annex-B (start-code prefixed).
Structs§
- Video
Stream - Sample frames from a video at
fpsframes/second (for Argus video understanding). Pending the rff demux/decode integration. A lazily-decoded video, yielding one frame at a time.
Functions§
- load_
audio - Load an audio file into a normalized f32
AudioBuffer. - load_
image - Decode a still image — PNG and JPEG today; WebP/AVIF/GIF follow.
- sample_
frames - Every frame at once. Prefer
stream_frames— this holds the whole video in memory and exists for callers that genuinely want aVec. - save_
gray16_ png - Write a 16-bit grayscale PNG.
- save_
wav - Write an
AudioBufferas 32-bit float WAV. - stream_
frames - Open a video and stream its frames.
fps <= 0keeps every frame.