LinuxCommandLibrary

id3v2

Edit ID3 metadata tags in MP3 files

TLDR

List all genres

$ id3v2 [[-L|--list-genres]]
copy

List all tags of specific files
$ id3v2 [[-l|--list]] [path/to/file1 path/to/file2 ...]
copy

Delete all id3v2 or id3v1 tags of specific files
$ id3v2 [--delete-v2|--delete-v1] [path/to/file1 path/to/file2 ...]
copy

Display help
$ id3v2 [[-h|--help]]
copy

Display version
$ id3v2 [[-v|--version]]
copy

SYNOPSIS

id3v2 [options] file.mp3 [file.mp3 …]

PARAMETERS

-v[0-2], --verbose[=0-2]
    Set verbosity (0=minimal, 1=default, 2=detailed)

-q, --quiet
    Suppress non-error output

-V, --version
    Display version info

-h, --help
    Show usage summary

-l, --list
    Display ID3 tag contents

-L, --list-v1
    Display ID3v1 tag contents

-d, --delete-tag
    Remove ID3v2 tag

-D, --delete-v1
    Remove ID3v1 tag

-2, --id3v2.3-iso
    Write ID3v2.3 ISO-8859-1 (default)

-3, --id3v2.3-utf16
    Write ID3v2.3 UTF-16

-4, --id3v2.4-utf8
    Write ID3v2.4 UTF-8

-s, --swap
    Swap endianness in 16-bit words

-r, --remove-unicode
    Remove unsync; convert unicode to ASCII

-a[enc] TEXT, --artist[=enc] TEXT
    Set artist TEXT

-t[enc] TEXT, --title[=enc] TEXT
    Set title/song TEXT

-A[enc] TEXT, --album[=enc] TEXT
    Set album TEXT

-T[enc] NUM, --track[=enc] NUM
    Set track number NUM

-g[enc] NUM|ID, --genre[=enc] NUM|ID
    Set genre by number or ID

-y[enc] YEAR, --year[=enc] YEAR
    Set release year

-c[enc] TEXT, --comment[=enc] TEXT
    Set comment TEXT

-u[enc] URL, --url[=enc] URL
    Set user-defined URL

DESCRIPTION

id3v2 is a command-line utility for managing ID3v2 and ID3v1 metadata tags in MP3 audio files.

It enables users to view, edit, or remove tags containing information like song title, artist, album, track number, genre, year, and comments. The tool supports batch processing of multiple files and handles various character encodings (ISO-8859-1, UTF-8, UTF-16) to accommodate international text. Options allow conversion between ID3 versions, byte order swapping for endianness correction, and removal of unsynchronisation or unicode data.

Common use cases include scripting tag updates for large music libraries, cleaning malformed tags, or standardizing formats. When writing tags, it defaults to ID3v2.3 ISO-8859-1 unless specified otherwise. Verbose output helps debug issues, making it suitable for both interactive and automated workflows.

While lightweight and fast, it focuses primarily on standard text frames and may not support advanced features like embedded images in all versions.

CAVEATS

Limited to MP3 files with ID3 tags; no embedded image support in basic version. Encoding mismatches may corrupt text. Genre IDs are numeric (0-255) or predefined strings. Test on copies for batch ops.

ENCODING SPEC

enc: (empty)=ISO-8859-1, utf8, utf16, utf16be.
Prefix to TEXT arg, e.g., -a utf8 'Artist'

GENRE HANDLING

Use numbers 0-147 (Blues=0, Rock=17) or strings like Rock, Pop. List via external genre refs.

HISTORY

Developed by Rob Leslie starting 1998; supports ID3v2.3/2.4. Packaged in Linux distros since early 2000s; minor updates for encoding/compatibility.

SEE ALSO

mid3v2(1), eyeD3(1), mp3info(1), kid3(1)

Copied to clipboard