Expand description
Ready-made decoders for the rust-av ecosystem.
Each decoder outputs v_frame structs. Only the y4m decoder is enabled by default;
others require Cargo features for their external dependencies.
§Backend priority
- Y4M —
.y4m/.yuvfiles (always available, lowest overhead) - FFMS2 — when the
ffms2feature is enabled - FFmpeg — when the
ffmpegfeature is enabled - VapourSynth — when the
vapoursynthfeature is enabled
§Example
use av_decoders::Decoder;
let mut decoder = Decoder::from_file("video.y4m")?;
let details = decoder.get_video_details();
println!("{}x{} @ {} fps", details.width, details.height, details.frame_rate);
while let Ok(frame) = decoder.read_video_frame::<u8>() {
// process frame
}Re-exports§
pub use v_frame;
Structs§
- Decoder
- Unified video decoder that auto-selects the best available backend.
- Decoder
Config - A set of possible configuration flags that are generic across all decoders.
- Video
Details - Video metadata and configuration details, populated by every decoder on init.
- Y4mDecoder
- YUV4MPEG2 decoder.
Enums§
- Decoder
Error - Errors that can occur during video decoding operations.
- Decoder
Impl - Internal enum representing the active decoder backend.
Type Aliases§
- Rational32
- Alias for a
Ratioof 32-bit-sized integers.