1.

Solve : Batch trim audio files at regular/sequential intervals?

Answer»

(hope I didn't post this twice - I think I was logged off on my first try)

I'm trying to efficiently create sequential two minute clips from a library of wav files.  This sounds like a batch file to me but I haven't been able to solve the problem on my own.

Details: I have about 200 wav files spread over MULTIPLE directories and subdirectories. Each file is 10 to 20 minutes long.  I want to take each file and make several two minute wav files from them.  For example, if I had a 10 minute file named x, I want the output to be 1x, 2x, 3x, 4x, 5x where file 1x is  a clip of the first two minutes of x, 2x is a clip starting at minute 2 and ending at 4 and so on.  Ideally these would end up in a folder with the name of the parent file.  I can easily do this with a single file using the Regular Interval Labels tool in Audacity but I don't know of a way to use this tool to process multiple files at once.

Does anyone have suggestions for me?  I'm not experienced with for loops, but I thought maybe the combination of a for loop and an audio utility in Cygwin might do the job.  However, I’m not familiar with a utility that can do this.

This is my first post here and I hope I'm not repeating a question that's been asked PREVIOUSLY.  I haven't found anything similar in my searches but just let me know if I should be looking at a past thread.  Also, let me know if you need more information from me.

Am I'm using:
XP
MS DOS 5.1.2600
Cygwin 1.7.7
Audacity 1.3.12 Bata
GoldWave 5.58

Thanks for any help you can offer!Out of curiosity, why do you want to break up these audio files?  The answer might help some one else to offer a solution. Quote from: rthompson80819 on October 18, 2010, 04:26:34 PM

Out of curiosity, why do you want to break up these audio files?  The answer might help some one else to offer a solution.

Hi rthompson,

Thanks for the suggestion.  The RECORDINGS are of bird choruses and the two minute segments will be used to test volunteer bird counter's ability to identify BIRDS by song.  Maybe the best thing to do process each file on its own but I thought if there was a better way I should learn it.

Thanks. Code: [Select]MS DOS 5.1.2600
There is no such animal; I BELIEVE you mean Windows XP command line which is not MS-DOS.

If you can get the files into mp3 format, which is a trivial undertaking, you can use a tool called mp3splt which (among other things) can split an mp3 file into equal sized parts

Quote
mp3splt -t 10.00 album.mp3 [Split album.mp3 in many equal-sized parts of 10 minutes each.]

mp3splt album.mp3 10.12 14.25 -o out.mp3 [Split album.mp3 starting at 10min 12sec, ending at 14mins 25sec and save the mp3 slice in a new file called out.mp3]

http://labnol.blogspot.com/2006/10/mp3-cutters-split-mp3-files-into.html



Great, thanks Salmon Trout!  mp3splt looks like just what I need.  And you are correct of course, I'm using the XP command prompt v. 5.1.2600.  Not sure way I wrote MS DOS... I do know better


Discussion

No Comment Found