0

As I read silenceremove will reencode file.

Usually I do it manually creating file like:

file 'file.mp3'
inpoint 0
outpoint 01:55:00.0

file 'file.mp3' inpoint 02:03:50.0

and executing this command:

ffmpeg -f concat -safe 0 -i list.txt -c copy file.mp3

Maybe I can use silencedetect for creating the same file?

Giacomo1968
  • 58,727
Vitaly Zdanevich
  • 211
  • 1
  • 4
  • 19

1 Answers1

0

This is answered in the Stack Overflow post using FFMPEG with silencedetect to remove audio silence.

The first remark is that silencedetect only detects the silence, not remove it. You should use instead the silenceremove filter.

To detect whether your version of ffmpeg has this filter run:

ffmpeg -hide_banner -filters | grep silenceremove

The output should look like:

silenceremove A->A Remove silence

The command to remove silent parts may look like:

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

Where the silenceremove parameter is explained as removing:

  • at the beginning (indicated by the first argument 1)
  • with minimum length zero (indicated by the second argument 0)
  • silence is classified as anything under -50 decibels (indicated by -50dB)

Reference: FFMPEG silence remove filter.

For finding the right value for silence, normalize first the input audio volume to 0dB, described in this answer.

harrymc
  • 498,455