gifski icon indicating copy to clipboard operation
gifski copied to clipboard

failed to run custom build command for `ffmpeg-sys v4.0.2

Open euppi98 opened this issue 5 years ago • 5 comments

I try to compile the command - "cargo build --release --features=video" and give this error:

failed to run custom build command for `ffmpeg-sys v4.0.2 (https://github.com/meh/rust-ffmpeg-sys#55323cb9)

screen shot 2018-10-17 at 01 26 40

euppi98 avatar Oct 16 '18 22:10 euppi98

gifski doesn't support ffmpeg 4. It requires ffmpeg 3. AFAIK Homebrew doesn't support ffmpeg 3, and therefore gifski doesn't support video on macOS any more.

kornelski avatar Oct 17 '18 19:10 kornelski

I installed ffmpeg 3, the same error!!! screen shot 2018-10-18 at 00 00 37 screen shot 2018-10-18 at 00 11 40

euppi98 avatar Oct 17 '18 20:10 euppi98

As the message says, it can't find libavutil

pkg-config --libs --cflags libavutil

must work, and it must be libavutil that is ffmpeg-3-compatible. Perhaps ffmpeg@3 package has renamed all the libraries, so they're libavutil@3 or such. Alternatively their .pc files are in ffmpeg3 directory, and not in the system-global pkg-config directory, so pkg-config doesn't know about them.

kornelski avatar Oct 18 '18 19:10 kornelski

As the message says, it can't find libavutil

pkg-config --libs --cflags libavutil

must work, and it must be libavutil that is ffmpeg-3-compatible. Perhaps ffmpeg@3 package has renamed all the libraries, so they're libavutil@3 or such. Alternatively their .pc files are in ffmpeg3 directory, and not in the system-global pkg-config directory, so pkg-config doesn't know about them.

how to run with command: pkg-config --libs --cflags libavutil in win10?

I use intelliJ in win10 run with cargo run --release --features=video example/001.webm --output example/output.gif

whole error message

C:\Users\JAY\IdeaProjects\gifski>cargo build --release --features=video
   Compiling ffmpeg-sys v4.2.1 (https://github.com/kornelski/rust-ffmpeg-sys#e8a28ab7)
error: failed to run custom build command for `ffmpeg-sys v4.2.1 (https://github.com/kornelski/rust-ffmpeg-sys#e8a28ab7)`

Caused by:
  process didn't exit successfully: `C:\Users\JAY\IdeaProjects\gifski\target\release\build\ffmpeg-sys-b32073d0a692eb21\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Command { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"libavutil\"", cause: Os { code: 2, kind: NotFound, message: "系統找不到指定的檔案。" } }', C:\Users
\JAY\.cargo\git\checkouts\rust-ffmpeg-sys-cc42c3a8223a62de\e8a28ab\build.rs:533:29
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

jayzhan211 avatar May 17 '20 02:05 jayzhan211

Oh, it's going to be a nightmare to try to get ffmpeg working on Windows. I can't help you with that.

kornelski avatar May 17 '20 11:05 kornelski