How to get and change audio metadata in Linux

Audio metadata contains information like artist, song title, track number, album name, etc. It can even contain an embedded image of the cover art for the album. This metadata is accessed by music players in order to display relevant information about the song that is playing. Without this metadata, a music player might have trouble sorting your music by artist, album, genre, or putting the tracks in proper order.

There are times when you may need to edit audio metadata. An example would be to correct the tags for songs that have been miscategorized into the wrong genre. Or you may be working on a custom compilation of tracks and want to sort them in a certain order, etc. In this tutorial, you will see how to get and change audio metadata on a Linux system.

In this tutorial you will learn:

  • How to get and change audio metadata from GUI
  • How to get and change audio metadata from command line
How to get and change image metadata in Linux
How to get and change image metadata in Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Any Linux distro
Software Picard, Mutagen
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to get and change audio metadata from GUI




The majority of graphical music players on Linux will allow you to view all of the metadata of an audio file. And, usually, you can edit the metadata in the same application. There are also dedicated GUI applications to edit audio metadata such as Picard or Quodlibet. In this section, we’ll see how to use Picard to get and edit the metadata of an audio file.

NOTE
See our guide on Best music players for Linux if you want to download a music player that can view and edit metadata for audio files.

How to install Picard

You can use the appropriate command below to install Picard with your system’s package manager.

To install Picard on Ubuntu, Debian, and Linux Mint:

$ sudo apt install picard

To install Picard on Fedora, CentOS, AlmaLinux, and Red Hat:

$ sudo dnf install picard

To install Picard on Arch Linux and Manjaro:

$ sudo pacman -S picard

Use Picard to get and change metadata

  1. Once you open Picard, you can load your files or folders of music into the application.



    Load audio files into Picard for metadata viewing and editing
    Load audio files into Picard for metadata viewing and editing

  2. You will see the relevant metadata in the bottom pane, after you select the song or songs you want to view or edit the metadata for. To change metadata, make your edits under the “New Value” column.
    Viewing metadata in Picard
    Viewing metadata in Picard
  3. Keep in mind you can also add a new field in addition to the existing ones. Just right click in a blank area in the bottom pane. Or, to remove a tag, right click the tag that you want to delete.
  4. You can also use the “Scan” button to query the MusicBrainz database for pertinent metadata suggestions. These will show up in the right pane. If you like the suggested changes, you can click the “Save” button to have them reflected in the metadata.
    Adding new metadata to a track in Picard
    Adding new metadata to a track in Picard

How to get and change audio metadata from command line

The recommended command line program to get and change audio metadata is Mutagen. To see how to use it, check out our tutorial on How to set, change and delete music tags with Mutagen.

Closing Thoughts




In this tutorial, we saw how to get and change audio metadata on a Linux system. Having properly tagged audio files will give you a much better listening experience, as your music will be correctly labelled by artist, album, genre, etc.



Comments and Discussions
Linux Forum