oddity-ai/video-rs

Video readers, writers, muxers, encoders and decoders for Rust based on ffmpeg libraries.

What it solves

video-rs simplifies working with video in Rust by offering a stable, idiomatic interface over ffmpeg's libraries. It handles reading, writing, muxing, encoding, and decoding, so you can focus on your application logic instead of low-level video plumbing.

How it works

It wraps the ffmpeg libav-family libraries through the ffmpeg-next crate. You install ffmpeg system libraries, add video-rs as a Cargo dependency, and then use high-level types like Decoder and Encoder. For example, you can decode a video and inspect raw pixel values, or encode frames (such as RGB arrays) into an H.264 video file. An optional ndarray feature lets you work with frames as n-dimensional arrays.

Who it's for

Rust developers who need to process or generate video in their projects and prefer a friendly, high-level API over raw ffmpeg bindings. It suits tasks like frame extraction, format conversion, or generating videos programmatically.

Highlights

  • Provides a stable, Rust-friendly API for common video tasks.
  • Supports reading, writing, muxing, encoding, and decoding.
  • Optional ndarray integration for raw frame manipulation.
  • Includes practical examples for decoding and encoding.
  • Uses tracing for easier debugging of ffmpeg-related issues.

Related

  • Project
  • Project
  • Project
  • Project