1

I managed to install FFMPEG on Centos via WHM following this guide.

But when I run ffmpeg -version I get:

2.8.15

...whereas the official site says the latest version is 4.0.2.

How can I update my installation or install afresh with the latest version?

(Context: I'm trying to work out why a WEBM-to-MP4 conversion via FFMPEG results in a 0-bytes file and thought updating FFMPEG might help.)

Mitya
  • 231
  • 2
  • 5
  • 13
  • 1
    The Nux Desktop repository used in the guide must not have the latest version of FFMPEG. You can request an update on [their forums](https://forums.nux.ro/). [via](https://li.nux.ro/repos.html) – Worthwelle Nov 02 '18 at 18:08
  • 1
    Share full log of the ffmpeg cmd – Gyan Nov 02 '18 at 18:16
  • 1
    Note also, the maintainer of the Nux Desktop repository [suggests](https://forums.nux.ro/index.php?t=msg&th=521&goto=3824&S=b5e9c06b7b182d3f443f3bc21e2f9f4b#msg_3824) installing from [binaries built from git source](https://johnvansickle.com/ffmpeg/). – Worthwelle Nov 02 '18 at 18:17
  • Thanks for the replies. However installing stuff on a server is not something I know anything about. Is it possible to "install from binaries" from within CPanel WHM? I don't have access to the physical server, just WHM. – Mitya Nov 03 '18 at 11:51

1 Answers1

1

Forget the Nux Dextop repo. It currently only provides the FFmpeg 2.8 release branch and older (I simply viewed the package directory).

  1. Uninstall the old ffmpeg:

    sudo yum remove ffmpeg
    
  2. Remove that repository (optional but recommended). I'll leave that up to you.

  3. Download the new ffmpeg. No need for a repo as the pre-compiled binary is sufficient.

    curl -OL https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz
    
  4. Extract it:

    tar xvf ffmpeg-git-64bit-static.tar.xz
    
  5. Copy or move the ffmpeg file to a location in your PATH so it is executable to all users (the date in this example is just a placeholder as it changes depending on when it was compiled):

    sudo cp ffmpeg-git-20181103-64bit-static/ffmpeg /usr/local/bin
    
  6. Verify that you are running a recent version by running the ffmpeg command. The first line should look something like:

    ffmpeg version N-92330-gd6d407d2d7 Copyright (c) 2000-2018 the FFmpeg developers
    

    ...where the d6d407d2d7 (minus the often confusing and annoying g prefix) is the partial hash of the particular commit that this ffmpeg was derived from in the master branch.

See What is a static build and how do I install it? for more details.

llogan
  • 57,139
  • 15
  • 118
  • 145
  • Thank you. I got as far as step 5, which errors. "cannot stat ‘ffmpeg-git-20181103-64bit-static/ffmpeg’: No such file or directory". Everything had gone great up to that point. – Mitya Nov 03 '18 at 18:49
  • Ah, that seems to be because the resultant tar unzipping produced `20181101`, not `20181103` as in your command – Mitya Nov 03 '18 at 18:51
  • Great - all installed. Though it seems harder to infer version number than with the old one; if I run `ffmpeg -version` I get `ffmpeg version N-47330-g4a976200d7-static` - how do you interpret version from that? :) – Mitya Nov 03 '18 at 18:53
  • @Utkanos The date in my command was just an example as the date changes per build. As for the version, because you are using a build from the git master branch, you will have to go with the commit hash number and view it via `git log` or git-web ([example for 4a976200d7](https://git.videolan.org/?p=ffmpeg.git;a=commit;h=4a976200d7)). Releases are always way behind current development: they are intended for distributors or those who need to stay within a specific major version for API compatibility. – llogan Nov 03 '18 at 22:56