meh/rust-ffmpeg

build failed

jinleileiking opened this issue · 5 comments

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"libavutil\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package libavutil was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libavutil.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'libavutil\' found\n" } }', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

stainless-ffmpeg is runnable.

Nailed it! Had to just install these dependencies to make build work:

sudo apt-get install libavutil-dev
sudo apt-get install libavformat-dev
sudo apt-get install libavfilter-dev
sudo apt-get install libavdevice-dev
sudo apt-get install libclang-dev

Note, ffmpeg-next seems to be more popular and better documented than stainless-ffmpeg

This guideline is also useful. After doing steps on FFmpeg guideline, run PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig cargo build, panic disappears.