ffmpeg_light/
lib.rs

1#![warn(missing_docs)]
2#![doc = include_str!("../README.md")]
3
4//! ffmpeg-light is a small Rust crate that wraps a few common FFmpeg tasks.
5//!
6//! It focuses on the "80% use cases" like probing media, transcoding, and generating thumbnails,
7//! without exposing the full complexity of FFmpeg.
8//!
9//! ## Quick Start
10//!
11//! Add to your `Cargo.toml`:
12//!
13//! ```toml
14//! [dependencies]
15//! ffmpeg-light = "0.1"
16//! ```
17//!
18//! Note: This crate requires `ffmpeg` and `ffprobe` binaries to be installed and available on PATH.
19//!
20//! ## Example: Probe a video file
21//!
22//! ```rust,no_run
23//! use ffmpeg_light::probe;
24//!
25//! let result = probe("input.mp4")?;
26//! println!("Duration: {:?}", result.duration());
27//! # Ok::<(), ffmpeg_light::Error>(())
28//! ```
29//!
30//! ## Example: Transcode to H.264 MP4
31//!
32//! ```rust,no_run
33//! use ffmpeg_light::transcode::TranscodeBuilder;
34//!
35//! TranscodeBuilder::new()
36//!     .input("input.avi")
37//!     .output("output.mp4")
38//!     .video_codec("libx264")
39//!     .run()?;
40//! # Ok::<(), ffmpeg_light::Error>(())
41//! ```
42
43/// Low-level process helpers for interacting with ffmpeg and ffprobe.
44pub mod command;
45/// Configuration helpers for locating ffmpeg binaries.
46pub mod config;
47/// Shared error type and `Result` alias used by the crate.
48pub mod error;
49/// Small collection of filter helpers used by transcoding.
50pub mod filter;
51/// Media probing API built on top of `ffprobe` JSON output.
52pub mod probe;
53/// Thumbnail generation helpers.
54pub mod thumbnail;
55/// Builder API around common transcoding flows.
56pub mod transcode;
57/// Shared domain types (timecodes, codecs, stream metadata).
58pub mod types;
59
60// Re-export main types for convenience
61pub use error::{Error, Result};
62pub use probe::probe;
63pub use thumbnail::generate as generate_thumbnail;
64pub use transcode::TranscodeBuilder;
65pub use types::*;