| Crates.io | rusty_ffmpeg |
| lib.rs | rusty_ffmpeg |
| version | 0.16.7+ffmpeg.8 |
| created_at | 2020-06-11 07:48:07.148808+00 |
| updated_at | 2025-08-23 21:55:23.727312+00 |
| description | A library that provides Rust bindings for FFmpeg |
| homepage | https://github.com/CCExtractor/rusty_ffmpeg/ |
| repository | https://github.com/CCExtractor/rusty_ffmpeg/ |
| max_upload_size | |
| id | 252659 |
| size | 2,025,902 |
Cross platform FFI bindings for FFmpeg internal libraries. This is a crate that:
To use this crate, you need to set several environment variables.
If you have FFmpeg installed with package manager, import rusty_ffmpeg with feature link_system_ffmpeg. Then it should work.
If you built FFmpeg from source, set FFMPEG_PKG_CONFIG_PATH to the path of the generated FFmpeg pkg-config directory. Then it should work.
rusty_ffmpeg can link FFmpeg using vcpkg:
vcpkg, check documentation of the vcpkg crate for the environment variables to set.rusty_ffmpeg with feature link_vcpkg_ffmpeg, Then it should work.You need to set several environment variables for both the linking and binding generating procedures.
Dynamic linking with pre-built dylib: Set FFMPEG_DLL_PATH to the path of dll or so files. (Windows: Put corresponding .lib file next to the .dll file.)
Static linking with pre-built staticlib: Set FFMPEG_LIBS_DIR to the path of FFmpeg pre-built libs directory.
Compile-time binding generation(requires the Clang dylib): Set FFMPEG_INCLUDE_DIR to the path of the header files for binding generation.
Use your prebuilt binding: Set FFMPEG_BINDING_PATH to the pre-built binding file. The pre-built binding is usually copied from the OUT_DIR of the compile-time binding generation, using it will prevent the need to regenerate the same binding file repeatedly.
You can link FFmpeg libraries installed by package manager by enabling feature link_system_ffmpeg (which uses pkg-config underneath).
You can link FFmpeg libraries installed by vcpkg by enabling feature link_vcpkg_ffmpeg on Windows, macOS, and Linux.
4.*ffmpeg5 feature when you are using FFmpeg 5.*ffmpeg6 feature when you are using FFmpeg 6.*ffmpeg7 feature when you are using FFmpeg 7.*FFI is not that easy, especially when you are dealing with a big old C project. Don't get discouraged if you encounter some problems. The CI check already has some typical ffmpeg compilation and use cases for you to check. File an issue if you still have any problems.