FFmpeg silence removal: a shorter clip is not a listening-quality score

2026-11-02来源 dev.to PythonEnglish

This article was drafted with AI assistance and checked against our retained local measurement records. It publishes text, code and a table, not a new audio or listening test.

Changing one FFmpeg setting shortened our retained narration by 0.159 to 2.877 seconds. We did not run a listening panel, so these numbers do not establish which version sounds best.

This is a small, reproducible measurement note rather than a preset recommendation. The source was one 21.120-second Korean synthetic narration, one narrator, and no background music. The retained run finished on 2026-11-01 at 00:46:56 KST, using FFmpeg 9.0.1 on macOS arm64.

What changed

The run changed stop_duration while keeping the remaining filter arguments fixed:

silenceremove=stop_periods=-1:stop_duration=VALUE:stop_threshold=-30dB:stop_silence=0:detection=rms:window=0.02 
stop_duration (s) Output length (s) Time removed (s) Longest remaining detected pause (s)
0.1 18.243 2.877 0.105
0.2 18.951 2.169 0.163
0.3 19.476 1.644 0.263
0.5 20.291 0.829 0.463
0.8 20.961 0.159 0.750

The last column is a maximum, not an average or the value of stop_duration. It includes detected gaps lasting at least 0.1 seconds at a separate −50 dB measurement threshold. The original clip's longest such gap was 0.903 seconds.

The smallest setting removed the most time in this particular clip. That is useful for describing the edit, but it says nothing by itself about comfortable pacing or clipped consonants. The retained record includes one ASR pass per version, which also does not replace listening.

Reproduce the comparison on your own audio

The following commands are an example recipe, not another completed experiment. Supply an audio file you are permitted to use. The -n flag avoids overwriting an existing output file.

input_audio="input.wav" mkdir -p pause-comparison for duration in 0.1 0.2 0.3 0.5 0.8; do ffmpeg -hide_banner -n -i "$input_audio" \ -af "silenceremove=stop_periods=-1:stop_duration=${duration}:stop_threshold=-30dB:stop_silence=0:detection=rms:window=0.02" \ -c:a pcm_s16le "pause-comparison/d${duration}.wav" done ffprobe -v error -show_entries format=duration \ -of default=noprint_wrappers=1:nokey=1 \ "pause-comparison/d0.3.wav" ffmpeg -hide_banner -i "pause-comparison/d0.3.wav" \ -af "silencedetect=noise=-50dB:d=0.1" -f null - 

Keep the input, FFmpeg version, channel layout, sample rate, and filter arguments with the output. Listen to the original and edited files with the same playback level before choosing a setting. The retained numbers above are observations for our source, not expected results for yours.

What this does not establish

  • We tested one synthetic narrator and one 21.12-second WAV. Generalization to other voices, speech styles, or music is untested.
  • There was no listening evaluation. We cannot label a setting as the most natural or intelligible.
  • Video synchronization was not measured. Do not replace a video's audio with a shorter waveform while assuming its existing captions and picture timing still match.
  • Viewer retention, customer conversion, and revenue were not measured.

The next useful comparison is a listening check on the actual edited output, followed by any required video and caption retiming. A smaller duration is a measurement result, not a quality verdict.

Source: NSST's retained measurement record and existing Korean write-up. Filter reference: FFmpeg silenceremove documentation. This English adaptation reuses the dated measurements; no new experiment was run for this post.

原文:https://www.a8q9.cn/en/article/ffmpeg-silence-removal-a-shorter-clip-is-not-a-listening-quality-score-0a25aa.html

相关文章