Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to know how to install FFmpeg on Debian.

share|improve this question

migrated from serverfault.com May 21 '11 at 14:08

This question came from our site for system and network administrators.

1  
Similar guide for Ubuntu: ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide – slhck Jul 17 '12 at 12:19

Debian Jessie and later no longer include the ffmpeg, however you have 3 options for installing ffmpeg. I'd suggest trying options 1 or 2 before installing from source.

Option 1: Use avconv instead

You may install "avconv" which has almost the same usage as "ffmpeg". The two commands often use the same syntax, but features such as srt subtitles may only work with ffmpeg.

sudo apt-get install libav-tools

Option 2: Install ffmpeg from deb-multimedia.org

To install ffmpeg, edit /etc/apt/sources.list and add the appropriate line for your distribution as listed here: http://www.deb-multimedia.org/

To add debian testing, either manually edit the file or run..

Example for debian testing only:

sudo echo deb http://www.deb-multimedia.org testing main non-free \
                  >>/etc/apt/sources.list

After adding the line for deb-multimedia, update the package, add the keyring, and install ffmpeg.

sudo apt-get update
sudo apt-get install deb-multimedia-keyring
sudo apt-get update
sudo apt-get install ffmpeg

You will have to install the keyring as an unauthenticated package using this method.

Option 3: Install ffmpeg from source

Alternatively, you can install from source. This is how to create a .deb file using checkinstall which can then be uninstalled again. Install these packages, yasm or nasm is needed for ffmpeg specifically, the others are generally useful for building packages:

sudo apt-get install yasm nasm \
                build-essential automake autoconf \
                libtool pkg-config libcurl4-openssl-dev \
                intltool libxml2-dev libgtk2.0-dev \
                libnotify-dev libglib2.0-dev libevent-dev \
                checkinstall

Next, clone the ffmpeg package or download the latest snapshot:

git clone git://git.videolan.org/ffmpeg.git

or

wget https://www.ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar jxvf ffmpeg-snapshot.tar.bz2

Compile ffmpeg:

cd ffmpeg
./configure --prefix=/usr
time make -j 8
cat RELEASE
sudo checkinstall

Most of the checkinstall defaults are fine, but a version number is required. The current version is displayed by "cat RELEASE". This should create a deb file in the current directory.

Finally, install the deb file you made using dpkg:

sudo dpkg --install ffmpeg_*.deb
share|improve this answer
1  
+10 points. This answer should be up the top, as it's the most current. – Mint May 10 '15 at 23:58
2  
Sadly, avconv which comes with Jessie often cannot replace ffmpeg as it lacks many important features of ffmpeg. So if you want to avoid installing from source the only valid option is to get it from deb-multimedia, which is a bit sad as the deb-multimedia-keyring is not distributed by Debain, so the trust chain is broken. – Tino Oct 3 '15 at 19:43
2  
they have switched back to ffmpeg in sid now: lwn.net/Articles/650495 – Sam Watkins Oct 29 '15 at 16:25
1  
Your from-source instructions work on Debian Jessie (from master 4c2244127631da592cb4d6bbdab1d6b050ff98cb). However, the checkinstall procedure seems to have changed. I had to run sudo mkdir /usr/share/ffmpeg first to avoid it aborting. Then after successful run, it automatically installed the packages itself, so there is no need to run sudo dpkg -i. Otherwise fine. – 0__ Apr 11 at 18:35

You can install it via apt-get. If the package is simply called "ffmpeg".

sudo apt-get update
sudo apt-get install ffmpeg

If that doesn't work, you can try searching for it:

sudo apt-cache search ffmpeg

Note that this will install the packaged version of FFmpeg, therefore it will always be a little outdated. In case you experience bugs, please compile FFmpeg from source.

share|improve this answer

FFMPEG uses git so you will need to use the terminal. See here for the current location

There's a pretty comprehensive walkthrough on doing it here. Have extracted pertinent code for the lazy (myself included).

One thing to note, you may get some errors when configuring that you are missing packages. I needed to use RPM to get a couple of them when running Fedora 14 but your mileage may vary on Debian.

Checkout FFmpeg:

git clone git://git.videolan.org/ffmpeg.git
cd ffmpeg

Configure [add your own preferences if you want]

./configure

Build and install

make
sudo make install
share|improve this answer

I downloaded the latest snapshot of ffmpeg from here http://ffmpeg.org/download.html. Then I followed Kdenlive's ffmpeg build instructions http://www.kdenlive.org – but run

sudo apt-get update

before installing dependencies. They are:

sudo apt-get install subversion git cmake build-essential yasm libqt4-dev kdelibs5-dev libsdl1.2-dev libsdl-image1.2-dev libxml2-dev libx264-dev libtheora-dev libxvidcore-dev libogg-dev libvorbis-dev libschroedinger-dev libmp3lame-dev libfaac-dev libfaad-dev libgsm1-dev libopencore-amrnb-dev libopencore-amrwb-dev libsamplerate0-dev libjack-dev libsox-dev ladspa-sdk swh-plugins libmad0-dev libpango1.0-dev
share|improve this answer

static builds (works)

Go to this page and pick the build for your architecture:

http://johnvansickle.com/ffmpeg/

Grab the url to the build file

# download it
wget <url>
# unpack it
tar xf <file>

# add path to $PATH
vi ~/.bashrc

# add the path to your unpacked build
export PATH="~/src/ffmpeg-2.8.3-src:$PATH"

# source your bashrc to update your path
. ~/.bashrc
share|improve this answer
    
pretty common knowledge bash here. but i added some comments – chovy Dec 2 '15 at 2:22

It is now available for Jessy as a backport: https://packages.debian.org/jessie-backports/ffmpeg

Add something like this to /etc/apt/sources.list (with your preferred mirror):

deb http://ftp.uk.debian.org/debian jessie-backports main

Then

apt-get update
apt-get install ffmpeg
share|improve this answer

This repository gives you the package:

sudo add-apt-repository ppa:mc3man/trusty-media

Then

sudo apt-get update
sudo apt-get install ffmpeg
share|improve this answer
    
That's specifically for Ubuntu 14.04. – LordNeckbeard Jun 24 at 17:45

You must log in to answer this question.