How to Install FFMPEG On Centos (Yum)

Installing ffmpeg is really easy with the YUM package manager, so don’t fret!

Shell in, or open up your terminal, and execute the following command:

yum install ffmpeg ffmpeg-devel

If you see an error stating package not found, then you probably need to add a repository. We can do that with vi in the same terminal window:

vi /etc/yum.repos.d/dag.repo

Once vi is open, press i to go into INSERT mode, and paste the following text in:

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

Press ESC to exit out of INSERT mode and then hold SHIFT and press Z Z to save. (Or, of course, :wq to write and quit.) You can now add the GPG key for the repository:

rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Once that is complete, run the yum install command again. After installation is complete, you can run this command to test if FFMPEG is installed and working correctly:

ffmpeg -i Input.file Output.file

Leave a Reply