Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install and Use FFmpeg on Ubuntu 20.04 - DesignLinux

designlinux 0 Comments

FFmpeg is a free and open-source collection of tools for handling multimedia files. It contains a set of shared audio and video libraries such as libavcodec, libavformat, and libavutil. With FFmpeg, you can convert between various video and audio formats, set sample rates, capture streaming audio/video, and resize videos.

This article describes how to install FFmpeg on Ubuntu 20.04.

Installing FFmpeg on Ubuntu #

The official Ubuntu repositories contain FFmpeg packages that can be installed with the apt package manager. This is the easiest way to install FFmpeg on Ubuntu. A new major version is released every six months, and the version included in the repositories usually lags behind the latest version of FFmpeg.

At the time of writing this article, the current version of FFmpeg available in the Ubuntu 20.04 repositories is 4.2.x. To install it, enter the following command as root or user with sudo privileges :

sudo apt updatesudo apt install ffmpeg

To verify the installation, use the ffmpeg -version command, which prints the FFmpeg version:

ffmpeg -version

The output should look something like this:

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 available FFmpeg’s encoders and decoders type:

ffmpeg -encodersffmpeg -decoders

That’s it. FFmpeg is now installed on your system, and you can start using it.

When a new version is released, you can update the FFmpeg package through the command-line or your desktop Software Update tool.

FFmpeg Examples #

In this section, we will look at some basic examples on how to use the ffmpeg utility.

Basic conversion #

When converting audio and video files with ffmpeg, you do not have to specify the input and output formats. The input 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 input.mp4 output.webm
  • Convert an audio file from mp3 to ogg:

    ffmpeg -i input.mp3 output.ogg

Specifying codecs #

When converting files, use the -c option to specify the codecs. It can be a name of any supported decoder/encoder or a special value copy that simply copies the input stream.

  • Convert a video file from mp4 to webm using the libvpx video codec and libvorbis audio codec:

    ffmpeg -i input.mp4 -c:v libvpx -c:a libvorbis output.webm
  • Convert an audio file from mp3 to ogg encoded with the libopus codec.

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

Conclusion #

We have shown you how to install FFmpeg on Ubuntu 20.04. You can now visit the official FFmpeg Documentation page and learn how to use FFmpeg to convert and your video and audio files.

If you hit a problem or have feedback, leave a comment below.

ffmpeg ubuntu

Related

Tags: ffmpeg, ubuntu

How to Fix ERROR 1130 (HY000): Host is not allowed to connect to this MySQL server

Prev Post

How to Install Memcached on Debian 10

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 0
  • 829
  • 615,201

DesignLinux.com © All rights reserved

Go to mobile version