Greetings,
Just trying to re-arrange ID3 information in a large set of MP3
files. Before I run the following Perl script, iTunes can read the ID3
tagging information. After writing ID3 information to the MP3, iTunes no
longer reads any tagging information from the MP3.
Does anyone have any information regarding this? There is some
cryptic information in the MP3::Tag POD regarding setting the
"id3v23_unsync" option but that doesn't seem to alter the impact on iTunes at
all.
Windows and other tag readers seem to be able to read the all ID3v1 and
ID3v2 tags just fine (including the altered fields) after running the
following script.
Thanks for any suggestions/guideance anyone can provide.
Description: the following program takes an MP3 filename as input.
Action: It appends the value in the Album field to front of the
TITLE Field. That's it! Easy!
#!/usr/bin/perl -w
use MP3::Tag;
MP3::Tag->config(id3v23_unsync=>FALSE);
my $filename = $ARGV[0];
$mp3 = MP3::Tag->new($filename);
@info=$mp3->autoinfo;
@albnum = split(/_/, $info[3]);
$frame = $mp3->{ID3v2}->get_frame("TIT2");
print $frame;
$mp3->{ID3v1}->title("$albnum[0] $info[0]");
$mp3->{ID3v2}->change_frame("TIT2","$albnum[0] $info[0]");
$mp3->{ID3v1}->write_tag();
$mp3->{ID3v2}->write_tag();
@info=$mp3->autoinfo;
print $info[0]; //print ID3v1 TITLE field
$frame = $mp3->{ID3v2}->get_frame("TIT2");
print $frame; //print ID3v2 Title2 field
$mp3->close();
Thanks!
GL
---------------------------------
Choose the right car based on your needs. Check out Yahoo! Autos new Car
Finder tool.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs