06 March 2007
This post may be outdated due to it was written on 2007. The links may be broken. The code may be not working anymore. Leave comments if needed.
mm, we use lame to resample/downsample mp3 under linux. (like convert 256 kbps to 128 kbps )
first use MP3::Info to get $bitrate = $info->{BITRATE}.
then use $s = "lame -b 128 $orig_file $tmp_file && mv -f $tmp_file $orig_file && chmod 0777 $orig_file"; for $bitrate > 128
then system($s);

pretty simple but useful.

blog comments powered by Disqus