{"id":266,"date":"2025-01-13T09:19:18","date_gmt":"2025-01-13T14:19:18","guid":{"rendered":"http:\/\/underhost.com\/blog\/?p=266"},"modified":"2026-10-23T08:53:56","modified_gmt":"2026-10-23T12:53:56","slug":"install-ffmpeg-on-linux","status":"publish","type":"post","link":"https:\/\/underhost.com\/blog\/install-ffmpeg-on-linux\/","title":{"rendered":"How to Install FFmpeg on AlmaLinux, Rocky Linux, Debian and Ubuntu (2026 Guide)"},"content":{"rendered":"<div class=\"uh-blog-hero\" style=\"margin:0 0 40px;text-align:center;padding:48px 24px;border-radius:20px;background:linear-gradient(135deg,#0D1F3C 0%,#125A8A 58%,#176EA5 100%);color:#ffffff;box-shadow:0 20px 40px -15px rgba(13,31,60,0.28);position:relative;overflow:hidden;\">\n<div style=\"display:inline-flex;align-items:center;gap:8px;padding:7px 14px;margin-bottom:16px;border:1px solid rgba(0,212,255,0.32);border-radius:999px;color:#DFF8FF;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;background:rgba(0,212,255,0.10);\"><i class=\"fas fa-server\" style=\"color:#00D4FF;\"><\/i> Hosting Guide<\/div>\n<h1 style=\"color:#ffffff;font-size:clamp(32px,5vw,46px);line-height:1.12;margin:0 0 14px;font-weight:800;\">How to Install FFmpeg on AlmaLinux, Rocky Linux, Debian and Ubuntu (2026 Guide)<\/h1>\n<p style=\"font-size:18px;color:#EAF6FF;max-width:800px;margin:0 auto;line-height:1.7;\">Learn how to install FFmpeg on AlmaLinux, Debian, CentOS, and Ubuntu with this updated step-by-step guide. Whether you&#8217;re using the latest AlmaLinux, traditional CentOS, or popular Debian\/Ubuntu systems, this tutorial ensures a smooth installation process for video and audio manipulation.<\/p>\n<\/div>\n<div class=\"uh-blog-excerpt\" style=\"border-left:4px solid #00D4FF;padding:18px 20px;margin:0 0 34px;background:#F8FAFC;color:#1F2937;border-radius:0 14px 14px 0;box-shadow:0 8px 28px rgba(13,31,60,0.08);line-height:1.75;\"><strong style=\"color:#0D1F3C;\">Short answer:<\/strong> On Debian and Ubuntu, run <code>sudo apt install ffmpeg<\/code>. On AlmaLinux and Rocky Linux, FFmpeg is not in the default repositories: enable EPEL, the CRB repository (PowerTools on version 8) and RPM Fusion, then run <code>sudo dnf install ffmpeg<\/code>. Check the result with <code>ffmpeg -version<\/code>. FFmpeg needs root access, so install it on a VPS or dedicated server, not on shared hosting.<\/div>\n<nav aria-label=\"Table of contents\" class=\"uh-toc\" style=\"background:#ffffff;border:1px solid #E5E7EB;border-radius:16px;padding:20px 22px;margin:0 0 34px;box-shadow:0 4px 12px rgba(13,31,60,0.08);\">\n<div style=\"font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#176EA5;margin-bottom:10px;\"><i class=\"fas fa-list\" style=\"color:#00D4FF;\"><\/i> In this guide<\/div>\n<ol style=\"margin:0;padding-left:20px;columns:2 260px;column-gap:28px;line-height:1.9;\">\n<li><a href=\"#what-ffmpeg-is-used-for-on-a-server\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">What FFmpeg is used for on a server<\/a><\/li>\n<li><a href=\"#before-you-start\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Before you start<\/a><\/li>\n<li><a href=\"#install-ffmpeg-on-almalinux-and-rocky-linux-9\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Install FFmpeg on AlmaLinux and Rocky Linux 9<\/a><\/li>\n<li><a href=\"#install-ffmpeg-on-almalinux-and-rocky-linux-8\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Install FFmpeg on AlmaLinux and Rocky Linux 8<\/a><\/li>\n<li><a href=\"#install-ffmpeg-on-debian-12-and-13\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Install FFmpeg on Debian 12 and 13<\/a><\/li>\n<li><a href=\"#install-ffmpeg-on-ubuntu-22-04-and-24-04\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Install FFmpeg on Ubuntu 22.04 and 24.04<\/a><\/li>\n<li><a href=\"#check-that-ffmpeg-works\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Check that FFmpeg works<\/a><\/li>\n<li><a href=\"#everyday-ffmpeg-commands\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Everyday FFmpeg commands<\/a><\/li>\n<li><a href=\"#which-video-codec-to-use\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Which video codec to use<\/a><\/li>\n<li><a href=\"#convert-a-whole-folder\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Convert a whole folder<\/a><\/li>\n<li><a href=\"#run-ffmpeg-safely-on-a-production-server\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Run FFmpeg safely on a production server<\/a><\/li>\n<li><a href=\"#gpu-hardware-encoding\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">GPU hardware encoding<\/a><\/li>\n<li><a href=\"#troubleshooting\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Troubleshooting<\/a><\/li>\n<li><a href=\"#keep-ffmpeg-updated\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Keep FFmpeg updated<\/a><\/li>\n<\/ol>\n<\/nav>\n<div class=\"uh-post-content\" style=\"color:#1F2937;font-size:16px;line-height:1.75;\">\n<h2 id=\"what-ffmpeg-is-used-for-on-a-server\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-server\" style=\"color:#00D4FF;\"><\/i> What FFmpeg is used for on a server<\/h2>\n<p style=\"margin:0 0 18px;\">FFmpeg is a command-line toolkit that reads, converts and processes almost any audio and video format. On a server it usually runs behind an application rather than by hand. Common jobs include:<\/p>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\">converting uploaded videos to a web-friendly format (H.264 MP4 or WebM),<\/li>\n<li style=\"margin:0 0 8px;\">creating thumbnails and preview images from videos,<\/li>\n<li style=\"margin:0 0 8px;\">extracting or converting audio,<\/li>\n<li style=\"margin:0 0 8px;\">resizing and compressing media to save bandwidth,<\/li>\n<li style=\"margin:0 0 8px;\">packaging video for streaming, for example as HLS segments.<\/li>\n<\/ul>\n<p style=\"margin:0 0 18px;\">Video processing is CPU-heavy. A single high-resolution conversion can keep several cores busy for minutes, so plan the server size around how much media you process.<\/p>\n<h2 id=\"before-you-start\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-clipboard-check\" style=\"color:#00D4FF;\"><\/i> Before you start<\/h2>\n<ul style=\"list-style:none;padding-left:0;\">\n<li style=\"margin:0 0 8px;\">\u2713 Root or sudo access to a VPS or dedicated server.<\/li>\n<li style=\"margin:0 0 8px;\">\u2713 A supported Linux release. Check yours with <code>cat \/etc\/os-release<\/code>.<\/li>\n<li style=\"margin:0 0 8px;\">\u2713 Enough disk space for the source files and the converted output.<\/li>\n<li style=\"margin:0 0 8px;\">\u2713 A test file to confirm the install works.<\/li>\n<\/ul>\n<h2 id=\"install-ffmpeg-on-almalinux-and-rocky-linux-9\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Install FFmpeg on AlmaLinux and Rocky Linux 9<\/h2>\n<p style=\"margin:0 0 18px;\">FFmpeg comes from RPM Fusion, which depends on EPEL and on the CRB repository.<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>sudo dnf install -y epel-release dnf-plugins-core\nsudo dnf config-manager --set-enabled crb\nsudo dnf install -y https:\/\/mirrors.rpmfusion.org\/free\/el\/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm\nsudo dnf install -y ffmpeg ffmpeg-devel\nffmpeg -version<\/code><\/pre>\n<h2 id=\"install-ffmpeg-on-almalinux-and-rocky-linux-8\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Install FFmpeg on AlmaLinux and Rocky Linux 8<\/h2>\n<p style=\"margin:0 0 18px;\">Version 8 uses the PowerTools repository instead of CRB.<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>sudo dnf install -y epel-release dnf-plugins-core\nsudo dnf config-manager --set-enabled powertools\nsudo dnf install -y https:\/\/mirrors.rpmfusion.org\/free\/el\/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm\nsudo dnf install -y ffmpeg ffmpeg-devel\nffmpeg -version<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">You only need <code>ffmpeg-devel<\/code> if you compile software against the FFmpeg libraries. To run FFmpeg, the <code>ffmpeg<\/code> package is enough.<\/p>\n<h2 id=\"install-ffmpeg-on-debian-12-and-13\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Install FFmpeg on Debian 12 and 13<\/h2>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>sudo apt update\nsudo apt install -y ffmpeg\nffmpeg -version<\/code><\/pre>\n<h2 id=\"install-ffmpeg-on-ubuntu-22-04-and-24-04\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Install FFmpeg on Ubuntu 22.04 and 24.04<\/h2>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>sudo apt update\nsudo apt install -y ffmpeg\nffmpeg -version<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">The Debian and Ubuntu packages are in the main repositories, so no extra repository is needed.<\/p>\n<h2 id=\"check-that-ffmpeg-works\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-clipboard-check\" style=\"color:#00D4FF;\"><\/i> Check that FFmpeg works<\/h2>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code># Version and build options\nffmpeg -version\n\n# Is the H.264 encoder available?\nffmpeg -hide_banner -encoders | grep -i 264\n\n# Quick test: convert a file and check the output\nffmpeg -i input.mov -c:v libx264 -c:a aac test.mp4<\/code><\/pre>\n<h2 id=\"everyday-ffmpeg-commands\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Everyday FFmpeg commands<\/h2>\n<div style=\"overflow-x:auto;margin:26px 0;border:1px solid #E5E7EB;border-radius:14px;-webkit-overflow-scrolling:touch;\">\n<table style=\"width:100%;border-collapse:collapse;background:#ffffff;color:#1F2937;font-size:15px;line-height:1.55;margin:0;\">\n<thead>\n<tr style=\"background:#0D1F3C;color:#fff;\">\n<th style=\"padding:14px;text-align:left;\">Task<\/th>\n<th style=\"padding:14px;text-align:left;\">Command<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Convert to a web-friendly MP4<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>ffmpeg -i input.mov -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k output.mp4<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Resize to 1280 px wide<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>ffmpeg -i input.mp4 -vf scale=1280:-2 output.mp4<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Extract the audio as MP3<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>ffmpeg -i input.mp4 -vn -q:a 2 output.mp3<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Trim without re-encoding<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>ffmpeg -ss 00:00:10 -to 00:00:40 -i input.mp4 -c copy clip.mp4<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Make a thumbnail at 5 seconds<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>ffmpeg -ss 00:00:05 -i input.mp4 -frames:v 1 thumb.jpg<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">List the codecs FFmpeg supports<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>ffmpeg -codecs<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"margin:0 0 18px;\">In the conversion command, <code>-crf<\/code> sets the quality: lower numbers give better quality and larger files, and 23 is a common default. <code>-preset<\/code> trades speed for file size: <code>slow<\/code> makes smaller files but takes longer.<\/p>\n<h2 id=\"which-video-codec-to-use\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-info-circle\" style=\"color:#00D4FF;\"><\/i> Which video codec to use<\/h2>\n<div style=\"overflow-x:auto;margin:26px 0;border:1px solid #E5E7EB;border-radius:14px;-webkit-overflow-scrolling:touch;\">\n<table style=\"width:100%;border-collapse:collapse;background:#ffffff;color:#1F2937;font-size:15px;line-height:1.55;margin:0;min-width:600px;\">\n<thead>\n<tr style=\"background:#0D1F3C;color:#fff;\">\n<th style=\"padding:14px;text-align:left;\">Codec<\/th>\n<th style=\"padding:14px;text-align:left;\">FFmpeg encoder<\/th>\n<th style=\"padding:14px;text-align:left;\">When to use it<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">H.264<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>libx264<\/code><\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">The safest choice for the web. It plays in almost every browser and device.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">H.265 (HEVC)<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>libx265<\/code><\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Smaller files at the same quality, but browser support is limited.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">VP9<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>libvpx-vp9<\/code><\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Open format used in WebM files, well supported in Chrome and Firefox.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">AV1<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>libaom-av1<\/code> or <code>libsvtav1<\/code><\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">The smallest files, but encoding is slow on a CPU.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"margin:0 0 18px;\">If you are not sure, use H.264 for the main file. Add other formats only when you need the smaller size.<\/p>\n<h2 id=\"convert-a-whole-folder\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Convert a whole folder<\/h2>\n<p style=\"margin:0 0 18px;\">This loop converts every MOV file in the current folder to MP4 and keeps the original files.<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>for f in *.mov; do\n  ffmpeg -n -i \"$f\" -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k \"${f%.mov}.mp4\"\ndone<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">The <code>-n<\/code> option skips files that were already converted, so you can safely run the loop again.<\/p>\n<h2 id=\"run-ffmpeg-safely-on-a-production-server\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-server\" style=\"color:#00D4FF;\"><\/i> Run FFmpeg safely on a production server<\/h2>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\"><strong>Run jobs one at a time.<\/strong> Use a queue in your application instead of starting a conversion for every upload at once.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Lower the priority.<\/strong> Start conversions with <code>nice -n 10<\/code> so the website keeps its share of the CPU.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Limit threads<\/strong> with <code>-threads<\/code> when the server also serves visitors.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Clean up temporary files.<\/strong> Failed jobs can leave large partial files behind, so remove old files from your work folder on a schedule.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Run as a normal user,<\/strong> not as root, and only on files your application controls.<\/li>\n<\/ul>\n<h2 id=\"gpu-hardware-encoding\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> GPU hardware encoding<\/h2>\n<p style=\"margin:0 0 18px;\">On a server with an NVIDIA GPU, FFmpeg can encode with NVENC, which is much faster than CPU encoding for H.264 and H.265. This needs the NVIDIA driver and an FFmpeg build with NVENC support. Check whether your build has it:<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>ffmpeg -hide_banner -encoders | grep -i nvenc\n\n# If listed, encode on the GPU\nffmpeg -i input.mp4 -c:v h264_nvenc -preset p5 -c:a copy output.mp4<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">If nothing is listed, the build does not include NVENC. GPU encoding suits services that process a lot of video, such as streaming platforms and media libraries.<\/p>\n<h2 id=\"troubleshooting\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-exclamation-triangle\" style=\"color:#00D4FF;\"><\/i> Troubleshooting<\/h2>\n<div style=\"overflow-x:auto;margin:26px 0;border:1px solid #E5E7EB;border-radius:14px;-webkit-overflow-scrolling:touch;\">\n<table style=\"width:100%;border-collapse:collapse;background:#ffffff;color:#1F2937;font-size:15px;line-height:1.55;margin:0;min-width:600px;\">\n<thead>\n<tr style=\"background:#0D1F3C;color:#fff;\">\n<th style=\"padding:14px;text-align:left;\">Message or problem<\/th>\n<th style=\"padding:14px;text-align:left;\">Cause<\/th>\n<th style=\"padding:14px;text-align:left;\">Fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>No match for argument: ffmpeg<\/code><\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">RPM Fusion, EPEL or CRB\/PowerTools is not enabled<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Repeat the repository steps for your version, then run the install again.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>Unknown encoder 'libx264'<\/code><\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">The FFmpeg build does not include x264<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Install FFmpeg from RPM Fusion or the Debian\/Ubuntu repositories, which include it.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Server becomes slow during conversions<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">FFmpeg uses all available CPU cores<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Limit threads with <code>-threads 2<\/code>, or run jobs with <code>nice -n 10<\/code> so the website stays responsive.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>ffmpeg: command not found<\/code><\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">The install did not finish, or the binary is not on the path<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Run the install command again and check its output for errors.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 id=\"keep-ffmpeg-updated\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Keep FFmpeg updated<\/h2>\n<p style=\"margin:0 0 18px;\">FFmpeg reads untrusted files, so security fixes matter. Update it with the rest of the system: <code>sudo dnf upgrade<\/code> or <code>sudo apt update &amp;&amp; sudo apt upgrade<\/code>. Avoid copying random static binaries from the internet, because they do not receive updates.<\/p>\n<p style=\"margin:0 0 18px;\">For other software on the same server, see our guides to <a href=\"https:\/\/underhost.com\/blog\/install-mongodb-cpanel-server\/\">installing MongoDB on a cPanel server<\/a> and <a href=\"https:\/\/underhost.com\/blog\/debian-13-trixie-upgrade-guide-maximize-performance-on-underhost\/\">upgrading to Debian 13<\/a>.<\/p>\n<div aria-hidden=\"true\" class=\"uh-section-divider\" style=\"width:min(100% - 32px, 1080px);margin:44px auto;display:grid;grid-template-columns:1fr 32px 1fr;align-items:center;gap:18px;pointer-events:none;\"><span style=\"height:1px;background:linear-gradient(90deg,transparent,rgba(0,212,255,0.40),rgba(23,110,165,0.24),transparent);\"><\/span><img alt=\"\" decoding=\"async\" height=\"32\" loading=\"lazy\" src=\"https:\/\/cdn.underhost.com\/android-chrome-192x192.webp\" style=\"width:32px;height:32px;display:block;border-radius:8px;filter:drop-shadow(0 0 14px rgba(0,212,255,0.30));\" width=\"32\"\/><span style=\"height:1px;background:linear-gradient(90deg,transparent,rgba(23,110,165,0.24),rgba(0,212,255,0.40),transparent);\"><\/span><\/div>\n<\/div>\n<div class=\"uh-blog-cta\" style=\"background:linear-gradient(135deg,#0D1F3C 0%,#125A8A 58%,#176EA5 100%);color:#ffffff;padding:36px 24px;border-radius:20px;text-align:center;margin:44px 0;box-shadow:0 20px 40px -15px rgba(13,31,60,0.32);\">\n<h2 style=\"margin:0 0 12px;font-size:28px;line-height:1.25;color:#ffffff;\">Need help with this?<\/h2>\n<p style=\"font-size:17px;margin:0 auto 22px;color:#EAF6FF;max-width:720px;line-height:1.7;\">Processing video at scale? Our Cloud VPS and dedicated servers give you root access and the CPU headroom FFmpeg needs.<\/p>\n<p><a href=\"https:\/\/underhost.com\/cloud-vps.php\" style=\"background:linear-gradient(90deg,#00D4FF,#0077FF);color:#ffffff;padding:13px 28px;border-radius:10px;text-decoration:none;font-weight:800;display:inline-block;margin:8px;\">See Cloud VPS plans<\/a><a href=\"https:\/\/customerpanel.ca\/client\/\" style=\"background:transparent;color:#ffffff;padding:12px 28px;border-radius:10px;text-decoration:none;font-weight:800;display:inline-block;margin:8px;border:1px solid rgba(255,255,255,0.32);\">Contact @CustomerPanel<\/a><\/div>\n<div class=\"uh-faq-section\" id=\"faq\" style=\"margin:34px 0;scroll-margin-top:90px;\">\n<h2 style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:0 0 18px;border-bottom:2px solid rgba(0,212,255,0.22);padding-bottom:10px;\">Frequently asked questions<\/h2>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Can I install FFmpeg on shared hosting?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">No. Installing FFmpeg needs root access, which shared hosting does not give. Use a VPS or a dedicated server.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Do I need ffmpeg-devel?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">Only if you compile software against the FFmpeg libraries. To run FFmpeg commands, the ffmpeg package is enough.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Why is FFmpeg not in the default AlmaLinux or Rocky Linux repositories?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">Some of the codecs FFmpeg includes are not shipped in the base repositories. RPM Fusion provides the full package, and it needs EPEL and the CRB (or PowerTools) repository.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">How much CPU does FFmpeg need?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">It depends on the resolution and the codec. Converting high-resolution video is CPU-heavy and can use every core, so size the server for your workload and limit threads if the server also runs a website.<\/p>\n<\/div>\n<\/div>\n<p><!-- uh-related-start --><\/p>\n<div style=\"background:#F4F8FC;border:1px solid #DCE7F3;border-radius:14px;padding:18px 22px;margin:32px 0 8px;\">\n<h2 style=\"margin:0 0 12px;font-size:22px;\">Related guides<\/h2>\n<ul style=\"margin:0;padding-left:20px;\">\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/how-to-install-cloudpanel-on-ubuntu-and-debian-servers\/\">How to Install CloudPanel on Ubuntu and Debian Servers<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/how-to-install-rkhunter-on-linux-rootkit-hunter\/\">How to Install RKHunter on Linux (RootKit Hunter) in RHEL, CentOS and Fedora<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/debian-13-trixie-upgrade-guide-maximize-performance-on-underhost\/\">Debian 13 &#8220;Trixie&#8221; Upgrade Guide: Maximize Performance on UnderHost\u2019<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/almalinux-9-with-cpanel-mysql-8-to-mariadb-10-11-guide\/\">AlmaLinux 9 with cPanel: MySQL 8 to MariaDB 10.11 Guide<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/install-varnish-centos-7\/\">How to Install Varnish on CentOS 7<\/a><\/li>\n<\/ul>\n<\/div>\n<p><!-- uh-related-end --><br \/>\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Can I install FFmpeg on shared hosting?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. Installing FFmpeg needs root access, which shared hosting does not give. Use a VPS or a dedicated server.\"}}, {\"@type\": \"Question\", \"name\": \"Do I need ffmpeg-devel?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Only if you compile software against the FFmpeg libraries. To run FFmpeg commands, the ffmpeg package is enough.\"}}, {\"@type\": \"Question\", \"name\": \"Why is FFmpeg not in the default AlmaLinux or Rocky Linux repositories?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Some of the codecs FFmpeg includes are not shipped in the base repositories. RPM Fusion provides the full package, and it needs EPEL and the CRB (or PowerTools) repository.\"}}, {\"@type\": \"Question\", \"name\": \"How much CPU does FFmpeg need?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"It depends on the resolution and the codec. Converting high-resolution video is CPU-heavy and can use every core, so size the server for your workload and limit threads if the server also runs a website.\"}}]}<\/script><\/p>\n<h2 id=\"sources\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-book\" style=\"color:#00D4FF;\"><\/i> Sources<\/h2>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/ffmpeg.org\/download.html\">FFmpeg: download and packages<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/rpmfusion.org\/Configuration\">RPM Fusion: configuration<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/ffmpeg.org\/documentation.html\">FFmpeg documentation<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to install FFmpeg on AlmaLinux, Debian, CentOS, and Ubuntu with this updated step-by-step guide. Whether you&#8217;re using the latest AlmaLinux, traditional CentOS, or popular Debian\/Ubuntu systems, this tutorial ensures a smooth installation process for video and audio manipulation.<\/p>\n","protected":false},"author":1,"featured_media":4337,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[81,25],"tags":[111,112,120,113,115,114],"class_list":["post-266","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hosting-guides","category-linux","tag-tag-almalinux","tag-tag-centos","tag-tag-cloud-vps","tag-tag-debian","tag-tag-linux-server","tag-tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/comments?post=266"}],"version-history":[{"count":12,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/266\/revisions"}],"predecessor-version":[{"id":6925,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/266\/revisions\/6925"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media\/4337"}],"wp:attachment":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media?parent=266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/categories?post=266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/tags?post=266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}