3 ms·
Just to compare, here's how you would add the latest version of libav to a Rust project using Cargo: [dependencies] # Safe Rust wrapper ffmpeg-next = "5.
by Cyph0n 4y ago
Just to compare, here's how you would add the latest version of libav to a Rust project using Cargo:
[dependencies]
# Safe Rust wrapper
ffmpeg-next = "5.0.3"
or
[dependencies]
# Direct FFI bindings
ffmpeg-next-sys = "5.0.3"
Note that libav will be built from source, but it will be cached for subsequent builds of your project.
And thanks to the build script maintained by the crate (library) owner, this process should work exactly the same across major OSes and architectures transparently.
Edit: Here is the relevant part of the build script that actually configures and builds libav based on Cargo feature flags and configured rustc OS + arch: https://github.com/zmwangx/rust-ffmpeg-sys/blob/499fca3630fb178baa938bea2ff02ddeb73a8621/build.rs#L192 https://github.com/zmwangx/rust-ffmpeg-sys/blob/499fca3630fb...
- scoutt 4y agoReally? It seems more complicated than that......... https://github.com/zmwangx/rust-ffmpeg/wiki/Notes-on-building https://github.com/zmwangx/rust-ffmpeg/wiki/Notes-on-buildin... And "Install FFmpeg (complete with headers) through any means, e.g. downloading a pre-built "full_build-shared". Come on...
- Cyph0n 4y agoAh, should have been more explicit: you also need a working C compiler (+ make, pkg-config, etc.) and the libav development headers. As for libav itself, if prebuilt libraries are not present, the build script will fetch the source and build it as a static lib.