1

Some earlier threads said that the silenceremove filter doesn't support trimming silence from the end? is this still the case?

My audio is lossless so I don't need to streamcopy or anything fancy like that.

Also how do I set it up to cut "silence" less than 96dB?

4

Here is a python script that does exactly that:

  • it reads all m4a files from a folder called input
  • removes silence from beginning and end
  • outputs the files to output

Source:

import os
temp1 = "temp1.m4a"
temp2 = "temp2.m4a"
temp3 = "temp3.m4a"
all_files = [x for x in os.listdir("input/")]
for file in all_files:
  if file.endswith(".m4a"):
    print os.popen("ffmpeg -i long/" + file + " -af silenceremove=1:0:-96dB " + temp1).read()
    print os.popen("ffmpeg -i " + temp1 + " -af areverse " + temp2).read()
    print os.popen("ffmpeg -i " + temp2 + " -af silenceremove=1:0:-96dB " + temp3).read()
    print os.popen("ffmpeg -i " + temp3 + " -af areverse output/" + file).read()
    os.remove(temp1)
    os.remove(temp2)
    os.remove(temp3)
| improve this answer | |
1

With version 4.1.3 still can't trim from end.

Workaround:

ffmpeg -i IN.WAV -af silenceremove=start_periods=1:start_silence=0.1:start_threshold=-96dB,areverse,silenceremove=start_periods=1:start_silence=0.1:start_threshold=-96dB,areverse OUT.WAV
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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