detect_silence
Detects silent stretches in audio using ffmpeg's silencedetect, returning precise time intervals without editing media. Requires ffmpeg on PATH.
Instructions
Analyzes a media file's audio for silent stretches using ffmpeg's silencedetect filter, run locally via child_process -- NOT via Premiere's scripting API, which has no audio-level/RMS reading capability at all (confirmed: every audio tool in this codebase only writes levels, never reads them). Requires ffmpeg on PATH; returns an explicit error if it is not found rather than failing silently. This is DETECTION ONLY -- it does not cut or modify anything. Use the returned intervals with split_clip/ripple_delete/razor_timeline_at_time if you want to remove the silence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mediaPath | No | Direct filesystem path to the media file to analyze | |
| projectItemId | No | Project item ID to resolve to a media path instead of passing mediaPath directly | |
| noiseThresholdDb | No | Silence threshold in dBFS, e.g. -30 (default -30). Audio quieter than this is considered silent. | |
| minDurationSeconds | No | Minimum duration in seconds for a quiet stretch to be reported as silence (default 1.5) |