How to Install FFmpeg on Debian 13, 12 and 11

Install FFmpeg on Debian 13, 12, or 11 using APT or source compilation. Includes usage examples and removal.

Last updatedAuthorJoshua JamesRead time11 minGuide typeDebianDiscussion1 comment

FFmpeg is one of those tools you reach for when a video needs converting, an audio track needs pulling, or a file refuses to cooperate with the format you have. On most systems, you can install FFmpeg on Debian straight from the default repositories and get to work without dragging in extra multimedia repos. When Debian’s packaged branch is too old for the job, a source build gives you a cleaner way to move forward.

The default Debian package is the starting point for most systems, because it is the easiest option to maintain and includes the main ffmpeg command plus ffprobe and ffplay. When that package branch falls behind what you need, the source-build path adds a newer upstream release with signature verification, practical first-use examples, update handling, troubleshooting, and clean removal.

Install FFmpeg on Debian

The default Debian package is the cleanest install for most systems because it keeps FFmpeg aligned with Debian’s own multimedia libraries and security updates.

MethodSource or channelUpdate behaviorBest forTrade-offs
Debian repository packageDefault Debian repositoriesAPT-managed updates with the rest of the systemMost users who want a stable install that follows Debian security updates.The branch follows your Debian release, so it can lag behind current upstream FFmpeg.
Source build from upstreamSigned source tarball from FFmpeg.orgManual rebuild through update-ffmpegReaders who need newer upstream features, codecs, or behavior than their Debian branch provides.More build dependencies, longer install time, and manual lifecycle ownership.

These instructions apply to Debian 13 (Trixie), Debian 12 (Bookworm), and Debian 11 (Bullseye) while Bullseye remains under LTS. The repository install works the same way across all three releases, but the packaged FFmpeg branch changes with each one.

Update Debian Package Metadata Before Installing FFmpeg

Refresh APT first so Debian resolves the current package set for your release.

sudo apt update

These commands use sudo for tasks that need administrator privileges. If your account is not in the sudoers file yet, add it first with how to add a user to sudoers on Debian.

Install FFmpeg from Debian Repositories

Install FFmpeg with the standard Debian package. Debian packages ffmpeg, ffprobe, and ffplay together, so you do not need separate package names for the probe or playback commands.

sudo apt install ffmpeg

A Debian 13 install finishes with output similar to this:

Summary:
  Upgrading: 0, Installing: 2, Removing: 0, Not Upgrading: 2

Selecting previously unselected package ffmpeg.
Unpacking ffmpeg (7:7.1.4-0+deb13u1) ...
Setting up ffmpeg (7:7.1.4-0+deb13u1) ...

The package count and dependency list vary by release and by what is already installed. The important part is that APT completes cleanly and ends with Setting up ffmpeg.

Verify FFmpeg, FFprobe, and FFplay on Debian

Check the version first:

ffmpeg -version | head -n 3
ffmpeg version 7.1.4-0+deb13u1 Copyright (c) 2000-2026 the FFmpeg developers
built with gcc 14 (Debian 14.2.0-19)
configuration: --prefix=/usr ... --enable-libaom ... --enable-libx264 --enable-libx265 ...

The branch changes with your Debian release. Debian 13 reports 7.1.x, Debian 12 reports 5.1.x, and Debian 11 reports 4.3.x.

Debian also installs the companion tools for probing and preview playback from the same package set. ffprobe reads media metadata without converting the file, while ffplay is useful for a quick playback check on systems with a graphical session.

command -v ffmpeg ffprobe ffplay
/usr/bin/ffmpeg
/usr/bin/ffprobe
/usr/bin/ffplay

To check the exact candidate available on your release before installing or upgrading, query APT directly:

apt-cache policy ffmpeg

A Debian 13 system with current security updates reports this candidate:

ffmpeg:
  Installed: (none)
  Candidate: 7:7.1.4-0+deb13u1
  Version table:
     7:7.1.4-0+deb13u1 500
        500 http://security.debian.org/debian-security trixie-security/main amd64 Packages

The candidate line is the package Debian would install from your enabled sources. Exact revision numbers can change after security updates, but the branch still follows your Debian release.

If you want to confirm common encoders are present in Debian’s packaged build, check them directly. The example output here is from Debian 13; Debian 12 and Debian 11 expose the same encoder names, although some flag columns differ by branch.

