How to Use FFmpeg Silencedetect to Find Quiet Parts

This article explains how to use the FFmpeg silencedetect audio filter to identify quiet parts in a video or audio file. You will learn the specific command to run, how to customize the detection thresholds, and how to read the resulting console output to extract exact timestamps for silence start, end, and duration.

Running the FFmpeg command

To detect quiet parts in a video, you must apply the silencedetect filter to the audio stream. Since you only need the analysis data and do not want to output a new video file, you should route the output to a null renderer.

Run the following command in your terminal:

ffmpeg -i input.mp4 -af silencedetect=noise=-30dB:d=2 -f null -

Understanding the Parameters

You can adjust how FFmpeg defines “silence” using these two key parameters:

Reading the Output

Because FFmpeg outputs its logs to stderr, you will see the detected silence timestamps printed in your terminal window. The relevant output lines look like this:

[silencedetect @ 0x7fa89bc05200] silence_start: 12.45
[silencedetect @ 0x7fa89bc05200] silence_end: 16.12 | silence_duration: 3.67

Here is how to interpret these lines:

Filtering the Output for Easier Reading

FFmpeg outputs a lot of general file information. To isolate only the silence detection timestamps, you can pipe the output and filter it using command-line tools.

On Linux and macOS (using grep):

ffmpeg -i input.mp4 -af silencedetect=noise=-30dB:d=2 -f null - 2>&1 | grep silence

On Windows PowerShell:

ffmpeg -i input.mp4 -af silencedetect=noise=-30dB:d=2 -f null - 2>&1 | Select-String "silence"

These commands redirect stderr to stdout (2>&1) and filter for the word “silence,” leaving you with a clean list of start and end times.