SYNOPSIS

  $mp3 = MP3::Tag->new($filename);
  $mp3->get_tags();
  $id3v2 = $mp3->{ID3v2} if exists $mp3->{id3v2};

  ($info, $long) = $id3v2->get_frame($id);    # or

  ($info, $long) = $id3v2->get_frame($id, 'raw');

DESCRIPTION

This document describes how to use the results of the get_frame function of MP3::Tag::ID3v2, thus the data format of frames retrieved with MP3::Tag::ID3v2::get_frame().

It contains also a list of all supported ID3v2-Frames.

\fIget_frame()\fP

($info, $long) = $id3v2->get_frame($id); # or

($info, $long) = $id3v2->get_frame($id, 'raw');

$id has to be a name of a frame like \*(L"\s-1APIC\s0\*(R". For more variants of calling see get_frame().

The names of all frames found in a tag can be retrieved with the get_frame_ids() function.

Using the returned data

In the ID3v2.3 specifications 73 frames are defined, which can contain very different information. That means that get_frame returns the information of different frames also in different ways.

Simple Frames

A lot of the tags contain only a text string and encoding information. If you call ($info, $long) = $id3v2->get_frame($id) for such a frame, $info will contain the text string and $long will contain the english name of the frame. Example:

  get_frame(\*(L"\s-1TIT2\s0\*(R");     # returns

("Birdhouse In Your Soul", "Title/songname/content description")

Complex Frames

For more complex frames the returned $info is a reference to a hash, where each entry of the hash decribes a part of the information found in the frame. The key of a hash entry contains the name of this part, the according value contains the information itself. Example:

  get_frame(\*(L"\s-1APIC\s0\*(R");     # returns

( { "Description" => "Flood", "MIME Type" => "/image/jpeg", "Picture Type" => "Cover (front)", "_Data" => "..data of jpeg picture (binary).." }, "Attached Picture");

Other Frames

Some frames are not supported at the moment, ie the data found in the frame is not returned in a descriptive way. But you can read the data of this frames (and also of all other frames too) in raw mode. Then the complete data field of the frame is returned, without any modifications. This means that the returned data will be almost binary data. Example:

  get_frame(\*(L"\s-1TIT2\s0\*(R", 'raw');    # returns

("\x00Birdhouse In Your Soul", "Title/songname/content description")

The frames which (in addition to \*(C`Text\*(C'/\*(C`URL\*(C') contain only \*(C`Description\*(C' and \*(C`Language\*(C' fields are in some intermediate position between \*(L"simple\*(R" and \*(L"complex\*(R" frames. They can be handled very similarly to \*(L"simple\*(R" frames by using \*(L"long names\*(R", such as \*(C`COMM[description]\*(C' or \*(C`COMM(LANG)[description]\*(C', and the corresponding \*(L"quick\*(R" \s-1API\s0 such as frame_select().

List of Simple Frames

Following Frames are supported and return a single string (text). In the List you can find the frame IDs and the long names of the frames as returned by $id3v2->get_frame():

\s-1IPLS\s0 : Involved people list
\s-1MCDI\s0 : Music \s-1CD\s0 identifier
\s-1PCNT\s0 : Play counter
\s-1TALB\s0 : Album/Movie/Show title
\s-1TBPM\s0 : \s-1BPM\s0 (beats per minute)
\s-1TCOM\s0 : Composer
\s-1TCON\s0 : Content type
\s-1TCOP\s0 : Copyright message
\s-1TDAT\s0 : Date
\s-1TDLY\s0 : Playlist delay
\s-1TDRC\s0 : Recording time
\s-1TENC\s0 : Encoded by
\s-1TEXT\s0 : Lyricist/Text writer
\s-1TFLT\s0 : File type
\s-1TIME\s0 : Time
\s-1TIPL\s0 : Involved people list
\s-1TIT1\s0 : Content group description
\s-1TIT2\s0 : Title/songname/content description
\s-1TIT3\s0 : Subtitle/Description refinement
\s-1TKEY\s0 : Initial key
\s-1TLAN\s0 : Language(s)
\s-1TLEN\s0 : Length
\s-1TMCL\s0 : Musician credits list
\s-1TMED\s0 : Media type
\s-1TOAL\s0 : Original album/movie/show title
\s-1TOFN\s0 : Original filename
\s-1TOLY\s0 : Original lyricist(s)/text writer(s)
\s-1TOPE\s0 : Original artist(s)/performer(s)
\s-1TORY\s0 : Original release year
\s-1TOWN\s0 : File owner/licensee
\s-1TPE1\s0 : Lead performer(s)/Soloist(s)
\s-1TPE2\s0 : Band/orchestra/accompaniment
\s-1TPE3\s0 : Conductor/performer refinement
\s-1TPE4\s0 : Interpreted, remixed, or otherwise modified by
\s-1TPOS\s0 : Part of a set
\s-1TPUB\s0 : Publisher
\s-1TRCK\s0 : Track number/Position in set
\s-1TRDA\s0 : Recording dates
\s-1TRSN\s0 : Internet radio station name
\s-1TRSO\s0 : Internet radio station owner
\s-1TSIZ\s0 : Size
\s-1TSRC\s0 : \s-1ISRC\s0 (international standard recording code)
\s-1TSSE\s0 : Software/Hardware and settings used for encoding
\s-1TYER\s0 : Year
\s-1WCOM\s0 : Commercial information
\s-1WCOP\s0 : Copyright/Legal information
\s-1WOAF\s0 : Official audio file webpage
\s-1WOAR\s0 : Official artist/performer webpage
\s-1WOAS\s0 : Official audio source webpage
\s-1WORS\s0 : Official internet radio station homepage
\s-1WPAY\s0 : Payment
\s-1WPUB\s0 : Publishers official webpage

List of Complex Frames

Following frames are supported and return a reference to a hash. The list shows which keys can be found in the returned hash:

\s-1AENC\s0 : Audio encryption

Keys: URL, Preview start, Preview length, _Data

\s-1APIC\s0 : Attached picture

Keys: MIME type, Picture Type, Description, _Data

\s-1COMM\s0 : Comments

Keys: Language, Description, Text

\s-1COMR\s0 : Commercial frame

Keys: Price, Valid until, URL, Received as, Name of Seller, Description, MIME type, _Logo

\s-1ENCR\s0 : Encryption method registration

Keys: Owner ID, Method symbol, _Data

\s-1GEOB\s0 : General encapsulated object

Keys: MIME type, Filename, Description, _Data

\s-1GRID\s0 : Group identification registration

Keys: Owner, Symbol, _Data

\s-1LINK\s0 : Linked information

Keys: ID, URL, Text

\s-1OWNE\s0 : Ownership frame

Keys: Price payed, Date of purchase, Text

\s-1POPM\s0 : Popularimeter

Keys: URL, Rating, Counter

\s-1PRIV\s0 : Private frame

Keys: Text, _Data

\s-1RBUF\s0 : Recommended buffer size

Keys: Buffer size, Embedded info flag, Offset to next tag

\s-1RVRB\s0 : Reverb

Keys: Reverb left (ms), Reverb right (ms), Reverb bounces (left), Reverb bounces (right), Reverb feedback (left to left), Reverb feedback (left to right), Reverb feedback (right to right), Reverb feedback (right to left), Premix left to right, Premix right to left

\s-1SYTC\s0 : Synchronized tempo codes

Keys: Time Stamp Format, _Data

\s-1TXXX\s0 : User defined text information frame

Keys: Description, Text

\s-1UFID\s0 : Unique file identifier

Keys: Text, _Data

\s-1USER\s0 : Terms of use

Keys: Language, Text

\s-1USLT\s0 : Unsychronized lyric/text transcription

Keys: Language, Description, Text

\s-1WXXX\s0 : User defined \s-1URL\s0 link frame

Keys: Description, URL

List of Other Frames

Following frames are only supported in raw mode:

\s-1CRM\s0 : Encrypted meta frame
\s-1EQUA\s0 : Equalization
\s-1ETCO\s0 : Event timing codes
\s-1LNK\s0 : Linked information
\s-1MLLT\s0 : \s-1MPEG\s0 location lookup table
\s-1PIC\s0 : Attached picture
\s-1POSS\s0 : Position synchronisation frame
\s-1RVAD\s0 : Relative volume adjustment
\s-1SYLT\s0 : Synchronized lyric/text

RELATED TO MP3::Tag::ID3v2_Data…

MP3::Tag, MP3::Tag::ID3v2