ffmpeg provides Rust FFI bindings to FFmpeg C libraries.
FFmpeg v3.3.9:
- libavutil55
- libavcodec57
- libavformat57
- libswscale4
- libswresample4
The dynamic libraries are stored in lib64 directory.
Add this to your Cargo.toml:
[dependencies]
ffmpeg = "0.1.0"Copy lib64 directory to your repository.
Run:
LIBRARY_PATH=./lib64 LD_LIBRARY_PATH=./lib64 cargo runTest:
LIBRARY_PATH=./lib64 LD_LIBRARY_PATH=./lib64 cargo testClone this repository:
git clone https://github.com/VictorCPH/ffmpeg.git
Run integration tests:
LIBRARY_PATH=./lib64 LD_LIBRARY_PATH=./lib64 cargo test -- --nocaptureOutput:
running 7 tests
test test_video_not_existed ... ok
test test_video_broken ... ok
test test_meta ... ok
test test_seek ... ok
test test_decode_audio ... ok
test test_video_from_blob ... ok
test test_video_from_file ... ok
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered outThe repo is available as open source under the terms of the MIT License.