ffmpeg -hide_banner -encoders | grep -E 'libx264|libx265|libaom-av1|aac|libmp3lame'
 V....D libaom-av1           libaom AV1 (codec av1)
 V....D libx264              libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
 V....D libx264rgb           libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
 V....D libx265              libx265 H.265 / HEVC (codec hevc)
 A....D aac                  AAC (Advanced Audio Coding)
 A....D libmp3lame           libmp3lame MP3 (MPEG audio layer 3) (codec mp3)

Compare Packaged FFmpeg Versions in Debian 13, 12, and 11

The install command stays the same across supported Debian releases, but the packaged FFmpeg branch changes with the distribution.

Debian releasePackaged branchInstall commandWhat this means
Debian 13 (Trixie)7.1.xsudo apt install ffmpegNewest default Debian branch among Debian 13, 12, and 11, and the best packaged option if you want to stay entirely within Debian repositories.
Debian 12 (Bookworm)5.1.xsudo apt install ffmpegStill stable, but noticeably older than current upstream FFmpeg releases.
Debian 11 (Bullseye)4.3.xsudo apt install ffmpegThe oldest branch among Debian 13, 12, and 11, and the most likely reason to prefer a source build.

If Debian 12 or Debian 11 is too old for a specific workflow, compile FFmpeg from source instead of forcing a third-party multimedia repository onto the whole system. If you still need that route for other reasons, LinuxCapable has a separate guide for Deb-Multimedia on Debian.

Compile FFmpeg from Source on Debian

Sometimes Debian’s packaged branch is exactly what you want. Sometimes it is too old for the codec, filter, or behavior you actually need. That is when a source build makes sense, especially since Debian’s package can still stay in place as the fallback copy under /usr/bin.

The source workflow detects the current stable tarball from FFmpeg’s official download page automatically, so you do not need to hardcode version numbers by hand. Debian 12 and Debian 13 can enable libaom for AV1 with their packaged development libraries, but Debian 11 cannot because Bullseye ships libaom 1.0.0 and current FFmpeg 8.x expects something newer.

Install FFmpeg Source Build Dependencies on Debian

Install the shared build dependencies first:

sudo apt install build-essential pkg-config yasm nasm curl tar xz-utils gpg \
ca-certificates libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev \
libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev \
libxcb-shm0-dev libxcb-xfixes0-dev zlib1g-dev libx264-dev libx265-dev \
libnuma-dev libvpx-dev libopus-dev

If you also want libaom AV1 support on Debian 12 or Debian 13, install that development package before configuring FFmpeg:

sudo apt install libaom-dev

Debian 11 can install libaom-dev, but Bullseye only provides 1.0.0, which is too old for current FFmpeg 8.x. The configure logic checks the installed version and skips --enable-libaom automatically on Bullseye instead of failing.

Download the Latest Stable FFmpeg Source on Debian

Create build directories, detect the latest stable tarball from the official FFmpeg site, and download both the source archive and its detached signature.

