Download from mediaarea.net
  1. Track Sheet Notes
  2. /
  3. Command line

MediaInfo command line: JSON output, full reports and templates

The MediaInfo command line program prints the same report as the app, which makes it the right tool for scripts, servers and batch checks. These are the options most people need.

Key facts

  • Program namemediainfo
  • Full report--Full or -f
  • Machine output--Output=JSON, XML, HTML, EBUCore, PBCore
  • Single fields--Inform template
  • List of fields--Info-Parameters
  • Checked
Download from mediaarea.net

Free and open source. Version 26.10 for Windows, macOS, Linux, Android and iOS.

Updated · 6 min read · By Track Sheet Notes

This is an independent manual, not the vendor's site. Every download button leads to the official pages on mediaarea.net. Versions and terms were read on mediaarea.net on 29 November 2026.

The MediaInfo command line tool is called mediainfo. Run mediainfo file.mp4 for the standard report, add --Full for every field, use --Output=JSON or --Output=XML for scripts, and use --Inform with a template such as "Video;%Width%x%Height%" to print only the values you need.

Install the CLI

The MediaInfo command line build is a separate download from the app on Windows and macOS: one file per architecture for Windows (Intel 32 bit, 64 bit and ARM 64 bit) and a dmg installer for macOS 10.10 to 26. On Linux, the official packages and most distribution repositories ship it as a package named mediainfo, with the GUI as a separate package.

Grab the version for your system from the download page. Distribution repositories often lag behind the official 26.10 release, which matters if you work with formats added recently, such as AV2 or APV.

Basic commands

  1. Standard reportmediainfo file.mp4 prints the General, Video, Audio and Text blocks, the same as the Text view in the app.
  2. Every fieldmediainfo --Full file.mp4 (short form -f) adds the internal fields that the standard report leaves out.
  3. JSON for scriptsmediainfo --Output=JSON file.mp4 returns a media object with a track array, each track marked by its @type, such as General or Video.
  4. XML and archive schemas--Output=XML gives the MediaInfo XML format; --Output=EBUCore and --Output=PBCore produce the broadcast and public media metadata schemas.
  5. Write to a fileAdd --LogFile=report.txt to save the output, or redirect it with > as in any shell.
  6. Check the versionmediainfo --Version prints the installed version, useful when a format is only supported by newer releases.

Pull single values with --Inform

A template prints only the fields you name. The format is the section, a semicolon, then text with field names between percent signs. For example, mediainfo --Inform="Video;%Width%x%Height% %FrameRate%" file.mp4 prints the resolution and frame rate on one line.

mediainfo --Info-Parameters lists every field name you can use, and the vendor's support page links to the full list of fields and how they map to other export formats. Templates are the quickest way to build a CSV of hundreds of files with a simple loop in the shell.

Common tasks

TaskCommand
Duration in millisecondsmediainfo --Inform="General;%Duration%" file.mkv
Video codec onlymediainfo --Inform="Video;%Format%" file.mov
Audio channels per trackmediainfo --Inform="Audio;%Channel(s)%\n" file.mp4
JSON for a whole foldermediainfo --Output=JSON folder/
Help for output optionsmediainfo --Help-Output

Tips for scripts

Field names in JSON are stable across releases, but values can gain detail when a new version learns more about a format, so pin the version on servers that feed a database. The library build gives the same data without starting a process for each file, which helps at large volumes.

If you need every packet or frame timestamp, the CLI is not the right tool; see the MediaInfo vs ffprobe page. For a point and click check of one file, the GUI guide is quicker. Old systems that cannot run 26.10 are listed on the requirements page.

Frequently asked questions

How do I get JSON output from MediaInfo?

Run mediainfo --Output=JSON followed by the file name. The output is one media object with a track array, and each track has an @type such as General, Video or Audio.

What does --Full do?

It prints the complete field list, including internal and duplicate fields that the standard report hides. Use it when a value you expect is missing from the normal output.

How do I install the CLI on Ubuntu?

Install the mediainfo package from the repository or from the official MediaArea packages listed on the download page. The official package is usually newer than the distribution's own.

Can I list the available field names?

Yes. mediainfo --Info-Parameters prints every field the program knows. The vendor also publishes the field list with its mapping to other export formats on its support page.

Does the CLI show ads?

No. The command line build only prints text to the terminal, so there is no place for the ads shown in the free Windows GUI.

Sources