FFmpeg recipe
FFmpeg: Auto-Remove Silent Gaps from Audio or Video
silenceremove detects audio below a threshold and cuts those segments. Tunable for casual chat or fast standups.
Command
ffmpeg -i input.mp4 -af "silenceremove=stop_periods=-1:stop_duration=0.6:stop_threshold=-40dB" -y output.mp4Prefer no terminal?
Use the Silence Remover in your browser
What each flag does
| -i | Input file. Can be a video, audio, or image. Repeat for multiple inputs. |
|---|---|
| -af | Audio filter chain. e.g. silenceremove, loudnorm. |
| -y | Overwrite output file without confirmation. |
| stop_periods=-1 | Remove every silent gap, not just the leading one. |
| stop_duration=0.6 | Minimum gap length to consider as silence (in seconds). |
| stop_threshold=-40dB | Audio below this dB level is silence. Tighten to -50dB for casual chats; loosen to -30dB for noisy recordings. |
Notes & gotchas
- For Zoom recordings, -40dB and 0.8s typically cut 30–50% of runtime.
- For DAW-clean voice recordings, drop to -50dB and 0.4s.
Check it worked
ffprobe -v error -show_entries format=duration -of csv=p=0 output.mp3Shorter than the source. An unchanged duration means nothing crossed the silence threshold.
What to change
| stop_threshold is the sensitivity | -40dB suits a clean recording. A noisy room needs -30dB or the noise floor never counts as silence. |
|---|---|
| stop_duration protects the pauses you want | 0.6 s removes dead air and keeps breaths. Below 0.3 s it starts cutting inside words. |
| It only edits audio here | The video stream keeps its own timeline, so picture and sound drift apart. Cut both together, or use the browser tool which handles it. |
If it fails
Nothing was removed.
Why: The threshold is stricter than the actual noise floor. Room tone often sits above -30 dB.
Fix: Raise the threshold towards -25 dB, or measure the real floor first with the silencedetect filter.
Words are clipped at the start of sentences.
Why: The minimum silence duration is too short, so the filter cuts into the breath before speech begins.
Fix: Increase the duration to half a second or more, which keeps natural pauses intact.