mkdir -p ~/ffmpeg-source ~/ffmpeg-build
cd ~/ffmpeg-source
DOWNLOAD_HTML=$(curl -fsSL https://ffmpeg.org/download.html)
FFMPEG_TARBALL=$(printf '%s\n' "$DOWNLOAD_HTML" | grep -oE 'ffmpeg-[0-9]+(\.[0-9]+)*\.tar\.xz' | sort -V | tail -n 1 || true)

if [ -z "$FFMPEG_TARBALL" ]; then
  printf '%s\n' "Could not detect the latest FFmpeg tarball. Recheck https://ffmpeg.org/download.html before continuing."
else
  printf 'Latest stable tarball: %s\n' "$FFMPEG_TARBALL"
  curl -fsSLO "https://ffmpeg.org/releases/$FFMPEG_TARBALL"
  curl -fsSLO "https://ffmpeg.org/releases/$FFMPEG_TARBALL.asc"
fi
Latest stable tarball: ffmpeg-8.1.1.tar.xz

The Linux curl guide explains the download flags in this command. Continue only after the tarball name prints and both downloads complete.

Run the download, verification, and extraction blocks in the same terminal session so $FFMPEG_TARBALL still points to the archive you downloaded.

Verify the downloaded tarball with FFmpeg’s release signing key before extracting it. The temporary GNUPGHOME keeps the release key out of your normal user keyring.

GNUPGHOME=$(mktemp -d)
export GNUPGHOME
curl -fsSL https://ffmpeg.org/ffmpeg-devel.asc | gpg --import
gpg --verify "$FFMPEG_TARBALL.asc" "$FFMPEG_TARBALL"
rm -rf "$GNUPGHOME"
unset GNUPGHOME
gpg: Good signature from "FFmpeg release signing key <ffmpeg-devel@ffmpeg.org>" [unknown]

GPG may still warn that the imported key is not certified by your personal web of trust. For this workflow, the useful checks are that the signature verifies against FFmpeg’s published key and the fingerprint shown by GPG matches FCF9 86EA 15E6 E293 A564 4F10 B432 2F04 D676 58D8.

Extract the verified archive and point ffmpeg-current at that release directory:

tar -xf "$FFMPEG_TARBALL"
ln -sfn "${FFMPEG_TARBALL%.tar.xz}" ffmpeg-current
readlink -f ffmpeg-current
/home/joshua/ffmpeg-source/ffmpeg-8.1.1

The ffmpeg-current symlink keeps the configure and update commands stable even after a future source update downloads a newer release.

Configure and Compile FFmpeg from Source on Debian

The configure block keeps the shared codec set consistent across Debian 13, Debian 12, and Debian 11. It only adds optional AV1 flags when the local development libraries are new enough, so Bullseye does not fail at the first dependency check. The build installs into ~/ffmpeg-build first, then exposes the three commands through guarded symlinks in /usr/local/bin.

cd ~/ffmpeg-source/ffmpeg-current

EXTRA_FLAGS=()

# Enable optional AV1 support only when the local development packages are new enough.
if pkg-config --exists aom && pkg-config --atleast-version=2.0.0 aom; then
  EXTRA_FLAGS+=(--enable-libaom)
fi

if pkg-config --exists SvtAv1Enc; then
  EXTRA_FLAGS+=(--enable-libsvtav1)
fi

./configure \
  --prefix="$HOME/ffmpeg-build" \
  --enable-gpl \
  --enable-gnutls \
  --enable-libass \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-libx265 \
  "${EXTRA_FLAGS[@]}"

make -j"$(nproc)"
make install

install_ffmpeg_link() {
  tool=$1
  target="$HOME/ffmpeg-build/bin/$tool"
  link="/usr/local/bin/$tool"

  if [ ! -x "$target" ]; then
    printf 'Expected binary is missing: %s\n' "$target"
    return 1
  fi

  if [ -e "$link" ] && [ ! -L "$link" ]; then
    printf '%s exists and is not a symlink. Move it before linking this source build.\n' "$link"
    return 1
  fi

  if [ -L "$link" ]; then
    current_target=$(readlink -f "$link" || true)
    case "$current_target" in
    "$HOME/ffmpeg-build/bin/$tool" | "") ;;
    *)
      printf '%s points to %s, not this FFmpeg build. Move it before continuing.\n' "$link" "$current_target"
      return 1
      ;;
    esac
  fi

  sudo ln -sfn "$target" "$link"
  printf 'Linked %s -> %s\n' "$link" "$target"
}

for tool in ffmpeg ffprobe ffplay; do
  install_ffmpeg_link "$tool"
done

The make -j"$(nproc)" line uses your available CPU threads to speed up the build. Keeping the compiled files under ~/ffmpeg-build makes the source install easier to remove later, while the symlinks let normal commands still resolve before Debian’s packaged copy in /usr/bin.

After the install helper creates the command symlinks, output ends with lines like these:

Linked /usr/local/bin/ffmpeg -> /home/joshua/ffmpeg-build/bin/ffmpeg
Linked /usr/local/bin/ffprobe -> /home/joshua/ffmpeg-build/bin/ffprobe
Linked /usr/local/bin/ffplay -> /home/joshua/ffmpeg-build/bin/ffplay

Verify the Source-Compiled FFmpeg Build on Debian

Confirm that the upstream build is now the active binary in your path:

ffmpeg -version | head -n 1
type -a ffmpeg
ffmpeg version 8.1.1 Copyright (c) 2000-2026 the FFmpeg developers
ffmpeg is /usr/local/bin/ffmpeg
ffmpeg is /usr/bin/ffmpeg

Your upstream version number will change over time. The important checks are that the first type -a ffmpeg result points to /usr/local/bin/ffmpeg and that the version line now reflects the newer upstream build instead of Debian’s packaged branch.

