Install ffmpeg library

I’ve added travis config to this repository: https://github.com/AndreaCatania/video_ludo which uses FFmpeg.

I would need to install ffmpeg in order to compile it and so check it. The problem is that I keep getting this error:

Caused by:

  process didn't exit successfully: `/home/travis/build/AndreaCatania/video_ludo/target/debug/build/ffmpeg-sys-9f435d1442fb53e3/build-script-build` (exit code: 101)

--- stderr

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

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

The ffmpeg installation seems to go fine, but the compiler complain about PKG_CONFIG_PATH beeing not set.

If it’s possible to install ffmpeg, how am I supposed to do? or how can I correctly set PKG_CONFIG_PATH ?

sudo: false
language: rust
rust:
- stable
before_script:
- sudo apt-get update
- sudo apt-get install ffmpeg
- rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu
- rustup component add clippy
script:
- cargo fmt -- --check
- cargo build
- cargo test --all
- cargo clippy --all
cache: cargo
env:
  global:
  - TRAVIS_CARGO_NIGHTLY_FEATURE="

Bottom line: install multimedia-devel.


$ apt-file search libavformat.pc
libavformat-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/libavformat.pc
$ apt-cache rdepends libavformat-dev
libavformat-dev
Reverse Depends:
  libavdevice-dev
  libopencv-highgui-dev
  libavfilter-dev
  libavdevice-dev
  multimedia-devel
  libvtk7-dev
  libvtk6-dev
  libpjproject-dev
  libopencv-highgui-dev
  libignition-common-dev
  libgazebo9-dev
  libffms2-dev
  libdlna-dev
  libavfilter-dev
$ apt-cache rdepends libavfilter-dev
libavfilter-dev
Reverse Depends:
  libavdevice-dev
  libavdevice-dev
  multimedia-devel
$ apt show multimedia-devel
<...>
Description: Extra packages for developers and package compiling
 This metapackage will install additional software to compile audio
 software.

I was able to solve my problem using:

sudo apt-get install libavformat-dev libavfilter-dev libavdevice-dev ffmpeg

Thanks!

Imprint