I would like to create a program that makes mp3s of the first 30 seconds of an aiff or wav file. I would also like to be able to choose location and length, such as the audio between 2:12 and 2:42. Are there any tools that lets me do this?
Shelling out is OK. The application will run on a linux server, so it would have to be a tool that works on linux.
I don't mind doing it in two steps - i.e. a tool that first creates the cutout of the aiff/wav, then pass it to a mp3 encoder.
SoX
with the trim
predicate can do this. If your sox is not built with MP3 support then you'll have to pipe the output to lame
after, or find one that is.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With