Create an FFmpeg Source Update Script on Debian

Source installs do not update through APT, so keep an update script alongside the source tree. This version checks for the tools it needs, verifies the release signature, targets the source-installed symlinks under /usr/local/bin, stops cleanly when you are already current, and rebuilds only when a newer stable release exists.

cat <<'EOF' > ~/ffmpeg-source/update-ffmpeg.sh
#!/usr/bin/env bash
set -euo pipefail

SRC_DIR="$HOME/ffmpeg-source"
BUILD_DIR="$HOME/ffmpeg-build"
INSTALL_BINDIR="/usr/local/bin"
TARGET_BIN="$INSTALL_BINDIR/ffmpeg"
DOWNLOAD_PAGE="https://ffmpeg.org/download.html"
RELEASE_BASE="https://ffmpeg.org/releases"
SIGNING_KEY_URL="https://ffmpeg.org/ffmpeg-devel.asc"

if [ "$(id -u)" -eq 0 ]; then
  echo "Run this script as a regular user. Use sudo only when the install step asks for it."
  exit 1
fi

for cmd in awk curl gpg grep head ln make mktemp nproc pkg-config readlink sort sudo tar; do
  if ! command -v "$cmd" >/dev/null 2>&1; then
    echo "Error: $cmd is required but not installed."
    exit 1
  fi
done

echo "Checking the latest stable FFmpeg release..."
download_html=$(curl -fsSL "$DOWNLOAD_PAGE")
TARBALL=$(printf '%s\n' "$download_html" | grep -oE 'ffmpeg-[0-9]+(\.[0-9]+)*\.tar\.xz' | sort -V | tail -n 1 || true)
if [ -z "$TARBALL" ]; then
  echo "Error: Could not detect the latest FFmpeg tarball."
  exit 1
fi

LATEST_VERSION="${TARBALL#ffmpeg-}"
LATEST_VERSION="${LATEST_VERSION%.tar.xz}"

CURRENT_VERSION=""
if [ -x "$TARGET_BIN" ]; then
  CURRENT_VERSION=$("$TARGET_BIN" -version | head -n 1 | awk '{print $3}')
fi

if [ "$CURRENT_VERSION" = "$LATEST_VERSION" ]; then
  echo "FFmpeg is already up to date at $CURRENT_VERSION."
  exit 0
fi

echo "Updating FFmpeg from ${CURRENT_VERSION:-not installed} to $LATEST_VERSION..."
mkdir -p "$SRC_DIR" "$BUILD_DIR"
cd "$SRC_DIR"

echo "Downloading $TARBALL..."
curl -fsSLO "$RELEASE_BASE/$TARBALL"
curl -fsSLO "$RELEASE_BASE/$TARBALL.asc"

tmp_gnupg=$(mktemp -d)
cleanup() {
  rm -rf "$tmp_gnupg"
}
trap cleanup EXIT
export GNUPGHOME="$tmp_gnupg"

echo "Verifying $TARBALL..."
curl -fsSL "$SIGNING_KEY_URL" | gpg --import
gpg --verify "$TARBALL.asc" "$TARBALL"
unset GNUPGHOME

echo "Extracting $TARBALL..."
rm -rf "ffmpeg-$LATEST_VERSION"
tar -xf "$TARBALL"
ln -sfn "ffmpeg-$LATEST_VERSION" ffmpeg-current
cd ffmpeg-current

EXTRA_FLAGS=()
# Enable optional AV1 codecs only when the local development packages are new enough.
if pkg-config --exists aom && pkg-config --atleast-version=2.0.0 aom; then
  EXTRA_FLAGS+=(--enable-libaom)
fi
if pkg-config --exists SvtAv1Enc; then
  EXTRA_FLAGS+=(--enable-libsvtav1)
fi

echo "Configuring FFmpeg $LATEST_VERSION..."
./configure \
  --prefix="$BUILD_DIR" \
  --enable-gpl \
  --enable-gnutls \
  --enable-libass \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-libx265 \
  "${EXTRA_FLAGS[@]}"

echo "Compiling FFmpeg $LATEST_VERSION..."
make -j"$(nproc)"

echo "Installing FFmpeg $LATEST_VERSION..."
make install

