NAME
Tag - Module for reading tags of MP3 audio files
SYNOPSIS
use Tag;
$mp3 = MP3::Tag->new($filename);
$mp3->getTags;
if (exists $mp3->{ID3v1}) {
$id3v1 = $mp3->{ID3v1};
print $id3v1->song;
...
}
if (exists $mp3->{ID3v2}) {
($name, $info) = $mp3->{ID3v2}->getFrame("TIT2");
...
}
$mp3->close();
AUTHOR
Thomas Geffert, thg@users.sourceforge.net
DESCRIPTION
Tag is a wrapper module to read different tags of mp3 files. It provides an easy way to access the functions of seperate moduls which do the handling of reading/writing the tags itself.
At the moment MP3::Tag::ID3v1 and MP3::Tag::ID3v2 are supported.
!! As this is only a beta version, it is very likely that the design !! of this wrapper module will change soon !!
- new()
-
$mp3 = MP3::Tag->new($filename);
Creates a mp3-object, which can be used to retrieve/set different tags.
- getTags()
-
@tags = $mp3->getTags;
Checks which tags can be found in the mp3-object. It returns a list @tags which contains strings identifying the found tags.
Each found tag can be accessed then with $mp3->{tagname} .
Use the information found in MP3::Tag::ID3v1 and MP3::Tag::ID3v2 to see what you can do with the tags.
- newTag()
-
$mp3->newTag($tagname);
Creates a new tag of the given type $tagname. You can access it then with $mp3->{$tagname}. At the moment ID3v1 and ID3v2 is supported as tagname.
- genres()
-
$allgenres = $mp3->genres; $genreName = $mp3->genres($genreID); $genreID = $mp3->genres($genreName);
Returns a list of all genres (reference to an array), or the according name or id to a given id or name.
This function is only a shortcut to MP3::Tag::ID3v1->genres.
- close()
-
$mp3->close;
Closes the mp3 file. This is also done automatically, when the object is destroyed (eg at the end of the program).
SEE ALSO
MP3::Tag::ID3v1, MP3::Tag::ID3v2
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 240:
You forgot a '=back' before '=head1'