Introduction
FFmpeg is a popular open source tool that can encode and decode any video format, audio format, and other multimedia files to one other.
In this article, I will show you How to Install FFmpeg on Linux CentOS.
Okay now, I assume that you have login as the root user.
Let's begin the tutorial!
Step One: Update the System
First one before we install FFmpeg, we need to add EPEL repositories.
Now, input the following commands:
sudo yum -y install epel-release
Then update the system:
sudo yum -y update
Step Two: Install the Nux Dextop YUM repo
There are no official FFmpeg rpm packages for CentOS for now. Instead, you can use a 3rd-party YUM repo, Nux Dextop, to finish the job.
Input the following commands:
sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm
Step Three: Install FFmpeg and FFmpeg development packages
sudo yum -y install ffmpeg ffmpeg-devel
To verify the installed version, run this commands:
ffmpeg
Step Four: Testing FFmpeg
For example, I will convert an mp4 video file to mp3 audio file using this commands:
cd wget http://example.com/video.mp4 ffmpeg -i video.mp4 -acodec libmp3lame -ar 44100 -ac 2 -ab 320k output_to_audio.mp3
Explanation:
-i = Input file (video.mp4).
-acodec = Audio codec.
-ar = Set audio sampling rate in Hz.
-ac = Set number of audio channels.
-ab = Set audio bitrate.
If you want to learn more about FFmpeg, input the following command:
ffmpeg -h
or, you can visit FFmpeg Documentation page here!

No comments:
Post a Comment