Raw Video Processing

作者 zc277584121959680e17acf无许可证收录于 2026年10月8日更新于 2026年10月8日仓库5周前更新

Post-process raw screen recordings by removing silent segments and applying speed adjustments. Uses FFmpeg-based Python scripts to optimize video pacing automatically.

包含脚本Design & Creative
AI 生成的概览

通过 FFmpeg 脚本去除静音片段并调整播放速度,对原始屏幕录制进行后期处理。

功能
该技能分两步清理原始录屏:先用 remove_silence.py 检测并剪掉静音部分(包括键盘声),再用 speed_video.py 应用播放速度倍率。它会生成中间和最终视频文件,例如 _nosilence.mp4 和 _nosilence_1.2x.mp4,并输出检测到的静音片段及时间戳摘要。两个脚本均基于 FFmpeg,并通过 uv 运行。
适用场景
适用于用户已录制屏幕演示、希望在发布前改善节奏的场景,例如去除长时间停顿或空白,并给视频略微提速。它也支持只去除静音或只加速文件等部分执行方式。
运行要求
需要安装 FFmpeg 和 uv。技能附带两个可执行 Python 脚本(remove_silence.py 和 speed_video.py),通过 uv 和 Python 3.12 运行。未提及凭据或网络访问需求。

Skill: Raw Video Processing

Post-process raw screen recordings to improve pacing — remove silent segments, then speed up the result.

Prerequisite: FFmpeg and uv must be installed.


When to Use

The user has recorded a screencast and wants to clean it up before publishing. Typical issues in raw recordings:

  • Long pauses / dead air while thinking or waiting for loading
  • Keyboard typing sounds and other low-level background noise that should be treated as silence
  • Overall pacing feels slow and could benefit from a slight speed boost

Default Workflow

When the user provides a raw video file, run both scripts in sequence by default:

Step 1: Remove Silent Segments

bash
uv run --python 3.12 /path/to/skills/raw-video-processing/scripts/remove_silence.py <input.mp4> -t="-20dB" -d 0.5

This detects and cuts out silent portions (including keyboard sounds), producing <input>_nosilence.mp4.

Always pass these parameters (tuned for screen recordings with keyboard noise):

  • -t="-20dB" — aggressive threshold that filters out keyboard typing and background noise (use = syntax to avoid argparse treating negative values as flags)
  • -d 0.5 — remove short silences too (0.5s minimum)
  • -p 0.2 — seconds of breathing room kept around speech boundaries (default, usually no need to pass)

The script prints a detailed summary: number of silent segments found, total silence removed, and all kept segments with timestamps. Review this output to confirm the result looks reasonable.

Step 2: Speed Up the Video

bash
uv run --python 3.12 /path/to/skills/raw-video-processing/scripts/speed_video.py <input>_nosilence.mp4

This applies a speed multiplier to the silence-removed video, producing <input>_nosilence_1.2x.mp4.

Default parameters:

  • --speed 1.2 — 1.2x playback speed (a subtle boost that doesn't feel rushed)

Script Options

remove_silence.py

FlagDefaultDescription
-o, --output<input>_nosilence.mp4Custom output path
-t, --threshold-30dBSilence threshold in dB (higher = more aggressive). Always use -20dB for screencasts — pass as -t="-20dB" to avoid argparse issues with negative values
-d, --duration0.8Minimum silence duration in seconds to remove. Use 0.5 for screencasts
-p, --padding0.2Padding kept around non-silent segments
--dry-runoffOnly print detected segments, don't export

speed_video.py

FlagDefaultDescription
-o, --output<input>_<speed>x.mp4Custom output path
-s, --speed1.2Playback speed multiplier

Custom Scenarios

  • Only remove silence — run just Step 1.
  • Only speed up — run just Step 2 directly on the input file.
  • Conservative cleanup — use -t="-30dB" -d 0.8 if the default is cutting too much speech.
  • Extra aggressive cleanup — use -t="-15dB" -d 0.3 and --speed 1.5 for maximum compression.
  • Preview before committing — use --dry-run on remove_silence.py to see what would be cut without creating a file.
  • Custom output name — use -o on either script to control the output path.

Important Notes

  • Always run remove_silence before speed_video. Silence detection works on the original audio; speeding up first would alter the audio characteristics and make silence detection less accurate.
  • For long videos (>30 min), the silence removal step may take a few minutes as it processes each segment individually.
  • Both scripts preserve video quality — remove_silence uses stream copy (no re-encoding), while speed_video re-encodes with FFmpeg defaults.

来源与署名

来源:zc277584121/marketing-skills位于skills/raw-video-processing提交959680e

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架