How to Install and Use FFmpeg on CentOS 8
FFmpeg is a free and open-source assortment of instruments for dealing with multimedia information. It accommodates a set of shared audio and video libraries akin to libavcodec, libavformat, and libavutil. With FFmpeg, you possibly can convert between varied video and audio codecs, set pattern charges, seize streaming audio/video, and resize movies.
This text describes set up FFmpeg on CentOS 8.
Putting in FFmpeg on CentOS 8 #
FFmpeg isn’t out there within the default CentOS Eight repositories. You possibly can select to build the FFmpeg tools from the source or to put in it utilizing
dnf from the Negativo17 repository. We’ll go along with the second choice.
Full the next steps to put in FFmpeg on CentOS 8:
- The Negativo17 repository is determined by the EPEL and PowerTools repositories. Run the next instructions as root or user with sudo privileges to allow the required repositories:
sudo dnf install epel-releasesudo yum config-manager --set-enabled PowerToolssudo yum-config-manager --add-repo=https://negativo17.org/repos/epel-multimedia.repo
- As soon as the repositories are enabled, set up FFmpeg:
sudo dnf install ffmpeg
- Confirm the FFmpeg set up by checking its model:
ffmpeg -versionOn the time of writing this text, the present model of FFmpeg out there within the Negativo17 repository is
ffmpeg model 4.2.2 Copyright (c) 2000-2019 the FFmpeg builders constructed with gcc 8 (GCC) ...The command may even present the FFmpeg configuration choices.
That’s it. FFmpeg has been put in in your CentOS machine, and you can begin utilizing it.
Utilizing FFmpeg #
On this part, we are going to take a look at some fundamental examples on use the
Fundamental conversion #
When changing audio and video information with
ffmpeg you shouldn’t have to specify the enter and output codecs. The enter file format is auto detected and the output format is guessed from the file extension.
- Convert a video file from mp4 to webm:
ffmpeg -i enter.mp4 output.webm
- Convert an audio file from mp3 to ogg:
ffmpeg -i enter.mp3 output.ogg
Utilizing codecs #
When changing information, use the
-c choice to specify the codecs. It may be a reputation of any supported decoder/encoder or a particular worth
copy that merely copies the enter stream.
- Convert a video file from mp4 to webm utilizing the
libvpxvideo codec and
ffmpeg -i enter.mp4 -c:v libvpx -c:a libvorbis output.webm
- Convert an audio file from mp3 to ogg encoded with the
ffmpeg -i enter.mp3 -c:a libopus output.ogg
We’ve proven you set up FFmpeg on CentOS 8. You must now go to the official FFmpeg Documentation web page and discover ways to use FFmpeg to transform and your video and audio information.
In the event you hit an issue or have suggestions, depart a remark beneath.