Skip to main content

ff_remux/
lib.rs

1//! # ff-remux
2//!
3//! Stream-copy remuxing over `FFmpeg`: trim a clip, and replace / extract / add an
4//! audio stream, all **without re-encoding** (a bitstream copy through
5//! libavformat's demuxer and muxer).
6//!
7//! This is a distinct `FFmpeg` area from encoding (`ff-encode` wraps libavcodec);
8//! `ff-remux` wraps libavformat stream copy. Use it on its own, or combine it with
9//! the other `ff-*` crates. Errors are typed and contextual ([`RemuxError`]).
10//!
11//! Part of the [`avio`](https://github.com/itsakeyfut/avio) crate family; each
12//! crate is versioned independently.
13
14// FFmpeg's C API is called through `unsafe`; the FFI is isolated in the
15// `*_inner` modules, which carry their own scoped clippy allows for the
16// FFmpeg-boundary lints (casts, pointer idioms).
17#![allow(unsafe_code)]
18
19mod error;
20mod media_ops;
21mod trim;
22
23pub use error::RemuxError;
24pub use ff_format::{ErrorSeverity, MediaError};
25pub use media_ops::{AudioAdder, AudioExtractor, AudioReplacement};
26pub use trim::{StreamCopyTrim, StreamCopyTrimmer};