1

i'm using the latest release of strawberry perl with the latest mp3::tag module.

i would like update many mp3 files to add a rating attribute. i'm using winamp and winamp stores the rating attribute by default in the media library.

but in winamp is an option, that the ratings can be automatically stored in the mp3 file. i have tested: The attribute name is called "RATING WINAMP" - its a extended tag, but how can i update the tag or add it to a mp3 file (if the attribute doesnt exist).

Thanks :-)

update: 2017/09/04: i had found out, that the rating was stored in the POPM Frame. but when i edit the frame with this code, the rating will not stored correctly.

use MP3::Tag; 
use Data::Dumper;

$filename = 'x:\test.mp3';
$mp3 = MP3::Tag->new($filename) or die "\nFehler: MP3::Tag $filename!\n\n";
if ( exists $mp3->{ID3v2} ) {
   $id3v2 = $mp3->{ID3v2};
} else {
   $id3v2 = $mp3->new_tag("ID3v2");
}
$id3v2->frame_select_by_descr('POPM',"rating@winamp.com",1,1);
$id3v2->write_tag();
$mp3->close();

Screenshot: https://i.stack.imgur.com/umeZ5.jpg

sb9x
  • 19
  • 2

0 Answers0