
If you work with video, audio, or streaming on Linux, you need FFmpeg installed. This guide shows you exactly how to install FFmpeg on Ubuntu 26.04 using the official APT package manager, verify the installation, and start using it right away. You will get clear commands, explanations of why each step matters, and real troubleshooting tips from 10 years of sysadmin experience.
Ubuntu 26.04 LTS brings a fresh, stable base for media processing, and FFmpeg is the industry-standard tool for transcoding, streaming, and manipulating multimedia files. Whether you are setting up a media server, automating video conversions, or building a content pipeline, you need this tool working correctly from day one.
Prerequisites
Before you begin installing FFmpeg on Ubuntu 26.04, make sure you have these requirements met:
- Operating System: Ubuntu 26.04 LTS (fresh install or existing system)
- User permissions: sudo access (administrator rights)
- Internet connection: Active and stable for package downloads
- Terminal access: SSH session or local terminal window
- Package manager: APT (comes pre-installed with Ubuntu)
- Disk space: At least 100 MB free for FFmpeg and dependencies
You do not need to compile from source for most use cases. The Ubuntu repository package is stable, secure, and updates automatically with your system.
Step 1: Update Your System Package Lists
sudo apt update
What This Command Does
The apt update command refreshes your local package index. It contacts Ubuntu’s package mirrors and downloads the latest metadata about available software versions.
Why This Step Matters
You must run this before installing any new package. Without updating, your system might try to install an outdated version of FFmpeg or fail because the package database is stale. This is a fundamental rule in Linux package management that prevents dependency conflicts and installation errors.
Expected output looks like this:
Get:1 http://archive.ubuntu.com/ubuntu noble InRelease [256 kB]
Get:2 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
...
Fetched 8,456 kB in 3s (2,890 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
XX packages can be upgraded. Run 'apt list --upgradable' to see them.
The key thing to notice is the “Reading package lists… Done” message. This confirms your system now knows what packages are available.
Step 2: (Optional) Upgrade Existing Packages
sudo apt upgrade -y
What This Command Does
The apt upgrade -y command upgrades all installed packages to their latest versions available in the repositories. The -y flag automatically confirms the upgrade without prompting you.
Why This Step Matters
Upgrading existing packages before installing FFmpeg reduces the chance of dependency conflicts. If your system has outdated libraries that FFmpeg depends on, the installation might fail or create unstable behavior. This is especially important on fresh Ubuntu 26.04 installations where security updates might already be available.
Skip this step if you are in a hurry and your system is already up-to-date. However, for production servers, always upgrade first.
Expected output:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
base-files bash coreutils ...
XX upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
You will see a list of packages being upgraded. This is normal and expected.
Step 3: Install FFmpeg Using APT
sudo apt install ffmpeg -y
What This Command Does
This command tells APT to download and install the FFmpeg package along with all required dependencies. The -y flag automatically confirms the installation, so you do not need to type “Y” when prompted.
Why This Step Matters
Ubuntu carries the FFmpeg package in the Universe component of its official repositories. Installing through APT is the cleanest, safest, and most maintainable method. The package manager handles dependencies automatically, tracks the installation for future updates, and integrates with your system’s security updates.
This is different from downloading binaries from random websites or compiling from source, which can break system stability or leave you responsible for manual updates.
Expected output:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
i965-va-driver libaacs0 libass9 libavcodec60 libavfilter9 ...
The following NEW packages will be installed:
ffmpeg i965-va-driver libaacs0 ...
0 upgraded, 45 newly installed, 0 to remove and 0 not upgraded.
Need to get 48.2 MB of archives.
After this operation, 182 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble/universe amd64 ffmpeg amd64 7:6.1.1-3ubuntu5 [1,890 kB]
...
Unpacking ffmpeg (7:6.1.1-3ubuntu5) ...
Setting up ffmpeg (7:6.1.1-3ubuntu5) ...
Processing triggers for man-db ...
Notice the version number in the output. On Ubuntu 26.04, you will likely see a version like 7:6.1.1-3ubuntu5 or similar, which comes from the official Ubuntu repository.
Step 4: Verify That FFmpeg Installed Correctly
ffmpeg -version
What This Command Does
The ffmpeg -version command displays the installed FFmpeg version, build configuration, and supported codecs. This is your first health check to confirm the installation worked.
Why This Step Matters
Verification is critical. You cannot assume the install succeeded just because APT did not show an error. This command proves the binary is installed, executable, and in your system PATH. It also shows you the exact version so you know what capabilities you have.
Expected output:
ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
configuration: --prefix=/usr --extra-version=3ubuntu5 ...
libavutil 58.29.100 / 58.29.100
libavcodec 60.31.102 / 60.31.102
libavformat 60.16.100 / 60.16.100
libavdevice 60.3.100 / 60.3.100
libavfilter 9.12.100 / 9.12.100
libswscale 7.5.100 / 7.5.100
libswresample 4.12.100 / 4.12.100
The first line is the most important. It shows the version number and confirms FFmpeg is working.
Step 5: Find Where FFmpeg Is Installed
which ffmpeg
What This Command Does
The which ffmpeg command shows the full path to the FFmpeg executable in your system.
Why This Step Matters
Knowing the install path helps with debugging PATH issues, creating symlinks, or configuring applications that need the full path to FFmpeg. It also confirms that your shell can find the command correctly.
Expected output:
/usr/bin/ffmpeg
This is the standard location for user-installed packages on Ubuntu. If you see a different path or “ffmpeg not found,” something is wrong with your installation or PATH configuration.
You can also use this alternative command:
command -v ffmpeg
Both commands give the same result. command -v is slightly more portable across different shells.
Step 6: Test FFmpeg with a Basic Command
ffmpeg -i input.mp4 -c copy output_copy.mp4
What This Command Does
This command copies the video and audio streams from input.mp4 to output_copy.mp4 without re-encoding. The -c copy flag tells FFmpeg to copy streams directly, which is fast and lossless.
Why This Step Matters
Running a simple test confirms FFmpeg can read files, process commands, and write output. This is your functional test beyond just checking the version. If this works, your FFmpeg on Ubuntu 26.04 setup is ready for real work.
You do not need an actual input.mp4 file to test this. Just knowing the command structure is useful. In practice, you would replace input.mp4 with your actual video file.
Expected output (truncated):
ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
configuration: --prefix=/usr --extra-version=3ubuntu5 ...
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
Metadata:
major_brand : isom
version : 512
...
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Output #0, mp4, to 'output_copy.mp4':
Metadata:
major_brand : isom
...
frame= 125 fps=0.0 q=-1.0 size= 12345kB time=00:00:05.00 bitrate=20234.5kbits/s speed= 10x
video:10240kB audio:2048kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.5%
The key thing to notice is “Stream mapping” and “Output #0” showing that FFmpeg processed the file correctly.
Understanding FFmpeg’s Capabilities After Installation
Once you install FFmpeg on Ubuntu 26.04, you gain access to hundreds of codecs, formats, and filters. The official FFmpeg documentation is your primary resource for advanced usage, and it covers everything from basic transcoding to complex streaming pipelines.
Common use cases include:
- Video conversion: Convert between formats like MP4, MKV, AVI, and WebM
- Audio extraction: Pull audio from video files as MP3, AAC, or OGG
- Streaming: Set up RTMP, HLS, or SRT streaming servers
- Batch processing: Automate conversions with shell scripts
- Thumbnail generation: Extract frames as images
- Video compression: Reduce file size while maintaining quality
Ubuntu’s packaged version includes most commonly used codecs through the Universe repository. If you need specialized codecs not included in the default package, you might need to compile from source or use additional packages, but 95% of users will never need this.
Troubleshooting Common FFmpeg Installation Errors
Error 1: “ffmpeg: command not found”
Problem: After installation, typing ffmpeg returns “command not found.”
Solution:
sudo apt install ffmpeg -y
hash -r
ffmpeg -version
Why This Happens: Your shell cache still thinks FFmpeg is not installed. The hash -r command clears the shell’s command cache, forcing it to re-scan your PATH for the executable. Re-running ffmpeg -version confirms the fix worked.
If the problem persists, check that the package actually installed:
dpkg -l | grep ffmpeg
This shows whether the FFmpeg package is registered in your system.
Error 2: “Package ffmpeg not found” or “Unable to locate package”
Problem: APT cannot find the FFmpeg package during installation.
Solution:
sudo apt update
sudo apt install software-properties-common -y
sudo add-apt-repository universe
sudo apt update
sudo apt install ffmpeg -y
Why This Happens: The Universe repository might be disabled on your system. Ubuntu separates packages into components (Main, Restricted, Universe, Multiverse), and FFmpeg lives in Universe. Enabling it and updating the package list makes FFmpeg available for installation.
Check if Universe is enabled:
apt-cache policy | grep universe
If you see “universe” in the output, the repository is enabled.
Error 3: FFmpeg Version Is Too Old
Problem: The installed FFmpeg version is older than you need for specific codecs or features.
Solution:
ffmpeg -version
sudo apt update
sudo apt upgrade ffmpeg -y
ffmpeg -version
Why This Happens: Ubuntu prioritizes stability over cutting-edge features, so repository packages may lag behind the latest upstream releases. If you need newer features, you might need to compile from source or use a PPA, but this is rarely necessary for standard use cases.
Check the version against FFmpeg’s official release notes to see if you are missing critical features.
Error 4: Permission Denied When Running FFmpeg
Problem: FFmpeg commands fail with “Permission denied” errors.
Solution:
ls -la /usr/bin/ffmpeg
chmod +x /usr/bin/ffmpeg
ffmpeg -version
Why This Happens: The executable might not have the correct permissions. Running ls -la shows the file permissions. The executable should have x (execute) permission for the user running the command.
This is rare on properly installed systems, but it can happen if file permissions were manually changed or if the installation was interrupted.
Error 5: Dependency Errors During Installation
Problem: APT shows dependency errors when installing FFmpeg.
Solution:
sudo apt --fix-broken install -y
sudo apt update
sudo apt install ffmpeg -y
Why This Happens: Your package database might be in an inconsistent state, often from interrupted installations or failed upgrades. The --fix-broken install command repairs dependency issues before you retry the FFmpeg installation.
If this continues to fail, check your system logs:
sudo dpkg --configure -a
sudo apt-get -f install
These commands force APT to configure pending packages and fix broken dependencies.
How to Remove FFmpeg from Ubuntu (If Needed)
Sometimes you need to uninstall FFmpeg, such as when testing different versions or cleaning up a server.
sudo apt remove ffmpeg -y
sudo apt autoremove -y
What These Commands Do
apt remove ffmpeg: Uninstalls the FFmpeg package but keeps configuration filesapt autoremove: Removes dependencies that were installed only for FFmpeg and are no longer needed
Why You Might Do This
You might remove FFmpeg to install a different build, troubleshoot installation issues, or free disk space on a minimal server. The autoremove command is important because FFmpeg pulls in many libraries, and you want to clean those up too.
To remove everything including configuration files:
sudo apt purge ffmpeg -y
sudo apt autoremove -y
The purge flag removes configuration files in addition to the binary.
[su_box title=”VPS Manage Service Offer” style=”bubbles” box_color=”#000000″ radius=”10″]If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal![/su_box]