unbundle
The ergonomic Rust media toolkit — extract frames, audio, and subtitles with clean APIs and real FFmpeg power.
Build media features faster
unbundle gives you a high-level, type-safe interface over FFmpeg so you can ship video/audio workflows without fighting low-level decode details.
What you can build
- Thumbnail services & contact sheets
- Media ingestion & processing pipelines
- Validation & metadata tools
- Analysis tools (keyframes, scene detection, VFR)
- Async batch processors
Why developers choose unbundle
- Ergonomic API —
DynamicImageframes, structured subtitles, zero boilerplate - Production controls — progress, cancellation, stream copy, validation
- Flexible outputs — files, memory, iterators, async streams
- Single toolkit — extraction + probing + remuxing + analysis in one crate
Quick start
Install
Library
[]
= "5" # or { version = "5", features = ["full"] }
CLI
Hello media
use Duration;
use ;
let mut media = open?;
// Frame at 10s
media.video.frame_at?.save?;
// Full audio track
media.audio.save?;
CLI quick reference
# Metadata
# Frames / audio / subtitles
# Utilities
Global flags (work on every command):
|||||||||||
Feature-gated commands (scene-detect, waveform, loudness) appear when built with the matching crate features.
Detailed installation
Library with optional features
[]
= { = "5", = ["async", "rayon", "hardware"] }
System requirements
unbundle requires FFmpeg 4.0+ development libraries.
Linux (Debian/Ubuntu)
macOS
Windows (vcpkg)
git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
C:\vcpkg\bootstrap-vcpkg.bat
vcpkg install ffmpeg:x64-windows
# Add to environment (restart terminal after)
setx VCPKG_ROOT "C:\vcpkg"
setx FFMPEG_DIR "C:\vcpkg\installed\x64-windows"
setx PATH "%PATH%;C:\vcpkg\installed\x64-windows\bin"
The crate’s build.rs will give helpful guidance if anything is missing.
Core capabilities
- Frame extraction (single, ranges, intervals, timestamps, segmented)
- Audio extraction (full track or ranged, to file or memory)
- Subtitle extraction (text + bitmap)
- Lossless stream copy & remuxing
- Rich metadata, chapters, and file validation
- Thumbnail helpers (single, grid, smart variance-based)
- Analysis tools (keyframes/GOP, variable frame rate, packet iteration)
Optional features
| Feature | What it adds |
|---|---|
async |
FrameStream + AudioFuture (Tokio) |
rayon |
Parallel frame decoding |
hardware |
GPU decoding (CUDA, VAAPI, …) |
scene |
Scene change detection |
gif |
Animated GIF export |
waveform |
Waveform visualization data |
loudness |
Peak/RMS loudness (dBFS) |
transcode |
Audio re-encoding |
encode |
Encode image sequences to video |
full |
Everything |
More examples
All runnable with cargo run --example <name>:
Full list in the examples/ directory.
Testing & benchmarks
# Generate test fixtures
Troubleshooting
- Linking errors → Install FFmpeg dev libs and check
pkg-config --libs libavcodec - Unsupported codec → Run
ffmpeg -codecson your system - Hardware decode fails → Use
--hardware autoorHardwareAccelerationMode::Auto - High memory → Use
for_each_frame,frame_iter, orAudioIteratorinstead of collecting everything
Project links
- Docs → https://docs.rs/unbundle
- Repository → https://github.com/skanderjeddi/unbundle
- Changelog → https://github.com/skanderjeddi/unbundle/releases
- Contributing → CONTRIBUTING.md
License
MIT — see LICENSE.
100% vibe-coded with ❤️ using Claude Opus 4.6 by Skander Jeddi ✨