[FFmpeg-user] Audio filter: removesilence doesn't appear to do anything
DopeLabs
dopelabs at dubstep.fm
Mon Sep 25 13:24:21 EEST 2017
i created an audio file in ableton live which plays 10 seconds of audio, then is silent for 5 seconds and so on for ~5 mins, exported as an aif
ran the ffmpeg silenceremove from your example (except i removed the :1 after the -20dB
$ ffmpeg -i silencetest.aif -af silenceremove=0:0:0:-1:0.5:-20dB removed.wav
ffmpeg version N-86825-g99c5ac2039 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.1.0 (clang-802.0.42)
configuration: --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --enable-videotoolbox --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-filter=coreimage --enable-filter=coreimagesrc --enable-filter=frei0r --enable-filter=frei0r_src --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-libx265 --enable-version3 --enable-libwavpack --enable-libssh --enable-librtmp --enable-libfdk-aac --enable-nonfree --enable-libzmq --enable-opencl --enable-ffplay --enable-libcaca
libavutil 55. 68.100 / 55. 68.100
libavcodec 57.102.100 / 57.102.100
libavformat 57. 76.100 / 57. 76.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 95.100 / 6. 95.100
libavresample 3. 6. 0 / 3. 6. 0
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, aiff, from 'silencetest.aif':
Duration: 00:04:54.19, start: 0.000000, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16be, 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16be (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'removed.wav':
Metadata:
ISFT : Lavf57.76.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Metadata:
encoder : Lavc57.102.100 pcm_s16le
size= 31661kB time=00:03:03.79 bitrate=1411.2kbits/s speed= 418x
video:0kB audio:31661kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000241%
as you can see the output file is shorter than the input.
here is what the wav forms look like for a visual comparison
http://run.florist.run/images/silencetest.png
> On Sep 25, 2017, at 2:39 22AM, Quinn Wood <mtcjayne at gmail.com> wrote:
>
> I have removed the video and am getting the same results.
> silenceremove is not removing silence.
>
> ffmpeg -i ../2017-09-24T123913.mp4.done -vn -af
> silenceremove=0:0:0:-1:0.5:-20dB:1 output.m4a
>
> https://pastebin.com/raw/xcGQFs30
>
> ffprobe -i output.m4a
>
> https://pastebin.com/raw/183KLwZY
>
> ffmpeg -i output.m4a -af silencedetect=n=-20dB:d=0.5 -f null -
>
> https://pastebin.com/raw/4304SzMh
>
> Using peak detection makes no difference:
> https://pastebin.com/raw/KwqXudSw https://pastebin.com/raw/462yRwQ7
> https://pastebin.com/raw/s362n0wd
>
> On Mon, Sep 25, 2017 at 1:45 AM, Quinn Wood <mtcjayne at gmail.com> wrote:
>> I thought I'd extracted the video by simply using the m4a extension-
>> that's not the way that works and I should have noticed that. I bet
>> the audio has been truncated but the video remains the full length.
>> Let me strip out the video and try it.
>>
>> On Mon, Sep 25, 2017 at 12:59 AM, Quinn Wood <mtcjayne at gmail.com> wrote:
>>> I have used the following command
>>> ffmpeg -i input.m4a -af silenceremove=0:0:0:-1:0.5:-20dB output.m4a
>>>
>>> on a file. When I use another tool (Audacity) to truncate periods over
>>> 0.5 seconds of under -20dB volume it removes upwards of an hour from
>>> the input file. When I run this command ffmpeg doesn't remove a single
>>> second. I have tried numerous variations of the command and numerous
>>> input files, and am simply unable to replicate the effect Audacity is
>>> producing.
>>>
>>> The input files have a period of silence at the beginning that is
>>> predictable, intermittent periods of silence throughout the file of
>>> unknown quantity and length, and a period of silence at the end that
>>> is predictable.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list