Subject: | Missing vbr & id3_version |
Date: | Mon, 28 Dec 2009 22:26:35 -0500 |
To: | bug-Audio-Scan [...] rt.cpan.org |
From: | Michael Morrison <mjmorrison [...] gmail.com> |
Hi Andy,
I am sending you this email on the suggestion of Dan Sully who recommended Audio::Scan over MP3::Info.
First, let me say I am no great hand at Perl so it is very possible that Audio::Scan is working as expected but I am failing to use it properly. Having said that, I am not getting either VBR or id3_version info in the output of my test script using Audio::Scan.
Here is my test script:
#!/opt/local/bin/perl -wls
use Audio::Scan;
use File::Find;
my @dirs = @ARGV;
# look for files in each directory
find(\&displayMP3Info, @dirs);
sub displayMP3Info {
# if the file has an MP3 extension
if (/\.mp3$/)
{
# Just file info
my $data = Audio::Scan->scan($_);
# Just file info
my $info = Audio::Scan->scan_info($_);
# Just tags
my $tags = Audio::Scan->scan_tags($_);
for my $k1 ( sort keys %$info ) {
print "$k1\n";
for my $k2 ( sort keys %{$info->{ $k1 }} ) {
print "\t$k2\n";
for my $k3 ( sort keys %{$info->{ $k1 }->{ $k2 }} ) {
print "\t\t$k3 => $info->{ $k1 }->{ $k2 }->{ $k3 }\n";
}
}
}
}
}
The output is:
The input is a directory with one mp3 file in it (I can send that file if you would like).
sh-3.2# ./test.pl /Users/michael/Downloads/Applications/CASEY_CRIME_PHOTOGRAPHER/TEST/
info
audio_offset
audio_size
bitrate
file_size
layer
padding
samplerate
samples_per_frame
song_length_ms
stereo
As you see... no vbr or id3_version
Am I missing something?
Thanks for your work for the Perl community!
Yours,
Michael Morrison