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:

WWW::Zorpia::Upload

I just create an easy module for Zorpia.com -- WWW::Zorpia::Upload. it's based on WWW::Mechanize.
now writing code seems pretty easy. :)

Labels: