how to install latest ffmpeg on Centos

10,225

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:

  1. 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.

  2. 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.

Share:
10,225

Related videos on Youtube

Chito Cheng
Author by

Chito Cheng

Updated on September 18, 2022

Comments

  • Chito Cheng
    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
      Apache over 8 years
      Generic 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
      Chito Cheng over 8 years
      i can't install the dev libraries. Centos said error: Unable to open ffmpeg.spec: No such file or directory
  • Steffen Roller
    Steffen Roller almost 7 years
    I 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
    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
    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
    Steffen Roller almost 7 years
    I'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
    Steffen Roller almost 7 years
    @slhck I followed exactly the CompilationGuide/CentOS[trac.ffmpeg.org/wiki/CompilationGuid‌​e/Centos] - it didn't work out for me. Here's the output: pastebin.com/qjwpdvc9
  • Steffen Roller
    Steffen Roller almost 7 years
  • slhck
    slhck almost 7 years
    @Steffen Please ask a new question about this, thanks!
  • Steffen Roller
    Steffen Roller almost 7 years