On Sun, Dec 12, 2010 at 05:48:36PM +0000, Keith Roberts wrote:
I'm on Centos 5.5, and would like to use sox to strip out any periods of silence > 5 seconds from a batch mp3 audio files.
ffmpeg can do this. Assuming it's the first 5 seconds (as an example), syntax would be
ffmpeg -i longerfile.mp3 -ss 5 -t 300 newfile.mp3
on a 300 second mp3. In other words, the -ss is the start time and the -t is the duration of time you want to keep. So, that will give you all but the first 5 seconds of the file.
You would have to know the duration of each file.
You might also want to use the -sameq argument as well, which will keep the new file at the same quality as the old one.
ffmpeg -i longerfile.mp3 -ss 5 -t 300 -sameq newfile.mp3