Cross platform FFI bindings for FFmpeg inner libraries. This is a crate that:
To use this crate, you need to set several environment variables.
Build ffmpeg staticly and set FFMPEG_PKG_CONFIG_PATH
to the path of the generated FFmpeg package-config files. And you don't need to set other environment variables for static linking.
You need to set environment variable for both linking and generating bindings.
Dynamic linking with prebuilt dylib: Set FFMPEG_DLL_PATH
to the path of dll
or so
. (Windows: Put corresponding .lib
file next to the .dll
file.)
Static linking with prebuilt staticlib: or set FFMPEG_LIB_DIR
to the path of the FFmpeg prebuilt libs directory.
Compile-time binding generation(requires clang dylib): Set FFMPEG_INCLUDE_DIR
to the path to the header files for binding generation.
Use pre-built binding: Set FFMPEG_BINDING_PATH
to the prebuilt binding file.
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 use cases, you can check it. File an issue if you still have some problem.