[FFmpeg-user] How to delete digital silence?

Paul B Mahol onemda at gmail.com
Wed Sep 17 09:38:49 CEST 2014


On 9/16/14, Bart Gopnik <bart.gopnik at gmail.com> wrote:
> I've created test file in sound editor (https://goo.gl/IJY9t6): 1
> second (44 100 samples) of silence + 1 second (44 100 samples) of
> simple sine 1kHz waveform + 1 second (44 100 samples) of silence =
> total 3 seconds (132 300 samples), and save it as input.wav
>
> After it, I use FFMPEG to remove silence using the following command line:
>
> ffmpeg -i input.wav -af silenceremove=1:0.1:0:1:0.1:0 output.wav
>
> The resulting file, output.wav, contains total 44 981 samples: 44 099
> samples of simple sine 1kHz waveform (the first sample of simple sine
> 1kHz waveform is truncated) + 882 samples of silence. Instead of
> expected total 1 second (44 100 samples) of simple sine 1kHz waveform.
>
> WAIDW?

To trim silence at end you could use sox and its silence and reverse effect.


More information about the ffmpeg-user mailing list