If you want to use FFmpeg on RPM-based Linux, you can install pre-built FFmpeg package by using yum package manager after enabling additional third-party repositories. However, the version of FFmpeg included in such repositories is typically outdated. If you want to try FFmpeg's bleeding edge features, you probably want to build FFmpeg yourself from its source.
Here is how to compile FFmpeg on CentOS, Fedora or RHEL.
Go ahead and install all the packages required to build FFmpeg as follows. Note that depending on which libraries you want to enable, you may need to install additional packages.
Next, download FFmpeg code, and compile it as follows.
$ cd FFmpeg
$ ./configure --enable-nonfree --enable-gpl --enable-libx264 --enable-x11grab --enable-zlib
Finally, install FFmpeg on your system.
Verify the installation by running ffmpeg command without any option.
Troubleshooting during FFmpeg Installation
1. If you encounter the following error, install yasm package. Note that on CentOS, you first need to set up EPEL repository before.
yasm/nasm not found or too old
Use yum package manager to install the package as follows.
2. If you encounter the error below, install x264 development package. You need to enable RPM Fusion repository first.
ERROR: libx264 not found
Use yum command to install the necessary package as follows.
3. If you get the error below, install libXext development package with yum command.
ERROR: Xext not found
4. If you get the error below, install libXfixes development package with yum command.
ERROR: Xfixes not found
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.