AWEL Multimedia Packages for RHEL/CentOS 7

FFmpeg

Never forget January Seraph

AWEL FFmpeg Packages for RHEL/CentOS 7

Table of Contents

About FFmpeg

FFmpeg is an extremely powerful multimedia framework quite often used as the Swiss Army Knife of Multimedia tools. It does about everything and is frequently used to transcode multimedia from arbitrary formats into the desired format for playback.

This repository currently has RPM packages for FFmpeg 3.4.2 and also FFmpeg library packages for 2.8.14, for compatibility with applications that have not been ported to use the FFmpeg 3.x branch.

Installing FFmpeg

Make sure that you have installed the AWEL Media repo package as described on the Home Page. Make sure your system is up to date:

[root@host ~]# yum clean all && yum update      
      

To install FFmpeg 3.4.2 type the command:

[root@host ~]# yum install ffmpeg
      

If any applications you use need the libraries for FFmpeg 2.x they should automatically be installed by yum, but you can manually install them with the command:

[root@host ~]# yum install ffmpeg2-libs
      

Devel Package Conflict

While you can have the FFmpeg libraries for both version installed at the same time, you can not have the devel packages for both versions installed at the same time. The header files will want to occupy the same path on your file system and thus will conflict with each other.

AAC in FFmpeg

Traditionally there are four ways to encode AAC for use in a video file with FFmpeg:

  1. FFmpeg Built-in AAC encoder
  2. FFmpeg linked against the FAAC library
  3. FFmpeg linked against the FDK-AAC library
  4. External AAC coder to encode, then use FFmpeg acodec copy to copy the stream into the video

In version 2 of FFmpeg, the built-in AAC encoder is very poor quality. In FFmpeg 3 it is actually pretty decent, and will probably continue to increase in quality.

The FAAC library is okay but not great. Also FAAC is released under the LGPL but some of the code was directly lifted from sources that are not LGPL so the license status of the FAAC library is in question.

FDK-AAC is a very high quality AAC encoder, but the license is not compatible with the GPL so I can not distribute an FFmpeg binary linked against it.

The fourth option is what I use to recommend, using an external encoder like FDK-AAC or the Nero AAC encoder for Linux to do the actual AAC encoding, and then have FFmpeg just copy the AAC content into the video.

With FFmpeg 3 if I use 128 kbps for the AAC stream, the built-in AAC encoder is fine. The built-in AAC encoder does not support the HE-AAC profiles, so if you need to use something like 48 kbps, you really are better of either building FFmpeg against FDK-AAC or using an external encoder.

If you are using an application that links against the FFmpeg 2.x libraries to create an AAC stream, to get a quality AAC encoding you probably have to rebuild the FFmpeg 2 source RPM against FDK-AAC.

Rebuild FFmpeg with FDK-AAC support

If you need FFmpeg linked against FDK-AAC, the source RPMs for both FFmpeg 3 and FFmpeg 2 here support linking against FDK-AAC if you define a macro at build time.

For FFmpeg 3, download the source RPM here:
http://awel.domblogger.net/7/media/src/repoview/ffmpeg.html

To build it with FDK-AAC support:

[user@host ~]$ rpmbuild -D '_with_fdkaac 1' --rebuild ffmpeg-3.4.2-1.el7_5.awel.0.src.rpm
        

You will probably have to install a lot build dependencies. The missing build dependencies will be listed when you try the above command.

For the FFmpeg 2 libraries, download the source RPM here:
http://awel.domblogger.net/7/media/src/repoview/ffmpeg2-libs.html

[user@host ~]$ rpmbuild -D '_with_fdkaac 1' --rebuild ffmpeg2-libs-2.8.14-1.el7_5.awel.0.src.rpm
        

You will probably have to install a lot build dependencies. The missing build dependencies will be listed when you try the above command.

In both cases, if the package is linked against FDK-AAC there will be a fdk in the release tag indicating the RPMs are built against FDK-AAC.