install_ffmpeg_link() {
  local tool=$1
  local target="$BUILD_DIR/bin/$tool"
  local link="$INSTALL_BINDIR/$tool"
  local current_target

  if [ ! -x "$target" ]; then
    echo "Error: expected binary is missing: $target"
    exit 1
  fi

  if [ -e "$link" ] && [ ! -L "$link" ]; then
    echo "Error: $link exists and is not a symlink. Move it before linking this source build."
    exit 1
  fi

  if [ -L "$link" ]; then
    current_target=$(readlink -f "$link" || true)
    case "$current_target" in
    "$BUILD_DIR/bin/$tool" | "") ;;
    *)
      echo "Error: $link points to $current_target, not this FFmpeg build. Move it before continuing."
      exit 1
      ;;
    esac
  fi

  sudo ln -sfn "$target" "$link"
  printf 'Linked %s -> %s\n' "$link" "$target"
}

for tool in ffmpeg ffprobe ffplay; do
  install_ffmpeg_link "$tool"
done

echo "Update complete:"
ffmpeg -version | head -n 1
EOF

Make the script executable, then create a shorter update-ffmpeg command in your user-local binary directory:

chmod +x ~/ffmpeg-source/update-ffmpeg.sh
mkdir -p ~/.local/bin
ln -sfn "$HOME/ffmpeg-source/update-ffmpeg.sh" "$HOME/.local/bin/update-ffmpeg"
export PATH="$HOME/.local/bin:$PATH"

The exported PATH line makes the shortcut available in the current terminal. Debian’s default shell profile also adds ~/.local/bin on new login sessions when the directory exists, so future terminals can usually run the shorter command directly.

command -v update-ffmpeg
update-ffmpeg
/home/joshua/.local/bin/update-ffmpeg
Checking the latest stable FFmpeg release...
FFmpeg is already up to date at 8.1.1.

Avoid running source-build updates from cron. When a compile fails, a dependency changes, or the upstream tarball layout shifts, you want to see that immediately instead of discovering it later.

Use FFmpeg on Debian for Common Tasks

Start with small generated media files so you can test FFmpeg without hunting for a video first. After the commands make sense, replace the sample filenames with your own files. When you need more filters, muxers, or codec options, keep the official FFmpeg documentation open alongside your terminal.

Create Sample Media Files with FFmpeg

Create a short WAV file and a short MP4 test video in your current directory. The lavfi inputs come from FFmpeg itself, so the command does not need a camera, microphone, or existing media file.

ffmpeg -hide_banner -f lavfi -i sine=frequency=1000:duration=3 -c:a pcm_s16le sample.wav
ffmpeg -hide_banner -f lavfi -i testsrc=size=1920x1080:rate=30:duration=3 -f lavfi -i sine=frequency=1000:duration=3 -c:v libx264 -pix_fmt yuv420p -c:a aac sample.mp4

The first command creates a three-second tone in sample.wav. The second command creates a three-second test-pattern video with an audio track in sample.mp4, which gives the later examples something predictable to inspect, convert, resize, and trim.

Inspect Media Files with FFprobe on Debian

Use ffprobe when you need stream details before converting or trimming a file:

ffprobe -hide_banner sample.mp4

Typical output shows the container, duration, and each stream:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.mp4':
  Duration: 00:00:03.00, start: 0.000000, bitrate: 287 kb/s
  Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 30 fps
  Stream #0:1: Audio: aac (LC), 44100 Hz, mono, fltp

That gives you the container, codec, duration, bit rate, and stream layout without re-encoding anything. It is also the quickest way to confirm whether a file has an audio stream before you extract or remove audio.

Convert Video Formats with FFmpeg

When the existing video and audio codecs already fit the target container, stream copying is the fastest option. This example repackages the sample MP4 into an MKV container without re-encoding:

ffmpeg -i sample.mp4 -c:v copy -c:a copy sample.mkv

This keeps the original streams intact, so the job finishes quickly and avoids quality loss. If the codecs are not valid for the target container, FFmpeg stops and you need to re-encode instead.

Convert Audio to MP3 with FFmpeg

Use this command for audio-only sources such as WAV or AAC files:

ffmpeg -i sample.wav -c:a libmp3lame -q:a 2 sample.mp3

The -q:a 2 setting targets high-quality variable bitrate MP3 output. If the input is a video file, add -vn to ignore the video stream and keep the rest of the command the same.

