Install mediainfo on Ubuntu 20.04

Install mediainfo on Ubuntu 20.04

The mediainfo is a command line tool to show information about video and audio files. Information is presented in grouped categories such as general, video, audio, text, chapters, and other.

This tutorial shows how to install mediainfo on Ubuntu 20.04.

Install mediainfo

Run the following command to download GPG key:

sudo wget -qO /etc/apt/trusted.gpg.d/mediaarea.asc

Add repository:

echo "deb $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/mediaarea.list

Update the package lists:

sudo apt update

Install mediainfo using command:

sudo apt install -y mediainfo

When installation is finished, we can check mediainfo version:

mediainfo --version

Testing mediainfo

Download sample media file:

wget -O test.mp4

Run the mediainfo command to retrieve information about media file:

mediainfo test.mp4

Example of a part of the output:

Complete name                            : test.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (mp42/avc1)
File size                                : 5.26 MiB
Duration                                 : 1 min 0 s
Overall bit rate                         : 734 kb/s
Encoded date                             : UTC 2010-02-09 01:55:39
Tagged date                              : UTC 2010-02-09 01:55:40

ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec

ID                                       : 1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity 

Uninstall mediainfo

If you decided to completely remove mediainfo and related dependencies, execute the following command:

sudo apt purge --autoremove -y mediainfo

Remove GPG key and repository:

sudo rm -rf /etc/apt/trusted.gpg.d/mediaarea.asc
sudo rm -rf /etc/apt/sources.list.d/mediaarea.list

Leave a Comment

Cancel reply

Your email address will not be published.