how to install latest ffmpeg on Centos
You were looking in the wrong place for documentation. Always check the official sources first. For ffmpeg, the packages provided by distributions are always more or less outdated.
Basically, you have two options:
Install a static build, which is already compiled and ready for use. Go to the download page and select the "Linux Static Builds", not the source code. Extract the build and simply run the
ffmpeg
binary. You can also copy it to/usr/local/bin
or another directory in your$PATH
to have it accessible system-wide.Compile FFmpeg yourself according to the always up-to-date instructions on the FFmpeg wiki. It should be enough to copy-paste all the instructions there. There are also guides for Ubuntu and related distros.
Method 2 gives you more options on the encoders that you can use. The static builds however usually contain everything you absolutely need.
Related videos on Youtube
Chito Cheng
Updated on September 18, 2022Comments
-
Chito Cheng over 1 year
I want to install the latest ffmpeg 2.8.5 on the Centos server. Followed this website http://www.mysql-apache-php.com/ffmpeg-install.htm and completed the installation. But the installed ffmpeg is an old 0.6.5 version. And I tried
yum update ffmpeg
, but it said there's no update available.And now I have download the latest version on ffmpeg official website, and extracted the tar.gz file. But there's no configure.sh. and I totally have no idea what I should do now.
-
Apache over 8 yearsGeneric steps. 1) You have to install the dev libarires. See: stackoverflow.com/questions/13227162/… || possiblelossofprecision.net/?p=949 . 2)
./configure --prefix=/usr
3)make
4)make install
(run this as root) ||| You should run command 2, 3, 4 in the folder of the extracted source. And even like this, it is not 100% sure that it will compile. CentOS ships with really old libraries and software. You should just use Ubuntu LTS, or the latest Ubuntu. -
Chito Cheng over 8 yearsi can't install the dev libraries. Centos said error: Unable to open ffmpeg.spec: No such file or directory
-
-
Steffen Roller almost 7 yearsI just tried to compile the package myself on CentOS and ran into numerous issues. Eg. it needs nasm 2.13 or bigger. My CentOS has only 2.10 installed and it's not obvious how to get a new version installed other than compile those as well. I'm heading towards the binaries builds now.
-
slhck almost 7 years@SteffenRoller Indeed CentOS only packages 2.10 at the moment. But I would be surprised if it failed… could you please ask a new question about those compilation problems? As far as I can see, only LAME requires nasm, and then only when building from source. You may be able to install
libmp3lame-devel
and skip building LAME yourself. -
slhck almost 7 years@SteffenRoller I just checked again, on a fresh CentOS install, the guide works without problems and LAME can be compiled with nasm 2.10.07.
-
Steffen Roller almost 7 yearsI'll check as soon as I'll have access to my computer again. My problem was that make just stopped with "can't find nasm" and also hinted it would need v1.13 or higher. I downloaded the precompiled packages in the end. I also wanted to install libx264, linx265 and vp9. Perhaps the problem was there?
-
Steffen Roller almost 7 years@slhck I followed exactly the CompilationGuide/CentOS[trac.ffmpeg.org/wiki/CompilationGuide/Centos] - it didn't work out for me. Here's the output: pastebin.com/qjwpdvc9
-
Steffen Roller almost 7 yearsand here pastebin.com/9Td5tA1a
-
slhck almost 7 years@Steffen Please ask a new question about this, thanks!
-
Steffen Roller almost 7 years@slhck here you go superuser.com/questions/1214396/…