How To Check My Current Version of FFMPEG

I have FFMPEG installed on 2 different servers. On one of the servers, i run into an issue every time i try to convert m4v files where ffmpeg just processes the file indefinitely. When I take the same source file and try to run it on the other server it seems to work just fine. Both servers are running the same version of GNU/Linux. Some one suggested i check to see if the same version of ffmpeg is installed on the servers, so my question to you all is, "how do i check my ffmpeg version?"

Thanks!


Solution 1:

Call it with the right command line flag:

ffmpeg -version

For a full list of the underlying libraries, just call ffmpeg without any option:

ffmpeg

Solution 2:

Run ffmpeg -version and inspect the output:

ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
               ^^^^^

Git versions

Sometimes you will get something like this rather than an actual release version:

ffmpeg version git-2020-08-31-4a11a6f Copyright (c) 2000-2020 the FFmpeg developers
                              ^^^^^^^

In which case it was a development build. To find the release version after which it was taken, take the 7 characters at the end of the version tag (i.e. 4a11a6f) and insert them into this URL:

https://git.ffmpeg.org/gitweb/ffmpeg.git/blob_plain/4a11a6f:/RELEASE

The response is "4.3.git", meaning this build was from the 4.3 release branch.


Older versions may have a different format:

ffmpeg version N-55702-g920046a Copyright (c) 2000-2013 the FFmpeg developers
                        ^^^^^^^

Here the commit id is 920046a, which gives a release branch of 2.0.

Package queries

If your current ffmpeg was installed via a package manager, you can also look there:

$ dpkg -s ffmpeg | grep Version
Version: 7:3.4.8-0ubuntu0.2
           ^^^^^
$ apt list --installed ffmpeg
Listing... Done
ffmpeg/bionic-updates,bionic-security,now 7:3.4.8-0ubuntu0.2 amd64 [installed]
                                            ^^^^^
$ rpm -q ffmpeg
ffmpeg-4.3.1-4.el8.x86_64
       ^^^^^
$ yum list -q installed ffmpeg
Installed Packages
ffmpeg.x86_64                  1:4.3.1-4.el8                  @epel-multimedia
                                 ^^^^^