3 unstable releases
Uses new Rust 2024
| 0.4.0 | Feb 26, 2026 |
|---|---|
| 0.3.0 |
|
| 0.2.1 | Feb 22, 2026 |
| 0.2.0 | Feb 19, 2026 |
#4 in #demux
Used in 2 crates
150KB
3K
SLoC
rave-ffmpeg
FFmpeg-based container I/O and probing for RAVE.
rave-ffmpeg provides demux/mux/probe utilities and raw file bitstream
adapters used by CLI and pipeline wiring.
Scope
- Container probing (
probe_container) - Container demux to Annex B packets (
FfmpegDemuxer) - Container mux from encoded packets (
FfmpegMuxer) - Raw file adapters (
FileBitstreamSource,FileBitstreamSink)
Public API Highlights
probe_container(path) -> ContainerMetadataFfmpegDemuxer::new(path, codec)FfmpegMuxer::new(path, width, height, fps_num, fps_den)ContainerMetadatawith codec/dimensions/fps/time-base/duration
Typical Usage
use std::path::Path;
use rave_core::error::Result;
use rave_ffmpeg::probe_container;
fn inspect(path: &Path) -> Result<()> {
let meta = probe_container(path)?;
println!("codec={:?} {}x{} fps={}/{}", meta.codec, meta.width, meta.height, meta.fps_num, meta.fps_den);
Ok(())
}
Runtime Requirements
- FFmpeg shared libraries discoverable by linker/runtime
(
avcodec,avformat,avutil, etc.)
Notes
- Demux path converts H.264/H.265 MP4-style payloads to Annex B when needed.
- Mux path writes HEVC into container formats inferred from output extension.
- Raw file source/sink are useful for simple bitstream workflows and testing.
Recent Hardening
- BSF state machine now preserves packets across
EAGAINand retries safely. - EOF handling now performs explicit BSF flush + drain before terminal
None. - Added deterministic unit tests for
EAGAINretry and flush-drain behavior. - Added a boundary test that guards against raw-frame decode API usage in demux/mux paths.
Dependencies
~18MB
~328K SLoC