LinuxCommandLibrary

id3v2

Edit ID3 metadata tags in MP3 files

TLDR

List all genres

$ id3v2 --list-genres
copy

List all tags of specific files
$ id3v2 --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 --help
copy

Display version
$ id3v2 --version
copy

SYNOPSIS

id3v2 [options] file(s)

PARAMETERS

-l
    List the ID3v2 tag information.

-t
    Set the title tag.

-a
    Set the artist tag.

-A
    Set the album tag.

-y
    Set the year tag.

-c
    Set the comment tag. Can be followed by a language code (e.g., '-c ENG Comment').

-g
    Set the genre tag. Can be specified as a name or a number.

-T
    Set the track number tag. Can also include a total number of tracks (e.g., '-T 5/12').

--artist
    Synonym for -a.

--album
    Synonym for -A.

--year
    Synonym for -y.

--comment
    Synonym for -c.

--track
    Synonym for -T.

--title
    Synonym for -t.

-p
    Attach a picture from . Requires --APIC parameter for the type of picture to be set.

--APIC
    Set the picture type when attaching a picture.

-r
    Remove the ID3v2 tag.

-v
    Set the ID3v2 version to write. Can be 3 or 4. Defaults to 3.

-m
    Maintain timestamp of file (do not touch it).

-D
    Delete all other ID3 tags in this file (ID3v1, APE, etc.)

-h
    Show help message.

-q
    Quiet mode (suppress output).

DESCRIPTION

id3v2 is a command-line tool for manipulating ID3v2 tags in MP3, FLAC, and other audio files. It allows you to add, edit, and delete metadata such as title, artist, album, year, track number, genre, and comments. The tool can read from and write to both ID3v2.3.0 and ID3v2.4.0 tag versions.

id3v2 provides flexibility in specifying tags through command-line arguments, environment variables, or standard input. It supports various text encodings and can handle multiple frames, pictures, and other complex tag structures. The command is useful for batch processing of audio files and integrating tag editing into scripts and automated workflows. It's a popular choice for power users and system administrators who need a robust and scriptable ID3 tag manipulation tool, avoiding the limitations or GUI requirements of other tag editors. id3v2 focuses solely on tag editing, offering a no-frills, efficient experience.

CAVEATS

id3v2 modifies the files in-place. It's recommended to back up your audio files before using it.
Incorrect usage can lead to corrupted files or loss of data.

CHARACTER ENCODING

id3v2 attempts to automatically detect the character encoding of input. You may need to set the LANG environment variable to ensure correct character encoding handling.

PICTURE HANDLING

Picture attachment requires careful handling. The --APIC option is crucial for specifying the picture type (e.g., 'Cover (front)'). Without a correct picture type, many media players may not display the picture.

HISTORY

The id3v2 tool was developed to provide a command-line interface for editing ID3v2 tags. It gained popularity due to its scripting capabilities and ability to handle large batches of audio files. It's been actively maintained to support different ID3v2 versions and text encodings.

SEE ALSO

eyeD3(1)

Copied to clipboard