# ff-sys
Low-level FFmpeg FFI bindings generated by bindgen. Not intended for direct use; use the higher-level `ff-*` crates instead.
## Installation Prerequisites
Before building any crate in this workspace, FFmpeg development libraries must be available on your system.
### Windows
Install FFmpeg via [vcpkg](https://github.com/microsoft/vcpkg):
```sh
vcpkg install ffmpeg:x64-windows
```
Set the `VCPKG_ROOT` environment variable to your vcpkg installation directory, then pass the toolchain file to Cargo via `RUSTFLAGS` or `.cargo/config.toml`.
### Linux
```sh
sudo apt install libavcodec-dev libavformat-dev libavfilter-dev \
libavdevice-dev libswscale-dev libswresample-dev
```
### macOS
```sh
brew install ffmpeg
```
## Platform Support
| Windows | vcpkg | `ffmpeg:x64-windows` triplet required |
| Linux | apt / system libs | Dev packages (`-dev`) must be installed |
| macOS | Homebrew | `brew install ffmpeg` |
## Wrapper Modules
In addition to the raw bindgen output, `ff-sys` ships thin safe-wrapper modules that isolate the most error-prone FFmpeg call sequences:
| `avcodec` | `AVCodecContext`, codec open/close |
| `avformat` | `AVFormatContext`, demux/mux lifecycle |
| `swscale` | `SwsContext`, pixel format conversion |
| `swresample` | `SwrContext`, sample format / channel layout conversion |
These modules are `pub(crate)` to the workspace and are not part of the public API surface.
## MSRV
Rust 1.93.0 (edition 2024).
## License
MIT OR Apache-2.0