# Install ffmpeg library

**URL:** <https://travis-ci.community/t/install-ffmpeg-library/5962>\
**Category:** Deployment\
**Created:** [November 15, 2019, 12:04pm UTC](https://travis-ci.community/t/install-ffmpeg-library/5962 "2019-11-15T12:04:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndreaCatania](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@AndreaCatania](https://travis-ci.community/u/AndreaCatania)\
**Post date:** [November 15, 2019, 12:04pm UTC](https://travis-ci.community/t/install-ffmpeg-library/5962/1 "2019-11-15T12:04:58Z")

</div>

I’ve added travis config to this repository: [https://github.com/AndreaCatania/video\_ludo](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:

```auto
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` ?

```auto
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="

```

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [November 15, 2019, 5:43pm UTC](https://travis-ci.community/t/install-ffmpeg-library/5962/2 "2019-11-15T17:43:46Z")

</div>

Bottom line: install `multimedia-devel`.

* * *

```auto
$ 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.

```

---

<div class="post-metadata">

**Author:** ![AndreaCatania](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@AndreaCatania](https://travis-ci.community/u/AndreaCatania)\
**Post date:** [November 16, 2019, 12:27pm UTC](https://travis-ci.community/t/install-ffmpeg-library/5962/3 "2019-11-16T12:27:54Z")

</div>

I was able to solve my problem using:

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

```

Thanks!

---

<div class="post-metadata">

**Author:** ![beanbagthomas](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/beanbagthomas/32/8664_2.png) [@beanbagthomas](https://travis-ci.community/u/beanbagthomas)\
**Post date:** [April 1, 2023, 5:45am UTC](https://travis-ci.community/t/install-ffmpeg-library/5962/5 "2023-04-01T05:45:09Z")

</div>

Thank you for posting this. Solved my problem with an error missing all the lib dependecies while trying to run stable-diffusion-videos github repo. Was getting a pkg-config not found error on Ubuntu 22.04  
running:  
`sudo apt install multimedia-devel`  
fixed it.
