Bibliothek / Bild, Video & Audio
Bild, Video & Audio
Stille- und Sprachsegmente in Audiodateien mit FFmpeg erkennen
Nimmt eine hochgeladene Audiodatei über ein Formular entgegen und nutzt FFmpeg silencedetect, um JSON mit Stillephasen, Sprachsegmenten und Gesamtwerten wie dem Stillanteil in Prozent zurückzugeben.
Was sie bewirkt
## Detect silence and speech segments in an audio file with FFmpeg (free, no API) Upload an audio file and get back a clean JSON report of every pause: exactly where each silence starts and ends, how long it is, and the derived speech segments in between (plus totals like percent silent). No API key, no account, no paid service - FFmpeg's silencedetect filter measures it for free on your own machine. This is the same measurement technique behind the karaoke-caption templates in this pipeline (accurate word timing depends on knowing exactly where the speaker pauses), pulled out as a standalone analysis tool. Useful on its own for auto-chaptering long recordings, feeding real pause timestamps into any caption/subtitle workflow instead of guessing, or - with the optional output mode below - actually removing the dead air. Customization built in: an Output dropdown lets you choose "Report only" (just the JSON), "Report + trimmed audio" (the detected speech segments stitched back-to-back with FFmpeg's concat filter into a silence-free file), or "Report + SRT markers" (the same segments written out as an SRT file so a video editor can jump straight to the non-silent parts). ### How it works 1. A form takes an audio file, a silence threshold in dB, a minimum silence duration in seconds, and an output mode: report only, a silence-trimmed audio file, or an SRT marker file. 2. The file is saved to a per-run temp folder and analyzed with FFmpeg's silencedetect filter - no output file is rendered at this stage, this only measures. 3. FFmpeg's own Duration line plus every silence_start/silence_end pair are parsed out of its stderr output. 4. Speech segments are derived as everything that is not silence, and a summary (silence count, total silent/speech time, percent silent) is added. 5. If "Report + trimmed audio" was chosen, every speech segment is cut and concatenated with FFmpeg's concat filter into one silence-free file. If "Report + SRT markers" was chosen, the same segments are written out as an SRT subtitle file instead. Either way the file is read back and returned alongside the report - otherwise the report alone is the output. ### Setup Self-hosted n8n only - this uses Execute Command, which n8n Cloud disables. Install FFmpeg on the PATH of the process running n8n, and start n8n with NODES_EXCLUDE="[]" and N8N_RESTRICT_FILE_ACCESS_TO="/tmp" - both are required
Die Schritte
- Audio file and threshold form
- Prepare Run
- Create the temp folder
- Restore the uploaded file
- Save the uploaded file to disk
- Detect silence (FFmpeg)
- Parse the silence report
- Route by output mode
- Build the trim filter (FFmpeg)
- Trim the silence (FFmpeg)
- Verify the trim succeeded
- Read the trimmed audio back
- Attach the report to the trimmed file
- Build SRT markers
Insgesamt 17 Schritte.
Ähnliche Automatisierungen
Bild, Video & AudioUngleiche Videoclips per FFmpeg aus einem Formular-Upload zu einer MP4 zusammenfügen11 SchritteBild, Video & AudioWortweise hervorgehobene Karaoke-Untertitel mit FFmpeg und FFprobe in Videos einbrennen12 SchritteDateien & Cloud-SpeicherConvert Instagram carousels into TikTok and Reels videos with ffmpeg and SocialRobot26 SchritteDateien & Cloud-SpeicherLokale Datei mit Shell-Befehlen lesen und verarbeiten8 Schritte