Skip to main content

Crate av_decoders

Crate av_decoders 

Source
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

  1. Y4M — .y4m/.yuv files (always available, lowest overhead)
  2. FFMS2 — when the ffms2 feature is enabled
  3. FFmpeg — when the ffmpeg feature is enabled
  4. VapourSynth — when the vapoursynth feature 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.
DecoderConfig
A set of possible configuration flags that are generic across all decoders.
VideoDetails
Video metadata and configuration details, populated by every decoder on init.
Y4mDecoder
YUV4MPEG2 decoder.

Enums§

DecoderError
Errors that can occur during video decoding operations.
DecoderImpl
Internal enum representing the active decoder backend.

Type Aliases§

Rational32
Alias for a Ratio of 32-bit-sized integers.