jth Wrote: 
> Actually the default behavior of mp3gain as I mentioned should
> do exactly what you want. It will calculate and add tages for
> both track and album gain. You can verify this by using a command
> like "strings mysong.mp3 | tail -20" to peek at the ape tags
> added to the end of the mp3 file.

Cool!  I've gone and done my whole 9000 song library using the
following script.  Thank you very much for your help!:


Code:
--------------------
    #!/usr/bin/perl
  #
  
  $FindCmd = "find /data/music/mp3/ -mindepth 1 -type d -print";
  
  $i = 0;
  open( FINDCMD, "$FindCmd |" ) or die "Can't execute $FindCmd: $!\n";
  while( <FINDCMD> )
  {
  chomp( $line  = $_ );
  
  # Take care of escaping special characters in file name
  $line =~ s/\(/\\\(/g;
  $line =~ s/\)/\\\)/g;
  $line =~ s/\!/\\\!/g;
  $line =~ s/\?/\\\?/g;
  $line =~ s/ /\\ /g;
  $line =~ s/\[/\\\[/g;
  $line =~ s/\]/\\\]/g;
  $line =~ s/'/\\'/g;
  $line =~ s/"/\\"/g;
  $line =~ s/\&/\\\&/g;
  print "DEBUG: $i: $line\n";
  
  
  $Mp3GainCmd = "mp3gain -k ${line}/*.mp3";
  open( MP3GAINCMD, "$Mp3GainCmd |" ) or die "Can't execute $Mp3GainCmd: $!\n";
  while( <MP3GAINCMD> )
  {
  print "$_";
  }
  close( MP3GAINCMD );
  
  print "\n\n";
  $i++;
  }
  close( FINDCMD );
--------------------


-- 
kyleki
------------------------------------------------------------------------
kyleki's Profile: http://forums.slimdevices.com/member.php?userid=2510
View this thread: http://forums.slimdevices.com/showthread.php?t=17193

_______________________________________________
Discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to