remotion-markup
Structure Remotion scenes with markup patterns for layout, typography, and reusable video UI.
Install
npx skills add https://github.com/remotion-dev/skills --skill remotion-markup- metadata
- tags: silence, detection, trimming, ffmpeg, loudnorm, audio
Adaptive Silence Detection
Detect silent segments in video or audio files.
Requires FFmpeg — see ffmpeg.md for how to invoke it in Remotion projects.
Step 1: Measure loudness with loudnorm
Use the loudnorm filter in JSON mode to get the EBU R128 integrated loudness and gating threshold for each file:
As output you will get:
input_i: Integrated loudness (dB) — the overall perceived volumeinput_thresh: EBU R128 gating threshold (dB) — the level below which audio is considered too quiet to count toward loudness measurement
Step 2: Detect silences using adaptive threshold
Pass the input_thresh value from step 1 as the noise parameter to silencedetect:
Parameters:
noise: The threshold below which audio is considered silent. Useinput_threshfrom step 1.d: Minimum silence duration in seconds.0.5is a good default.
Interpreting the output
The filter outputs pairs of silence_start and silence_end timestamps:
Identifying leading and trailing silence
- Leading silence: Consecutive silence segments starting at or near 0. If the first
silence_startis > 0.5s, there is no leading silence. - Trailing silence: The last silence segment that extends to (or near) the end of the file. Compare the last
silence_endwith the file's total duration.
When multiple silences are nearly contiguous at the start or end (gap < 0.2s), treat them as a single leading/trailing silence block.
Using with Remotion's <Video> component
Apply the detected trim points using trimBefore and durationInFrames (values are in frames):