Remsi
Remove silence from video files with a 1-line ffmpeg command
Install / Use
/learn @bambax/RemsiREADME
Remsi
Remove silence from video files with a one-line ffmpeg command.
Why
Apparently it's not possible to automatically remove silent parts from a video file in one go with ffmpeg. The silencedetect audio filter only detects silence, and the silenceremove filter is an audio filter that only works on audio and doesn't remove corresponding video parts.
How
This takes as input the output of silencedetect, and writes the corresponding audio and video select filters for ffmpeg. When executed, the command produces a video file with the silent parts removed.
Install & Use
Requires ffmpeg, Python3. Usage is as follows:
ffmpeg -i YOURINPUTFILE -hide_banner -af silencedetect=n=-50dB:d=1 -f null - 2>&1 | python remsi.py > COMMANDFILENAME
silencedetect filter accepts a noise level in dB and a minimum duration in seconds.
YOURINPUTFILE is the name of your input file (video or audio file: 'noise_a.mp4' for example).
COMMANDFILENAME is the name of the out file you want to write the ffmpeg command to. After executing the script, it will contain an ffmpeg command such as (for example):
ffmpeg -i noise_a.mp4 -vf "select='between(t,0,2.00093)+between(t,4.00009,6.00256)+between(t,7.99961,9.99989)+between(t,12.0001,13.9998)',setpts=N/FRAME_RATE/TB" -af "aselect='between(t,0,2.00093)+between(t,4.00009,6.00256)+between(t,7.99961,9.99989)+between(t,12.0001,13.9998)',asetpts=N/SR/TB" outfile_noise_a.mp4
This is actually a succession of select filters. Once run, it will output (reencode) a video file with the silent parts removed.
Related Skills
qqbot-channel
343.3kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
99.7k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
343.3kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
project-overview
FlightPHP Skeleton Project Instructions This document provides guidelines and best practices for structuring and developing a project using the FlightPHP framework. Instructions for AI Coding A
