Video Understand
calesthio/OpenMontage
Understand video content locally using ffmpeg frame extraction and Whisper transcription.
视频压缩与静默片段剪切工具。使用 FFmpeg CRF 模式压缩视频,适配屏幕录制/课件场景;支持检测并去除静默静止片段。自动检测硬件与源码率并选择最优编码方案(高码率源走 VideoToolbox 硬件加速,低码率录屏自动改用 x264 CRF 自适应编码)。本技能应在用户需要压缩视频、减小视频大小、去除视频空档时使用。不要用于:视频剪辑、音频提取、格式转换。
$ npx skills add cat-xierluo/legal-skills --skill video-compressor -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install cat-xierluo/legal-skills video-compressor --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/video-compressor .claude/skills/video-compressor && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "video-compressor" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/video-compressor into .claude/skills/video-compressor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "video-compressor", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/cat-xierluo/legal-skills/tree/main/skills/video-compressorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add cat-xierluo/legal-skills --skill video-compressor -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install cat-xierluo/legal-skills video-compressor --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/video-compressor .agents/skills/video-compressor && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "video-compressor" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/video-compressor into .agents/skills/video-compressor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "video-compressor", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cat-xierluo/legal-skills --skill video-compressor -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install cat-xierluo/legal-skills video-compressor --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/video-compressor .cursor/skills/video-compressor && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "video-compressor" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/video-compressor into .cursor/skills/video-compressor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "video-compressor", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/cat-xierluo/legal-skills.git --path skills/video-compressor--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add cat-xierluo/legal-skills --skill video-compressor -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install cat-xierluo/legal-skills video-compressor --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/video-compressor .gemini/skills/video-compressor && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "video-compressor" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/video-compressor into .gemini/skills/video-compressor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "video-compressor", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install cat-xierluo/legal-skills video-compressorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add cat-xierluo/legal-skills --skill video-compressor -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/video-compressor .github/skills/video-compressor && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "video-compressor" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/video-compressor into .github/skills/video-compressor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "video-compressor", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cat-xierluo/legal-skills --skill video-compressor -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install cat-xierluo/legal-skills video-compressor --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/video-compressor .opencode/skills/video-compressor && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "video-compressor" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/video-compressor into .opencode/skills/video-compressor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "video-compressor", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
video-compressor视频压缩与静默片段剪切工具。使用 FFmpeg CRF 模式压缩视频,适配屏幕录制/课件场景;支持检测并去除静默静止片段。自动检测硬件与源码率并选择最优编码方案(高码率源走 VideoToolbox 硬件加速,低码率录屏自动改用 x264 CRF 自适应编码)。本技能应在用户需要压缩视频、减小视频大小、去除视频空档时使用。不要用于:视频剪辑、音频提取、格式转换。
Video Compressor is an agent skill from cat-xierluo/legal-skills. 视频压缩与静默片段剪切工具。使用 FFmpeg CRF 模式压缩视频,适配屏幕录制/课件场景;支持检测并去除静默静止片段。自动检测硬件与源码率并选择最优编码方案(高码率源走 VideoToolbox 硬件加速,低码率录屏自动改用 x264 CRF 自适应编码)。本技能应在用户需要压缩视频、减小视频大小、去除视频空档时使用。不要用于:视频剪辑、音频提取、格式转换。
Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `CHANGELOG.md`, `references/config.md` and `scripts/compress.py`).
It sits in Media & Creative, covering Video production. It works with FFmpeg. The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit c077fcc. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 3 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
python3brewffmpegFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Video Compressor loads about 1.5k tokens when it runs, and up to ~3k if it reads all its reference files. Until then it costs about 50 tokens; SKILL.md has 358 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from cat-xierluo/legal-skills at commit c077fcc, republished under its MIT licence (© cat-xierluo). 358 words, ~1,503 tokens.
.claude/skills/video-compressor/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.使用 FFmpeg 将视频文件压缩为低比特率 MP4,减小文件体积的同时保留清晰的音频。自动检测硬件并选择最优编码方案(Apple Silicon 默认使用 VideoToolbox 硬件加速)。
本技能支持两种工作模式:
将视频压缩为低比特率 MP4,减小文件体积。
检测并去除视频中同时满足以下条件的片段:
适用于:课程录制中途休息、会议室无人时的静默等待等无效内容。
确认用户提供的文件路径或目录路径。支持以下视频格式:
.mp4 .mov .avi .mkv .webm .flv .wmv .ts
默认配置(大多数场景无需调整):
| 参数 | 默认值 | 说明 |
|---|---|---|
| CRF 质量值 | 23 | 自适应质量,越小质量越高(仅软件编码) |
| 最大码率 | 2500k | VBV 码率上限 |
| 音频比特率 | 96k | AAC 语音音质 |
| 编码预设 | veryfast | 速度与压缩比平衡(仅软件编码) |
| 编码器 | 自动检测 | Apple Silicon 默认 HEVC VT,其他 x264 |
| 并发线程 | 自动 | VideoToolbox 默认 1(共享硬件编码器,多并发反而慢),软件编码默认 ≤8 |
| 输出后缀 | _compressed | 输出文件名后缀 |
详细配置说明见 references/config.md。
# 单个文件
python3 scripts/compress.py -i <文件路径>
# 多个文件(并发压缩)
python3 scripts/compress.py -i <文件1> <文件2> <文件3>
# 整个目录
python3 scripts/compress.py -i <目录路径>
# 混合:文件 + 目录
python3 scripts/compress.py -i <文件1> <目录路径> <文件2>指定自定义参数:
python3 scripts/compress.py -i <文件1> <文件2> --crf 28 -a 64k --preset medium -j 2压缩完成后输出每个文件的结果:
文件名 原始大小 压缩后大小 压缩比
video1.mp4 120.5 MB 28.3 MB 76.5%
─────────────────────────────────────────────────
合计 205.7 MB 47.4 MB 77.0%当用户提到以下场景时使用此模式:
python3 scripts/trim_silences.py -i <视频文件路径>使用默认参数(同时检测静音+静止,最短3秒才计入)。
指定自定义参数:
# 仅检测静音片段(不考虑画面是否静止)
python3 scripts/trim_silences.py -i <路径> --mode silence
# 仅检测画面静止片段(不考虑是否有声音)
python3 scripts/trim_silences.py -i <路径> --mode static
# 自定义阈值:更严格的静默检测
python3 scripts/trim_silences.py -i <路径> --noise-db -40 --min-duration 5| 视频类型 | 推荐模式 | 说明 |
|---|---|---|
| 课程录制休息时 | both | 同时满足静音+静止,不误剪 |
| 会议无人时段 | both 或 static | 若全程有空调白噪声用 both |
| 比赛/电影解说(全程有声音) | static | 仅剪画面静止部分 |
| 监控录像(画面固定) | static | 几乎不需要音频 |
剪切完成后,输出:
| 文件 | 说明 |
|---|---|
原文件名_trimmed.mp4 | 精剪版(去除了目标片段) |
原文件名_cuts/ | 存放被剪片段的目录 |
原文件名_cuts/_report.json | 被剪片段的时间戳报告 |
被剪片段目录中,每个片段保存为一个独立的 MP4 文件,文件名包含起止时间,方便复查。
| 参数 | 默认值 | 说明 |
|---|---|---|
--noise-db | -30 | 静默检测分贝阈值,越小越严格 |
--scene-threshold | 0.05 | 画面静止阈值 0~1,越小越严格(轻微页面变化可接受) |
--min-duration | 120 | 最短片段时长(秒),默认2分钟,仅剪掉长片段 |
--mode | both | 检测模式:both=同时静音+静止,silence=仅静音,static=仅画面静止 |
--crf | 23 | CRF 质量值 |
--maxrate | 2500k | 最大码率限制 |
--bufsize | 2500k | VBV 缓冲区大小 |
--audio-bitrate | 96k | 输出音频比特率 |
--preset | veryfast | 编码预设 |
--codec | 自动检测 | 编码器选择(hevc_vt / h264_vt / x264 / x265 / x264_fast) |
本工具自动检测系统硬件并选择最优编码方案:
| 平台 | 编码器 | 速度提升(实测) | 输出格式 | 说明 |
|---|---|---|---|---|
| Apple Silicon (M1/M2/M3/M4) | hevc_videotoolbox | 2-5x(1080p60) / 5-15x(720p30) | HEVC/H.265 | 自动使用硬件编码 |
| Apple Silicon (备用) | h264_videotoolbox | 2-4x(1080p60) / 4-10x(720p30) | H.264 | HEVC 不可用时的回退 |
| 其他平台 | libx264 | 1x 实时 | H.264 | 标准软件编码 |
速度提示:上述数值为实际测试参考范围,实际速度受分辨率、帧率、画质参数、系统负载影响。1080p60 高帧率场景下 VideoToolbox 实际约 2-5x 实时(而非 5-15x),3 小时视频约需 50 分钟。
录屏/课件源码率陷阱(v1.5.0 已自动化):压缩前先
ffprobe查源文件bit_rate。硬件路径(hevc_vt/h264_vt)在hw_detect.py中写死目标码率 2000k 且忽略--crf/--maxrate参数;源总码率 ≤3 Mbps(录屏/课件特征)时脚本自动选用 x264 CRF 自适应编码并打印提示,高码率源仍走硬件路径,--codec显式指定可覆盖自动选择。CRF 自适应对静止画面几乎不耗码率,实测录屏压缩比 80-88%、速度 12-20x 实时。手动估算可用 60 秒采样:ffmpeg -ss <中段> -t 60 -i 输入 -c:v libx264 -crf 23 ...看采样大小推算全片。
启动时自动打印检测结果,如:
硬件检测: Apple Silicon (10 核 / 64 GB)
编码器: HEVC VideoToolbox (硬件加速) — 实际 1080p60 约 2-5x 实时
FFmpeg: 9.0 (VideoToolbox 支持: H.264 + HEVC)手动指定编码器:
python3 scripts/compress.py -i <路径> --codec hevc_vt # 强制 HEVC 硬件编码
python3 scripts/compress.py -i <路径> --codec h264_vt # 强制 H.264 硬件编码
python3 scripts/compress.py -i <路径> --codec x264 # 强制软件编码
python3 scripts/compress.py -i <路径> --codec x265 # 软件 HEVC 编码(高压缩)可选编码器:hevc_vt h264_vt x264 x265 x264_fast
对超过 30 分钟的视频,建议加 --detach 启动:
python3 scripts/compress.py -i <长视频.mp4> --codec hevc_vt --detach--detach 行为:
start_new_session),脚本被杀不影响编码/tmp/ffmpeg_<视频名>_<时间戳>.log,可用 tail -f 跟踪症状:脚本启动后立即报"dyld Symbol not found"或"Library not loaded"。
原因:典型场景是 brew upgrade 升级某个依赖库(如 x265)后,ffmpeg 未重新链接;ffmpeg 二进制仍在引用旧版本符号。
修复:
brew upgrade ffmpeg # 让 ffmpeg 重新链接到新依赖
# 或
brew reinstall ffmpeg # 完全重装新版脚本会在启动时主动检测 ffmpeg 健全性,崩溃时立即输出诊断和修复命令,不再静默 fallback。
失败时完整 ffmpeg 日志保存在 /tmp/ffmpeg_<视频名>_<时间戳>.log,不再被截断丢失关键诊断信息。
_compressed_2 等序号递增,--overwrite 才允许覆盖--detach:预期超过几分钟的编码必须加 --detach(ffmpeg 脱离进程组,会话超时/终止不影响编码);同步模式或终端托管后台都实测被杀过,残缺输出无 moov atom 不可播放| 依赖 | 版本要求 | 安装方式 |
|---|---|---|
ffmpeg | ≥ 5.0(推荐 ≥ 7.0 for VideoToolbox -q:v) | brew install ffmpeg |
Python | ≥ 3.9(脚本已兼容系统自带 python3) | 系统自带或 brew install python |
universal-media-downloader 配合:下载视频后压缩节省空间local-asr / tingwu-asr 配合:压缩后再转录,减少文件传输时间© cat-xierluo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 6 other files (scripts, references) in skills/video-compressor of cat-xierluo/legal-skills.
Open the folder on GitHubat commit c077fcc
Video Compressor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Video Compressor this skillcat-xierluo/legal-skills | 717 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Video Understandcalesthio/OpenMontage | 66k | — | ~841 | Automated safety check: Pass | AGPL-3.0 | |
| HyperFrames Video Entry Pointheygen-com/hyperframes | 59k | 3 repos | ~5.2k | Automated safety check: Pass | Apache-2.0 | |
| Video Shotseternityspring/reelbench-skills | 872 | 1 repos | ~1.8k | Automated safety check: Notes | Apache-2.0 | |
| Mobile Demo Film Editorsuperset-sh/superset | 15k | — | ~1.8k | Automated safety check: Pass | Custom licence | |
| Video Editcalesthio/OpenMontage | 66k | — | ~855 | Automated safety check: Notes | AGPL-3.0 |
calesthio/OpenMontage
Understand video content locally using ffmpeg frame extraction and Whisper transcription.
heygen-com/hyperframes
Entry point for making, editing and rendering videos from HTML compositions with HyperFrames, routing each request to the right workflow.
eternityspring/reelbench-skills
拉片:把一条成片拆成逐镜头的分析表——每个镜头的时长、景别、类别、运镜、画面. An agent skill from eternityspring/reelbench-skills.
superset-sh/superset
Edits real mobile screen recordings into a configurable demo video with phone framing, title cards, cutaways and an end card, using a bundled renderer.
calesthio/OpenMontage
Edit videos locally using ffmpeg. An agent skill from calesthio/OpenMontage.
lemomo-ai/lemo-opuscar
Directs a short film made entirely in code in one of the Lemo-Opuscar library's named visual styles, from fetching the library through production and delivery.
cat-xierluo/legal-skills
Converts a lawyer's ordinary complaint or a described case into the Supreme People's Court's elements-style Word template, with layout checks on the result.
cat-xierluo/legal-skills
Analyzes raw lecture transcripts for verbal tics, pacing, time use and promise follow-through, with optional slide-by-slide comparison and cross-session tracking.
cat-xierluo/legal-skills
Detects and rewrites machine-sounding patterns in the body text of Chinese articles while keeping the author's facts, headings and legal terms intact.
cat-xierluo/legal-skills
Finds GitHub projects mentioned in articles or screenshots and stars them, tracks updates to your starred repos, and builds an HTML dashboard to browse them.
cat-xierluo/legal-skills
Sets up or incrementally updates AGENTS.md and CLAUDE.md for legal professionals, with a minimal safety baseline and a check that a new session loads and follows the rules.
cat-xierluo/legal-skills
Chinese-language skill that organizes a case file into a multi-role mock trial with judge, parties and clerk, producing a transcript, issue review and a to-strengthen list.
Works with
Categories
视频压缩与静默片段剪切工具。使用 FFmpeg CRF 模式压缩视频,适配屏幕录制/课件场景;支持检测并去除静默静止片段。自动检测硬件与源码率并选择最优编码方案(高码率源走 VideoToolbox 硬件加速,低码率录屏自动改用 x264 CRF 自适应编码)。本技能应在用户需要压缩视频、减小视频大小、去除视频空档时使用。不要用于:视频剪辑、音频提取、格式转换。. Video Compressor is an agent skill from cat-xierluo/legal-skills.
Video Compressor fits situations like: tasks that involve Video production.
Run `npx skills add cat-xierluo/legal-skills --skill video-compressor -a claude-code`. Or copy the skill folder (skills/video-compressor in cat-xierluo/legal-skills) into .claude/skills/video-compressor in your project. Claude Code loads it when a task matches its description.
Run `npx skills add cat-xierluo/legal-skills --skill video-compressor -a codex`. Or copy the skill folder (skills/video-compressor in cat-xierluo/legal-skills) into .agents/skills/video-compressor in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cat-xierluo/legal-skills --skill video-compressor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/video-compressor, .gemini/skills/video-compressor, .github/skills/video-compressor and .opencode/skills/video-compressor in your project.
Going by SKILL.md and its folder, Video Compressor needs Python for the scripts in its folder and the command-line tools its instructions call (python3, brew and ffmpeg). Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Video Compressor is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Video Compressor: Video Understand (calesthio/OpenMontage, 66k stars), HyperFrames Video Entry Point (heygen-com/hyperframes, 59k stars), Video Shots (eternityspring/reelbench-skills, 872 stars) and Mobile Demo Film Editor (superset-sh/superset, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
cat-xierluo (a GitHub user) maintains it in cat-xierluo/legal-skills, which has 717 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on October 8, 2026.
Source: cat-xierluo/legal-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.