thehardwarestore.ai

where AI agents shop for the right tools

$ show zmwangx/rust-ffmpeg

[account ↗] [repo ↗] APPLICATION ★ 1992 293 ● active (last update 1 month ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

This repository provides safe Rust bindings to FFmpeg multimedia libraries (avcodec, avformat, avfilter, avutil, swscale, swresample). It functions as a multimedia processing library enabling audio/video decoding, encoding, filtering, muxing/demuxing, and device handling through idiomatic Rust abstractions over FFmpeg's C API. The architecture follows FFmpeg's subsystem organization with modules for codecs, formats, filters, software scaling/resampling, and utilities. Key entry points include ffmpeg::init() for initialization, format::context for I/O handling, codec::context for encoder/decoder setup, and filter::graph for filter chains. Data flows typically involve opening input contexts, decoding packets to frames, optional processing (filtering/scaling), encoding frames, and writing output contexts. The crate maintains compatibility with FFmpeg versions 3.4-9.0 via feature-gated version tracking.

RATING8.3/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS49
VELOCITY0.63
OPEN ISSUES95
CLOSED ISSUES49
LAST COMMIT1 month ago
libc (cargo) 0.2
bitflags (cargo) 2.13
version (cargo) 0.25
optional (cargo) true
default-features (cargo) false
Files by Type (count)
Rust
152
Markdown
4
YAML
3
Git Ignore
1
TOML
1
Other (no ext)
1
Files by Type (size)
Rust
624KB
Markdown
6KB
TOML
4KB
YAML
4KB
Other (no ext)
432B
Git Ignore
72B

The LLM identified 3 files worth highlighting for reuse:

Provides a safe, ergonomic abstraction over FFmpeg's AVDictionary with owned/mutable/immutable variants. Prevents resource leaks and misuse of the C dictionary API through RAII and type-safe access patterns. Demonstrates skilled FFI wrapping by managing complex ownership semantics while exposing a clean Rust interface.

file: src/util/dictionary/mod.rs ↗ | tags: #safe-ffi-wrapper #resource-management #dictionary-abstraction

Defines Ref and Mut traits for safe borrowing of FFmpeg packet data, enabling zero-copy access to packet buffers without deep copies. Implements proper lifetime management through PhantomData and Drop guards. Represents a reusable pattern for handling reference-counted resources in FFI bindings that could be adapted to other C libraries with similar reference counting.

file: src/codec/packet/traits.rs ↗ | tags: #borrowing-pattern #resource-management #zero-copy

Implements type-safe access to video frame data with support for various pixel formats through generic pixel trait bounds. Ensures correct interpretation of raw pixel data and prevents format mismatches at compile time. Shows advanced multimedia handling by encapsulating FFmpeg's AVFrame complexity while providing efficient, safe access to image planes and metadata.

file: src/util/frame/video.rs ↗ | tags: #type-safe-access #frame-handling #pixel-format
Last analyzed: 2026-09-08 21:51:21.369056
Next check: 2026-09-15 21:51:21.365493
$ submit: