Cross platform FFI bindings for FFmpeg inner libraries. This is a crate that: 1. Generates Rust binding for FFmpeg libraries which can be used directly. 2. Emits specific cargo metadata for linking FFmpeg libraries.
Library linking is static by default, setting environment variable FFMPEG_DYNAMIC_LINKING
will make rusty_ffmpeg link dynamic libraries.
FFMPEG_PKG_CONFIG_PATH
to the path which points to *.pc
files in the build result(e.g. FFMPEG_PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" cargo build
) then this crate will use the pre-built FFmpeg libraries. FFMPEG_PKG_CONFIG_PATH
is set, this crate will first check if there are libav*-dev
installed in this system.
*.pc
) files to: So there are three ways for developers to provide FFmpeg libraries for this crate to generate bindings:
FFMPEG_PKG_CONFIG_PATH
VCPKG_ROOT
set to the vcpkg path, and VCPKG_DEFAULT_TRIPLET
set to the triplet you used.You can use cargo test
to test the generated bindings. Want to see it works? There is a small example for you. Run cargo run --example slice
.