Uses new Rust 2021
|0.9.5||Jun 17, 2022|
|0.8.2||Jun 4, 2022|
|0.7.0||May 13, 2021|
|0.5.0||Mar 19, 2021|
|0.2.5||Jul 14, 2020|
#15 in Multimedia
1,694 downloads per month
Used in 2 crates (via rsmpeg)
Cross platform FFI bindings for FFmpeg inner libraries. This is a crate that:
- Linking FFmpeg libraries for you.
- Generates Rust binding for FFmpeg libraries.
To use this crate, you need to set several environment variables.
Build ffmpeg statically and set
FFMPEG_PKG_CONFIG_PATH to the path of the generated FFmpeg
pkg-config files. And you don't need to set other environment variables for static linking.
FFMPEG_PKG_CONFIG_PATH to some placeholder value will let
rusty_ffmpeg probing system library.)
You need to set several environment variables for both linking and binding generating procedure.
Dynamic linking with pre-built dylib: Set
FFMPEG_DLL_PATHto the path of
so. (Windows: Put corresponding
.libfile next to the
Static linking with pre-built staticlib: Set
FFMPEG_LIBS_DIRto the path of the FFmpeg pre-built libs directory.
Compile-time binding generation(requires the
FFMPEG_INCLUDE_DIRto the path to the header files for binding generation.
Use your pre-built binding: Set
FFMPEG_BINDING_PATHto the pre-built binding file. The pre-built binding is usually copied from the
OUT_DIRof the compile-time binding generation, by using it you don't need to regenerate the same binding file again and again.
FFI is not that easy, especially when you are dealing with a big old C project. Don't feel depressed when there are some problems. The CI check already have some typical ffmpeg compilation and use cases for you to check. File an issue if you still have any problem.