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...]

PARAMETERS

-l, --list
    Lists all ID3 tags found in the specified MP3 file(s).

-L, --list-frames
    Lists all known ID3v2 frames supported by the utility.

-d, --delete-all
    Deletes all ID3v1 and ID3v2 tags from the specified MP3 file(s).

-s, --strip-v1
    Strips only ID3v1 tags from the specified MP3 file(s).

-D, --delete-frame=FRAMEID
    Deletes a specific ID3v2 frame (e.g., 'APIC' for picture) by its four-character ID.

-c, --comment=DESCRIPTION:TEXT:LANG
    Sets a comment frame, allowing a description, text, and optional language code.

-g, --genre=GENRE
    Sets the genre tag, using either a genre name or an ID.

-a, --artist=ARTIST
    Sets the artist tag for the MP3 file.

-A, --album=ALBUM
    Sets the album tag for the MP3 file.

-t, --title=TITLE
    Sets the song title tag for the MP3 file.

-y, --year=YEAR
    Sets the year tag for the MP3 file.

-T, --track=TRACK
    Sets the track number tag (e.g., '5/12').

-p, --picture=FILENAME:DESCRIPTION:TYPE:FORMAT
    Adds or replaces a picture frame (album art). TYPE can be a number or name.

-e, --encoding=ENCODING
    Sets the text encoding for new frames (e.g., latin1, utf16, utf8).

-C, --convert
    Converts existing ID3v2 tags to the ID3v2.4 format.

-R, --raw-tag
    Allows editing of raw tag frames by ID and content; for advanced use.

-u, --uniq-id=ID
    Sets a unique file identifier frame.

-x, --no-backup
    Prevents the creation of a backup file when modifying MP3s.

-V, --version
    Displays the version information for id3v2.

-h, --help
    Displays a help message and exits.

DESCRIPTION

The id3v2 command is a powerful command-line utility for managing ID3 tags within MP3 audio files. These tags are crucial for storing metadata such as the artist, song title, album, year of release, genre, and track number, making music collections organized and easily searchable.

While it can interact with both the older ID3v1 and the more advanced ID3v2 tag formats, its primary strength lies in manipulating ID3v2 tags. ID3v2 tags offer significant improvements over their predecessors, including support for various text encodings, embedded album art, and a flexible frame-based structure for storing diverse information. Users can employ id3v2 to display existing tag information, add new metadata fields, modify specific entries, or completely remove tags from MP3 files. It is widely used by command-line enthusiasts, script developers, and music archivists who need precise control over their MP3 metadata, ensuring compatibility and rich information display across various media players and devices.

CAVEATS

When modifying tags, id3v2 typically creates a backup of the original file (e.g., filename.mp3~) unless the --no-backup option is used. Users should be aware of potential encoding issues when dealing with non-ASCII characters or converting between different ID3v2 versions, as older media players might not fully support ID3v2.4 features. Always back up important files before making extensive modifications.

DEFAULT TAG VERSION

By default, id3v2 creates and modifies ID3v2.4 tags. While it can read older versions like ID3v2.3, users may need to convert tags explicitly if compatibility with very old media players is a concern, as some might not fully support the 2.4 standard.

TAG FRAMES

ID3v2 tags are composed of various 'frames', each holding specific pieces of metadata (e.g., TIT2 for title, TPE1 for artist, APIC for album art). id3v2 allows direct manipulation of these frames by their four-character IDs using options like -D or -R, offering fine-grained control over the tag structure.

HISTORY

The id3v2 command emerged as part of the id3lib project, designed to provide robust command-line manipulation of ID3v2 tags. Its development paralleled the evolution of the ID3v2 standard, which introduced features like improved character encoding, extensible frame types, and support for embedded album art, overcoming the limitations of the older ID3v1 format. It has been a staple for Linux users managing MP3 collections through the command line or scripts.

SEE ALSO

mp3info(1), eyed3(1), mid3v2(1)

Copied to clipboard