| Crates.io | ez-ffmpeg |
| lib.rs | ez-ffmpeg |
| version | 0.5.4 |
| created_at | 2025-03-05 10:25:14.602609+00 |
| updated_at | 2025-09-21 09:50:12.466672+00 |
| description | A safe and ergonomic Rust interface for FFmpeg integration, designed for ease of use. |
| homepage | https://github.com/YeautyYE/ez-ffmpeg |
| repository | https://github.com/YeautyYE/ez-ffmpeg |
| max_upload_size | |
| id | 1578751 |
| size | 1,195,650 |
ez-ffmpeg provides a safe and ergonomic Rust interface for FFmpeg integration, offering a familiar API that closely follows FFmpeg’s original logic and parameter structures.
This library:
unsafe codeBy abstracting the complexity of the raw C API, ez-ffmpeg simplifies configuring media pipelines, performing transcoding and filtering, and inspecting media streams.
More information about this crate can be found in the crate documentation.
brew install ffmpeg
# For dynamic linking
vcpkg install ffmpeg
# For static linking (requires 'static' feature)
vcpkg install ffmpeg:x64-windows-static-md
# Set VCPKG_ROOT environment variable
Add ez-ffmpeg to your project by including it in your Cargo.toml:
[dependencies]
ez-ffmpeg = "*"
Below is a basic example to get you started. Create or update your main.rs with the following code:
use ez_ffmpeg::FfmpegContext;
use ez_ffmpeg::FfmpegScheduler;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// 1. Build the FFmpeg context
let context = FfmpegContext::builder()
.input("input.mp4")
.filter_desc("hue=s=0") // Example filter: desaturate (optional)
.output("output.mov")
.build()?;
// 2. Run it via FfmpegScheduler (synchronous mode)
let result = FfmpegScheduler::new(context)
.start()?
.wait();
result?; // Propagate any errors that occur
Ok(())
}
More examples can be found here.
ez-ffmpeg offers several optional features that can be enabled in your Cargo.toml as needed:
.await operations).ffmpeg-next/static).ez-ffmpeg is licensed under your choice of the MIT, Apache-2.0, or MPL-2.0 licenses. You may select the license that best fits your needs. Important: While ez-ffmpeg is freely usable, FFmpeg has its own licensing terms. Ensure that your use of its components complies with FFmpeg's license.