LinuxCommandLibrary

mp3info

Read information from MP3 audio files

TLDR

Show all ID3v1 tags of a specific MP3 file

$ mp3info [path/to/file.mp3]
copy

Edit ID3v1 tags interactively
$ mp3info -i [path/to/file.mp3]
copy

Set values for ID3v1 tags in a specific MP3 file
$ mp3info -a "[artist_name]" -t "[song_title]" -l "[album_title]" -y [year] -c "[comment_text]" [path/to/file.mp3]
copy

Set the number of the track in the album for a specific MP3 file
$ mp3info -n [track_number] [path/to/file.mp3]
copy

Print a list of valid genres and their numeric codes
$ mp3info -G
copy

Set the music genre for a specific MP3 file
$ mp3info -g [genre_number] [path/to/file.mp3]
copy

SYNOPSIS

mp3info [options] [files]

PARAMETERS

-x
    Extract entire ID3v1 and ID3v2 tag in raw format. Useful for transfer or debugging.

-X
    Extract only ID3v2 tag in raw format. Useful for transfer or debugging.

-g GENRE
    Set genre code. Use -l to list genre codes.

-l
    List all ID3v1 genre codes.

-m
    Modify/Set tags. Requires -t, -a, -p, -y, -c to all be set, or -G. Use this flag to set multiple id3v1 tags.

-r
    Remove ID3v1 tag. Useful if your player doesn't properly handle it.

-t TITLE
    Set title. Requires -m flag to be set to take effect.

-a ARTIST
    Set artist. Requires -m flag to be set to take effect.

-p ALBUM
    Set album. Requires -m flag to be set to take effect.

-y YEAR
    Set year. Requires -m flag to be set to take effect.

-c COMMENT
    Set comment. Requires -m flag to be set to take effect.

-n
    Do not display any information, only modify.
Return 0 exit code if success else return non zero.

-v[1|2]
    Select which ID3 tag to display/modify. If not specified, the program will try to work with both. v1: work with ID3v1 tags. v2: work with ID3v2 tags

-z
    Display/Remove ID3v2 tag padding

-d
    Remove ID3v2 tag

-o
    Output filename. Use with -x or -X flags.

-h
    Display usage information (help).

-V
    Display version information.

DESCRIPTION

The `mp3info` command is a command-line tool used to read and modify information embedded within MP3 audio files. It primarily focuses on ID3 tags (versions 1.0, 1.1, 2.2, 2.3, and 2.4), which store metadata such as the song title, artist, album, year, and comments. `mp3info` can display this information in a human-readable format, allowing users to quickly identify and verify the contents of their MP3 files.

Furthermore, `mp3info` provides the ability to edit these ID3 tags, enabling users to correct errors, add missing information, or customize the tags to their preferences. This can be useful for organizing music libraries, ensuring accurate playback information on devices, and enhancing the overall listening experience.

It supports batch processing, enabling users to apply changes to multiple MP3 files simultaneously. While its primary function is ID3 tag manipulation, it can also display other relevant technical data about the MP3 file itself, such as the bitrate and sample rate.

CAVEATS

ID3 tag modification might not be compatible with all MP3 players or software. Backing up your MP3 files before modifying tags is recommended.

EXAMPLES

Display ID3 information for a file:
mp3info song.mp3

Modify ID3v1 tags:
mp3info -m -t "My Song" -a "The Artist" -p "The Album" -y "2023" -c "A comment" -g 12 song.mp3

Remove ID3v1 tag from a file:
mp3info -r song.mp3

HISTORY

The `mp3info` command has been around for a long time and has been part of many Linux distributions for a number of years.
It has been improved over time to support new ID3 tag versions and provide more flexibility for managing MP3 file metadata.
Its original goal was to provide a simple command line utility to read the info in mp3 files to support different ID3 formats.

SEE ALSO

id3v2(1), eyeD3(1)

Copied to clipboard