ffmpeg -i sample.mp4 -vn -c:a libmp3lame -q:a 2 sample-from-video.mp3

Resize Video to 720p with FFmpeg

Re-encode a video to 1280×720 with H.264 video and AAC audio:

ffmpeg -i sample.mp4 -vf "scale=1280:720" -c:v libx264 -preset medium -crf 23 -c:a aac -b:a 128k sample-720p.mp4

-preset medium is a sensible default for most jobs, while -crf 23 aims for balanced quality and file size. Lower CRF values increase quality and file size, while higher values compress harder.

Trim or Split Video with FFmpeg

Cut a short clip from a larger file without re-encoding:

ffmpeg -ss 00:00:01 -i sample.mp4 -t 00:00:01 -c copy clip.mp4

Placing -ss before -i makes rough cuts faster because FFmpeg seeks before decoding. For frame-accurate trims, move -ss after -i and re-encode the output instead of using -c copy.

Update FFmpeg on Debian

Use the update path that matches your install method. The Debian package follows APT, while a source build follows the update script created with the source tree.

Update the Debian Repository Package

Refresh package metadata, then let APT upgrade the installed FFmpeg package when a newer revision is available for your Debian release:

sudo apt update
sudo apt install --only-upgrade ffmpeg

If FFmpeg is already current, APT reports that no upgrade is needed. Normal full-system upgrades also update FFmpeg because the package remains owned by Debian’s package manager.

Update a Source-Compiled FFmpeg Build

Run the updater from your regular user account. The command checks FFmpeg.org, verifies the release signature, rebuilds only when a newer stable tarball exists, and refreshes the /usr/local/bin symlinks.

update-ffmpeg

If the command reports that FFmpeg is already current, leave the source tree in place. If your shell cannot find update-ffmpeg, open a new terminal or run ~/ffmpeg-source/update-ffmpeg.sh directly.

Troubleshoot FFmpeg on Debian

These are the issues most likely to show up after installation or after switching between the Debian package and a source-compiled build.

Fix ffprobe or ffplay Command Not Found on Debian

Debian’s ffmpeg package includes ffprobe and ffplay. If one of those commands is missing, first confirm whether the Debian package is installed and whether your source build linked all three commands.

dpkg-query -W -f='${db:Status-Abbrev} ${binary:Package}\n' ffmpeg 2>/dev/null || true
command -v ffmpeg ffprobe ffplay
ii  ffmpeg
/usr/bin/ffmpeg
/usr/bin/ffprobe
/usr/bin/ffplay

If the package status is missing or does not start with ii, install the Debian package with sudo apt install ffmpeg. If only the source-built command is missing, rerun the source install or update script so the guarded symlink step recreates /usr/local/bin/ffprobe and /usr/local/bin/ffplay.

Fix the “Unknown encoder ‘libx264′” FFmpeg Error

If FFmpeg reports that libx264 does not exist, check whether your active binary exposes that encoder.

Unknown encoder 'libx264'

Run this diagnostic command:

ffmpeg -hide_banner -encoders | grep libx264

With Debian’s repository build, you should see output like this:

V....D libx264              libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
V....D libx264rgb           libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)

If the command returns nothing, the FFmpeg binary you are running was built without x264 support or you are hitting the wrong copy in your path.

Fix the “aom >= 2.0.0 not found” Source Build Error on Debian 11

This is the Bullseye-specific problem that usually catches source builders when they try to enable libaom with a current FFmpeg 8.x release.

ERROR: aom >= 2.0.0 not found using pkg-config

Check the installed AOM version:

pkg-config --modversion aom
1.0.0

On Debian 11, skip --enable-libaom and continue with the rest of the source build, or move to Debian 12 or Debian 13 if you need a newer packaged AV1 development stack. The configure block already handles that automatically.

Fix FFmpeg Permission Denied Errors on Debian

When FFmpeg cannot create the output file, check the target directory instead of chasing codec settings.

output.mp4: Permission denied

Inspect the directory you are writing to:

ls -ld /path/to/output-directory
drwxr-xr-x 2 joshua joshua 4096 Mar  1 12:00 /home/joshua/Videos

If the directory owner is different, write the output into your home directory or correct the directory permissions first.

Fix Multiple FFmpeg Versions in Your Debian PATH

If the version you see does not match the installation method you just used, list every matching binary in your shell path:

type -a ffmpeg

