Display media file information on Linux using MediaInfo

MediaInfo Free open source program used to display media file information on Linux, BSD, Mac OS, and Microsoft Windows. It can also be used on mobile platforms such as Android and iOS. Displays complete technical information and tag information for audio and video files. Integrates easily with other programs. Mediainfo has both a command line interface (CLI) and a graphical user interface (GUI) so you can get media file details from a desktop or server system.

List of information provided by MediaInfo

Mediainfor provides an extensive list of technical and tag information for media files, as listed below.


  • Media file name
  • Format Mkv, Mpeg
  • file size
  • period
  • bit rate
  • Encoded date
  • Create application mkvmerge
  • More.


  • Video format
  • Format Information Advanced Video Codec
  • Format setting CABAC / 8 Ref frame
  • Codec ID
  • width
  • height
  • Show aspect ratio
  • frame rate
  • Color space
  • And many.


  • Audio format
  • channel
  • Codec ID
  • frame rate
  • Compression mode
  • Sample rate
  • And a little more.


  • Format E, g. UTF-8
  • Codec ID
  • Subtitle language
  • And a little more.


  • Total number of chapters
  • Chapter list

Supported formats

Mediainfo supports the following media formats:

  • video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1, MPEG-2, MPEG-4, DVD (VOB), etc.
  • Video codec: DivX, XviD, MSMPEG4, ASP, H.264, AVC, etc.
  • audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF, etc.
  • subtitles: SRT, SSA, ASS, SAMI.

Details of the project’s official website at the end of this guide.

Install MediaInfo on Linux

Mediainfo is packaged with most popular Linux operating systems and is available in the default repository.

On Arch Linux, Make sure you have enabled [Community] Repository and install Mediainfo using Pacman as follows

$ sudo pacman -S mediainfo mediainfo-gui

For Debian:

$ sudo apt-get install mediainfo mediainfo-gui

On CentOS, RHEL,To enable [EPEL] Repository:

$ sudo yum install epel-release

Next, install Mediainfo using the command.

$ sudo yum install mediainfo mediainfo-gui

For Fedora:

$ sudo dnf install mediainfo mediainfo-gui

For openSUSE:

$ sudo zypper install mediainfo mediainfo-gui

On Ubuntu,To enable [Universe] Repository:

$ sudo add-apt-repository universe

Next, install Mediainfo.

$ sudo apt install mediainfo mediainfo-gui

Display media file information on Linux using MediaInfo

Here are some common uses for Mediainfo:

$ mediainfo 

View video file information using Mediainfo

For example, to find information about Matroska files, run:

$ mediainfo King kong.mkv

Sample output:

Unique ID                                : 235919701764564560562801819231992137181 (0xB17C7B57E53C1E03A43059E6AC7FC5DD)
Complete name                            : King kong.mkv
Format                                   : Matroska
Format version                           : Version 1
File size                                : 851 MiB
Duration                                 : 3 h 12 min
Overall bit rate                         : 618 kb/s
Movie name                               : King Kong
Encoded date                             : UTC 2011-01-11 11:25:57
Writing application                      : mkvmerge v2.2.0 ('Turn It On Again') built on Mar  4 2008 13:20:25
Writing library                          : libebml v0.7.7 + libmatroska v0.8.1

ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings                          : CABAC / 8 Ref Frames
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 8 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 3 h 12 min
Width                                    : 1 280 pixels
Height                                   : 544 pixels
Display aspect ratio                     : 2.35:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Title                                    : King Kong
Language                                 : English
Default                                  : Yes
Forced                                   : No

ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : HE-AAC / LC
Format settings                          : Explicit
Codec ID                                 : A_AAC-2
Duration                                 : 3 h 12 min
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 kHz / 24.0 kHz
Frame rate                               : 23.438 FPS (1024 SPF)
Compression mode                         : Lossy
Title                                    : King Kong
Default                                  : Yes
Forced                                   : No

ID                                       : 3
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Title                                    : King Kong
Language                                 : English
Default                                  : Yes
Forced                                   : No

View audio file information using Mediainfo

As shown below, Mediainfo can list the technical details of audio files such as .mp3.

$ mediainfo My heart will go on.mp3

Sample output:

Complete name                            : My heart will go on.mp3
Format                                   : MPEG Audio
File size                                : 3.07 MiB
Duration                                 : 3 min 38 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 118 kb/s
Track name                               : 2432768786941406
Writing library                          : LAME3.100
major_brand                              : isom
minor_version                            : 512
compatible_brands                        : isomiso2mp41

Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Format settings                          : Joint stereo / MS Stereo
Duration                                 : 3 min 38 s
Bit rate mode                            : Variable
Bit rate                                 : 118 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 kHz
Frame rate                               : 38.281 FPS (1152 SPF)
Compression mode                         : Lossy
Stream size                              : 3.07 MiB (100%)
Writing library                          : LAME3.100

To view complete information, including all internal tags, use -f National flag.

$ mediainfo -f King kong.mkv

View specific details of a media file

You can also use various parameters to list specific information about the media file, such as audio / video format, frame rate, bit rate, and so on.

To view the aspect ratio of a particular media file:

$ mediainfo King kong.mkv --Inform="Video;%DisplayAspectRatio%" 

To view the audio format of a media file:

$ mediainfo King kong.mkv --Inform="Audio;%Format%"

Display format settings:

$ mediainfo King kong.mkv --Inform="Video;%Format_Settings%"
CABAC / 8 Ref Frames

Display frame rate:

$ mediainfo King kong.mkv --Inform="Video;%FrameRate%"

Playback time (period) of media files in HH: MM: SS: FF format:

$ mediainfo King kong.mkv --Inform="Video;%Duration/String4%"

To find a list of all parameters available in a media file:

$ mediainfo --info-Parameters King kong.mkv

To get help, do the following:

$ mediainfo -h

Recommended reading:

  • How to display image metadata on Linux
  • More than 20 FFmpeg commands for beginners

Display Media File Information Using MediaInfo GUI

If you are unfamiliar with the command line method, you can use the Mediainfo graphical user interface to view information about your media files.

Launch Mediainfo GUI from dash or menu.

click File-> Open-> Open File Choose an option from the menu bar and select a media file from your local drive.

You can also display information about multiple files or all files in a directory. Select to view information about all files in the directory File-> Open-> Open Directory option.

You can change the default view to another layout, such as text, HTML, or XML. Click to change to see Select a view layout from the menu bar.