2

I have a bunch of audio files (more than 4000) that I want to trim the leading and trailing silence from, that's where ffmpeg comes in.

For instance in the image bellow, the command I'm using is

$ ffmpeg -i input.mp3 -af silenceremove=1:0:-63.563dB:1:0:-63.563dB output.mp3

enter image description here

From the command, -63.563dB is just the level high enough that doesn't remove the second burst of sound (marked with red). If I put -63.564dB, for instance, that part is removed. I found that number by trial and error, because ffmpeg's help command wasn't very helpful in that sense.

So, my question is how does that number (-63.563dB) relate to the markers on the vertical ruler on Adobe Audition? And what else can I put in so that it only remove leading and trailing silences, and very short burst of sound (no more that 0.01 ms)

1 Answer 1

1

I've never used ffmpeg like this, but I had a quick squint at the filter docs, specifically the silenceremover and straight away I noticed the detection system defaults to RMS. Maybe this is where the confusion about the dB value has come from. Try switching it to peak. It should work more the way you want, but I'm not sure if that would be better or not for you.

2
  • I'll try the peak parameter then. I'll also tried silenceremove=1:0.02:-50dB:1:0.02:-50dB, if I understood correctly that would give me enough room to remove bursts of that have a higher amplitude but that have a short duration (no more than 20 ms). It din't work that way either, the second burst of sound (which is about 150 ms long) was stripped away.
    – rraallvv
    Oct 16, 2017 at 14:10
  • Yes, that seems like it should work(with peak), as RMS is an average measurement, it would have also been affecting the duration detection too. Let me know how it goes.
    – n00dles
    Oct 17, 2017 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.