Evyn has asked for the wisdom of the Perl Monks concerning the following question:
When I look at the mp3 file in mp3tag ( http://www.mp3tag.de/ ), I can change the GENRE without a problem. Mp3tag tells me the tags are: IDv2.3 (ID3v1 ID3v2.3). When I run the code below to see if I can see what tags actually appear in the mp3, I cannot find the actual genre tag value that appears in mp3tag. That is, if I change GENRE to Audiobook in mp3tag, the word Audiobook does not appear in the output of this code below.use strict; use warnings; use MP3::Info; use Time::Piece; my $date = localtime->strftime('%Y/%m/%d'); my $file = 'file.mp3'; my $tag->{ALBUM} = $date; # Change album to today;s date set_mp3tag($file, $tag); $tag->{GENRE} = "Audiobook"; # Change genre to Audiobook set_mp3tag($file, $tag); my $info = get_mp3info($file); printf "$file length is %d:%d\n", $info->{MM}, $info->{SS};
Thanks for your time.use MP3::Tag; use warnings; use strict; use Data::Dumper; open FILE, ">mp3.txt" or die $!; my $file = 'file.mp3'; my $mp3 = MP3::Tag->new($file); $mp3->get_tags(); print FILE Dumper($mp3);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use MP3::Info to change .mp3 genre
by RichardK (Parson) on Jan 31, 2015 at 14:11 UTC | |
by Evyn (Novice) on Jan 31, 2015 at 14:32 UTC | |
by RichardK (Parson) on Jan 31, 2015 at 15:21 UTC | |
by Evyn (Novice) on Jan 31, 2015 at 16:01 UTC | |
|
Re: use MP3::Info to change .mp3 genre
by poj (Abbot) on Jan 31, 2015 at 15:54 UTC | |
by Evyn (Novice) on Jan 31, 2015 at 16:07 UTC |