When a previous source build still exists, the output often looks like this. If you usually rely on which, the which command guide covers the simpler lookup form, but type -a is better for this diagnostic because it shows every matching binary in your path.

ffmpeg is /usr/local/bin/ffmpeg
ffmpeg is /usr/bin/ffmpeg

The first path wins. Use /usr/bin/ffmpeg explicitly when you want the Debian package, or remove the copy in /usr/local/bin if the source build is no longer needed.

Remove FFmpeg from Debian

Remove only the method you actually used. The Debian package and the source build can coexist, so deleting one path does not automatically delete the other.

Remove the Debian FFmpeg Package

Remove the Debian package if you no longer want the repository build:

sudo apt remove ffmpeg

If APT reports unused dependencies, review the cleanup proposal separately before accepting it:

sudo apt autoremove

Verify that the Debian package itself is gone:

dpkg-query -W -f='${db:Status-Abbrev} ${binary:Package}\n' ffmpeg 2>/dev/null || echo "ffmpeg package is not installed"
ffmpeg package is not installed

If ffmpeg still resolves after this step, that usually means you still have a source build in /usr/local/bin. That is normal until you remove the source-installed copy as well.

Remove a Source-Compiled FFmpeg Install on Debian

Remove the source-build symlinks first, then clean up the local source and build directories if you do not need them anymore. The symlink check leaves unrelated files in /usr/local/bin alone.

The cleanup command deletes your local FFmpeg source tree, compiled build directory, update script, and user-local update-ffmpeg shortcut. Back up any local patches or build notes before removing those directories.

for tool in ffmpeg ffprobe ffplay; do
  link="/usr/local/bin/$tool"
  expected="$HOME/ffmpeg-build/bin/$tool"

  if [ -L "$link" ]; then
    target=$(readlink -f "$link" || true)
    if [ "$target" = "$expected" ]; then
      sudo rm -f "$link"
      printf 'Removed %s\n' "$link"
    else
      printf 'Leaving %s in place because it points to %s\n' "$link" "${target:-unknown}"
    fi
  fi
done

shortcut="$HOME/.local/bin/update-ffmpeg"
expected_shortcut="$HOME/ffmpeg-source/update-ffmpeg.sh"

if [ -L "$shortcut" ]; then
  target=$(readlink -f "$shortcut" || true)
  if [ "$target" = "$expected_shortcut" ]; then
    rm -f "$shortcut"
    printf 'Removed %s\n' "$shortcut"
  else
    printf 'Leaving %s in place because it points to %s\n' "$shortcut" "${target:-unknown}"
  fi
fi

rm -rf ~/ffmpeg-source ~/ffmpeg-build
hash -r

If the Debian package is still installed, it becomes the active copy again after the source-build symlinks are removed:

command -v ffmpeg
/usr/bin/ffmpeg

If the command prints nothing, no FFmpeg binary remains in your current PATH. Install the Debian package again with sudo apt install ffmpeg if you still need FFmpeg after removing the source build.

Conclusion

FFmpeg is ready on Debian with the repository package as the easiest maintenance path and a signed source-build option for newer upstream releases. Keep APT as the default unless a codec, filter, or bug fix requires the source build. For GUI encoding, see HandBrake on Debian, or add image conversion with ImageMagick on Debian.

Share this guide

Help another Linux user troubleshoot faster

Share this guide with someone troubleshooting Linux systems or saving it for later.

Follow LinuxCapable

Want more LinuxCapable guides in Google?

Add LinuxCapable as a preferred source so Google can show more of our fresh Linux tutorials in Top Stories and From your sources when relevant.

Add LinuxCapable as a preferred source on Google
Search LinuxCapable

Need another guide?

Search LinuxCapable for package installs, commands, troubleshooting, and follow-up guides related to what you just read.

Found this guide useful?

Support LinuxCapable to keep tutorials free and up to date.

Buy me a coffeeBuy me a coffee

1 thought on “How to Install FFmpeg on Debian 13, 12 and 11”

Before commenting, please review our Comments Policy.
Formatting tips for your comment

You can use basic HTML to format your comment. Useful tags currently allowed in published comments:

You type Result
<code>command</code> command
<strong>bold</strong> bold
<em>italic</em> italic
<blockquote>quote</blockquote> quote block

Got a Question or Feedback?

We read and reply to every comment - let us know how we can help or improve this guide.

Verify before posting: