I also recommend ffmpeg, but there is an unintended side effect on the command line suggested by John Boker: it transcodes the file to the default bitrate (which is 64 kb / s in the version I have here, at least). This can give your customers a false impression of the quality of your sound files, and it also takes longer.
Here is the command line that will cut to 30 seconds without recoding:
ffmpeg -t 30 -i inputfile.mp3 -acodec copy outputfile.mp3
The -acodec switch tells ffmpeg to use a special “copyable” codec that does not re-encode. It is lightning fast.
NOTE: the team has been updated based on a comment from Oben Sonne
Tim Farley Sep 04 '08 at 15:42 2008-09-04 15:42
source share