[FFmpeg-user] How to delete digital silence?

Víctor Paesa victorpaesa at googlemail.com
Sat Sep 13 12:07:05 CEST 2014


Hi Ilir,

On 9/13/14, Ilir Pruthi wrote:
> On Sat, Sep 13, 2014 at 4:05 AM, Paul B Mahol wrote:
>
>> On 9/11/14, Bart Gopnik  wrote:
>> >>> Now I'm using proprietary software to delete
>> >>> digital silence from the beginning and from the
>> >>> end of *.wav file.
>> >
>> >>> Can I solve this problem using FFMPEG (only)?
>> >
>> >
>> >> Did you already test the silencedetect and
>> >> silenceremove filter?
>> >> https://ffmpeg.org/ffmpeg-filters.html#silencedetect
>> >
>> >
>> > No, looks like it is new filters.
>> >
>> > Should I combine these 2 filters (silencedetect and silenceremove) or
>> > I can solve my problem using only "silenceremove" filter? I need
>> > delete absolute (not noise) digital silence only from beginning and
>> > from the end of audio file (not from middle).
>> >
>> > Could you please help me to create command line to do this?
>> >
>>
>> ffmpeg -i INPUT -af silenceremove=1:0.1:0:1:0.1:0  OUTPUT
>>
>
> After running:
> ffmpeg -i "udp://@MY_IP:XXX?overrun_nonfatal=1&reuse=1" -map 0:p:11 -af
> silenceremove=1:0.1:0:1:0.1:0 -vcodec libx264 -acodec libmp3 -t 30 -f
> mpegts -y program11.ts
>
> I get:
> [AVFilterGraph @ 0x2b9e360] No such filter: 'silenceremove'
>
> My FFmpeg version is:
> ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
>   built on May 11 2014 06:03:44 with gcc 4.7 (Debian 4.7.2-5)
>   configuration: --prefix=/home/encuser/ffmpeg_build
> --extra-cflags=-I/home/encuser/ffmpeg_build/include
> --extra-ldflags=-L/home/encuser/ffmpeg_build/lib --bindir=/home/encuser/bin
> --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac
> --enable-libfreetype --enable-libmp3lame --enable-libopus
> --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
> --enable-nonfree

The filter silenceremove was added this summer. You need a newer
version of ffmpeg.
Since you used MP3 as output: be aware that most lossy codecs introduce a brief
silence at the begining/end of files.
You may avoid that by using  as output WAV or lossless codecs.

Regard,
Víctor


More information about the ffmpeg-user mailing list