Tuesday, March 06, 2007

downsample for mp3s

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.

Labels:

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home