Edward J. Allen III
and 1 contributors

NAME

Music::Tag::MP3 - Plugin module for Music::Tag to get information from id3 tags

SYNOPSIS

        use Music::Tag

        my $info = Music::Tag->new($filename, { quiet => 1 }, "MP3");
        $info->get_tag();
   
        print "Artist is ", $info->artist;

DESCRIPTION

Music::Tag::MP3 is used to read id3 tag information. It uses MP3::Tag to read id3v2 and id3 tags from mp3 files. As such, it's limitations are the same as MP3::Tag. It does not write id3v2.4 tags, causing it to have some trouble with unicode.

REQUIRED DATA VALUES

No values are required (except filename, which is usually provided on object creation).

SET DATA VALUES

mp3 file info added:
   Currently this includes bitrate, duration, frequency, stereo, bytes, codec, frames, vbr, 
auto tag info added:

title, artist, album, track, comment, year, genre, track, totaltracks, disc, totaldiscs, composer, and performer

id3v2 tag info added:

label, releasedate, lyrics (using USLT), encoder (using TFLT), and picture (using apic).

The following information is gathered from the ID3v2 tag using custom tags
TXXX[ASIN] asin =item TXXX[Sortname] sortname =item TXXX[MusicBrainz Album Artist Sortname] albumartist_sortname =item TXXX[MusicBrainz Album Artist] albumartist =item TXXX[ALBUMARTISTSORT] albumartist =item TXXX[MusicBrainz Album Release Country] countrycode =item TXXX[MusicBrainz Artist Id] mb_artistid =item TXXX[MusicBrainz Album Id] mb_albumid =item TXXX[MusicBrainz Album Status] album_type =item TXXX[MusicBrainz Artist Type] artist_type =item TXXX[MusicIP PUID] mip_puid =item TXXX[Artist Begins] artist_start =item TXXX[Artist Ends] artist_end =item TXXX[EAN/UPC] ean =item TXXX[MusicMagic Data] mip_puid =item TXXX[MusicMagic Fingerprint] mip_fingerprint
Some data in the LAME header is obtained from MP3::Info (requires MP3::Info 1.2.3)

pregap postgap

METHODS

default_options()

Returns the default options for the plugin.

set_tag()

Save object back to ID3v2.3 and ID3v1 tag.

get_tag()

Load information from ID3v2 and ID3v1 tags.

set_values()

A list of values that can be set by this module.

saved_values()

A list of values that can be saved by this module.

strip_tag()

Remove the tag from the file.

close()

Close the file and destroy the MP3::Tag object.

mp3()

Returns the MP3::Tag object

calculate_gapless()

Calculate gapless playback information. Requires patched version of MP3::Info and Math::Int64 to work.

OPTIONS

apic_cover

Set to false to disable writing picture to tag. True by default.

ignore_apic

Ignore embedded picture.

BUGS

ID3v2.4 is not read reliably and can't be written. Apic cover is unreliable in older versions of MP3::Tag.

Please use github for bug tracking: http://github.com/riemann42/Music-Tag-MP3/issues.

SEE ALSO

MP3::Tag, MP3::Info, Music::Tag

SOURCE

Source is available at github: http://github.com/riemann42/Music-Tag-MP3.

AUTHOR

Edward Allen III <ealleniii _at_ cpan _dot_ org>

COPYRIGHT

Copyright © 2007,2008,2010 Edward Allen III. Some rights reserved.

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either:

a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or

b) the "Artistic License" which comes with Perl.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details.

You should have received a copy of the Artistic License with this Kit, in the file named "Artistic". If not, I'll be glad to provide one.

You should also have received a copy of the GNU General Public License along with this program in the file named "Copying". If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA or visit their web page on the Internet at http://www.gnu.org/copyleft/gpl.html.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 640:

Non-ASCII character seen before =encoding in '©'. Assuming UTF-8