MP3::Tag 0.9708 review

Download
by rbytes.net on

License: Perl Artistic License
File size: 175K
Developer: Thomas Geffert and Ilya Zakharevich
0 stars award from rbytes.net

MP3::Tag is a Perl module for reading tags of MP3 audio files.

SYNOPSIS

use MP3::Tag;

$mp3 = MP3::Tag->new($filename);

# get some information about the file in the easiest way
($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->autoinfo();
$comment = $mp3->comment();

# or have a closer look on the tags

# scan file for existing tags
$mp3->get_tags;

if (exists $mp3->{ID3v1}) {
# read some information from the tag
$id3v1 = $mp3->{ID3v1}; # $id3v1 is only a shortcut for $mp3->{ID3v1}
print $id3v1->title;

# change the tag contents
$id3v1->all("Song","Artist","Album",2001,"Comment",10,"Top 40");
$id3v1->write_tag;
}

if (exists $mp3->{ID3v2}) {
# read some information from the tag
($name, $info) = $mp3->{ID3v2}->get_frame("TIT2");
# delete the tag completely from the file
$mp3->{ID3v2}->remove_tag;
} else {
# create a new tag
$mp3->new_tag("ID3v2");
$mp3->{ID3v2}->add_frame("TALB", "Album title");
$mp3->{ID3v2}->write_tag;
}

$mp3->close();

Requirements:
Perl

MP3::Tag 0.9708 search tags