mp3 bitrate

Mike Cantrell yomahz@devnull.org
Sat, 26 Aug 2000 21:45:48 -0700


If you're a perl guy, you can use the MP3 module...

http://www.cpan.org/modules/by-module/MP3/

[taken from readme]
    get_mp3info (FILE)
        Returns hash reference containing file information for MP3 file.
        This data cannot be changed. Returned data includes MP3 version
        (VERSION), total time in minutes (MM) and seconds (SS), boolean
        for STEREO, MPEG layer (LAYER), BITRATE, MODE, boolean for
        COPYRIGHT, and FREQUENCY.


I've never used the module but I'd assume you could do something like:


#!/usr/local/bin
use MP3::Info;

$mp3dir = '/usr/share/mp3s';

@files = glob($mp3dir);
foreach $file (@files) {
  $info = get_mp3info($file);
  print $file, ", " $info->{BITRATE}, "\n";
}


Regards,
Mike Cantrell	


Lucas Vogel wrote:
> 
> Does anyone know of a CLI command that will return the bitrate of an mp3? I
> want to create a list of all of my mp3's with their bitrates appended at the
> end of the names.
> 
> Thanks
> 
> -------------------------------------------
> Lucas Vogel, Software Developer
> Exponent Failure Analysis Associates, Inc.
> lvogel@exponent.com
> (623)587-6739
> 
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
> 
> Plug-discuss mailing list  -  Plug-discuss@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss