Communitygithub.com

DomCamillo2/VideoEditting

将照片或视频剪切到可听音乐节拍、弱拍和乐句变化上,或诊断感觉节拍不准的编辑。适用于音乐驱动的时机和过渡;不要将波形峰值或自动标记等同于经核实的音乐重音。

VideoEditting 是什么?

该技能旨在帮助开发者和视频编辑者根据音频文件的音乐节拍、弱拍和乐句变化进行精确切割,适用于音乐驱动的视频过渡和时序调整。它提供了从识别音乐结构(如引子、副歌、桥段)到构建选定标记列表、正确映射音频时间线、量化剪辑边界、调整保持时长以及设置过渡效果的完整工作流程。同时,它强调了不要将波形峰值或自动检测的瞬态信号等同于核实的音乐重音,必须通过实际聆听验证。该工具支持包括Claude Code、Cursor、Codex在内的多种平台,通过命令行工具(如`beat_candidates.py`和`beat-report`)辅助分析,但强调最终决策依赖于人耳判断。最终交付物包括节拍表和切割表,确保帧对齐、音乐正确性和编辑质量三者分离评价。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/DomCamillo2/VideoEditting/tree/HEAD/.agents/skills/video-beatcut

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

按预期节拍剪切

输入:实际音频文件、选定的节选、目标fps、当前编辑和期望的能量。如果可用工具无法听到音频,则进行临时分析并明确保留聆听验证的开放性。

  1. 识别引子、主歌、副歌/高潮、桥段和结尾。估计速度和相位,然后在开始、中间和结尾附近检查强力的底鼓/军鼓和弱拍。注意半速/倍速、前奏音、切分音和变化的速度。起始点检测器找到的是瞬态信号,不一定是节拍或小节开始。
  2. 构建一个选定的标记列表,而不是在每个峰值处都剪切。记录源文件秒数、时间线秒数、重音类型、置信度以及是否实际听过。偏爱乐句变化用于章节/歌曲变化,以及最强图像用于音乐峰值。
  3. 正确映射修剪后的音频。正常速度下:timeline_seconds = audio_start + source_seconds - source_in。恒定播放速率r时,将源文件偏移除以r。对于变速,使用实际时间映射,而不是单个BPM。包括源文件修剪、重复和歌曲交叉淡入淡出。
  4. 对每个绝对边界量化一次:对于非负时间,frame = floor(seconds * fps + 0.5)。保留有理速率,例如30000/1001。在尽可能的情况下,通过舍入使用精确的有理运算,包括半帧平局。镜头长度是下一个边界减去当前边界;不要重复舍入增量节拍长度。存储fps和整数帧边界。
  5. 根据故事和能量变化保持时间:几个节拍用于氛围,较短的乐句用于动作。优先选择可读的瞬间,而不是机械地剪切每个节拍。将低于0.5秒的片段视为有意的例外并加以解释,而不是默认的蒙太奇策略。
  6. 设置过渡,使其感知冲击落在预期的重音上。剪切、闪光峰值、遮罩揭示或落地可能有不同的锚定帧。重叠过渡会缩短总时长;重新计算后续边界。叠加不会缩短基础轨道。
  7. 预览实际的编码片段与音乐,包括关键剪切前后几秒钟。聆听相位错误、歌曲编辑、速度变化和掩盖重音的效果。在长段落的结尾再次检查以捕捉漂移。不要将数值对齐视为独立的聆听测试。

需要交付的证据

保存包含song_id、source_seconds、timeline_seconds、target_frame、accent_type、confidence、listening_status的节拍表;包含cut_frame、matched_marker、delta_ms、intentional_offset_reason的剪切表;以及代表性的审查范围。

将帧对齐(最近帧;理论量化误差最多半帧)与音乐正确性(所选声音是预期的重音)和编辑质量(镜头保持足够长)分开。一个标记完美的剪切仍然可能感觉不对。歌曲应以乐句结尾、有意的尾音/淡出或合适的真实声音结束。

使用VideoEditting仓库,tools/beat_candidates.py提供局部频谱起始点和带源文件到时间线映射的速度假设。将这些视为未验证的候选,选择可听的重音,然后对选定的标记使用tools/editing.py beat-report。检测器从不确认弱拍。该仓库是可选的。

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

DomCamillo2/VideoEditting

Mix music, dialogue, authentic location sound and comedic sound effects for an edit. Use for ducking, song transitions, J/L cuts, intelligibility and clean endings; not as a substitute for beat detection or actual listening.

DomCamillo2/VideoEditting

Establish a film or reel brief, including tone, humor, travel type, route and relevant vehicle details. Use when these choices are missing or the user changes direction; skip for a small revision with an established brief.

DomCamillo2/VideoEditting

Reconstruct capture order, trip chapters and road/ferry map segments from photo/video metadata and visible evidence. Use when travel chronology or route labels matter; do not invent exact dates or transport links from filenames alone.

DomCamillo2/VideoEditting

Add playful video gags such as person cutouts, spins, loading effects, face-zoom transitions or tracked scooter flames. Use when humor is requested in the current brief; do not add unsolicited meme edits to a serious film.

DomCamillo2/VideoEditting

Prepare a reviewable preview, verify the final encoded video and hand off a versioned editing project. Use before export or when diagnosing black borders, crop errors, missing assets, drift, color or audio problems; do not claim creative QA from a successful build alone.

DomCamillo2/VideoEditting

Fit portrait photos or videos into landscape edits, or reframe mixed aspect ratios with a blurred copy of the same media. Use to prevent black borders and cropped faces or bodies; not for privacy anonymization or sharpening a blurry subject.

DomCamillo2/VideoEditting

Cull and rank photos or video excerpts, remove repetitive selections, and compare blurry versus sharp takes. Use for bursts, near-duplicates, contact sheets and best-moment selection; never delete source media or judge focus only from a blurred background.

DomCamillo2/VideoEditting

Onboard a new user to the VideoEditting toolkit by choosing all or selected editing skills, assessing useful MCP integrations and setting up approved tools before the film brief. Use for first-time adoption or setup changes, not every editing revision or repository maintenance task.

相关技能