YouTube Icon

Code Playground.

How to Install and Use FFmpeg on Ubuntu 20.04

CFG

How to Install and Use FFmpeg on Ubuntu 20.04

FFmpeg is a free and open-source assortment of devices for taking care of sight and sound documents. It contains a lot of shared sound and video libraries, for example, libavcodec, libavformat, and libavutil. With FFmpeg, you can change over between different video and sound arrangements, set example rates, catch web based sound/video, and resize recordings. 

This article portrays how to introduce FFmpeg on Ubuntu 20.04. 

Installing FFmpeg on Ubuntu

The authority Ubuntu storehouses contain FFmpeg bundles that can be introduced with the well-suited bundle administrator. This is the simplest method to introduce FFmpeg on Ubuntu. Another significant rendition is delivered at regular intervals, and the variant remembered for the stores for the most part lingers behind the most recent adaptation of FFmpeg. 

At the hour of composing this article, the current rendition of FFmpeg accessible in the Ubuntu 20.04 vaults is 4.2.x. To introduce it, enter the accompanying order as root or client with sudo benefits : 

sudo apt update
sudo apt install ffmpeg

To confirm the establishment, utilize the ffmpeg - form order, which prints the FFmpeg rendition: 

ffmpeg -version
Output

ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)

To print all accessible FFmpeg's encoders and decoders type: 

ffmpeg -encoders
ffmpeg -decoders

That is it. FFmpeg is presently introduced on your framework, and you can begin utilizing it. 

At the point when another variant is delivered, you can refresh the FFmpeg bundle through the order line or your work area Software Update apparatus. 

FFmpeg Examples

In this part, we will take a gander at some essential models on the best way to utilize the ffmpeg utility. 

Basic conversion

While changing over sound and video records with ffmpeg, you don't need to indicate the information and yield designs. The info document design is auto-identified, and the yield design is speculated from the record expansion. 

Convert a video record from mp4 to webm: 

ffmpeg -i input.mp4 output.webm

Convert a sound record from mp3 to ogg: 

ffmpeg -i input.mp3 output.ogg

Specifying codecs

When changing over records, utilize the - c alternative to indicate the codecs. It tends to be a name of any upheld decoder/encoder or an uncommon worth duplicate that essentially duplicates the information stream. 

Convert a video record from mp4 to webm utilizing the libvpx video codec and libvorbis sound codec: 

ffmpeg -i input.mp4 -c:v libvpx -c:a libvorbis output.webm

Convert a sound record from mp3 to ogg encoded with the libopus codec. 

ffmpeg -i input.mp3 -c:a libopus output.ogg

Conclusion

We have told you the best way to introduce FFmpeg on Ubuntu 20.04. You would now be able to visit the authority FFmpeg Documentation page and figure out how to utilize FFmpeg to change over and your video and sound records. 

On the off chance that you hit an issue or have criticism, leave a remark beneath. 




CFG