Communitygithub.com

AI视频剪辑与节奏控制

将AI生成的片段剪辑成完整的短视频——基于真实观众测试的镜头时长与节奏规则、音乐节拍网格剪辑、为何不要加速AI生成素材、亚像素级摄像机运动替代ffmpeg的zoompan、在调色前先放大原始片段、自然色彩匹配、响度处理,以及一个分析任意视频镜头时长的脚本。适用于使用ffmpeg、Python/OpenCV、Remotion、Premiere或DaVinci Resolve组装AI视频片段时,当剪辑感觉过快或过慢时,或当需要分析参考片的节奏以及放大和色彩匹配AI片段时。

AI视频剪辑与节奏控制 是什么?

这个技能为使用AI生成素材进行视频剪辑的创作者提供了一套基于实证的规则与工作流程。核心内容包括:基于真实观众反馈的镜头时长建议(中位时长约3.5秒,关键笑点4-5秒),严格遵循音乐节拍网格进行剪辑,并明确指出不应通过加速素材来增加“活力”(实测反馈最差)。在技术实现上,技能详细指导了如何使用亚像素级变形(如OpenCV的warpAffine)替代ffmpeg的zoompan以避免像素抖动,以及“先放大再调色”的工作流——先对原始片段进行超分辨率处理(如Topaz类模型),再进行色彩匹配,以保证文字和UI的清晰度。此外,还涵盖了色彩(保持自然偏色,避免过度风格化)、音频(-14 LUFS,真峰值≤-1 dBTP)、字幕(简洁、白色粗体,避免广告感)以及针对社交媒体的优化建议(减少品牌元素以提升自然触达)。技能附带的`shot_stats.py`脚本可量化分析任何视频的剪辑节奏。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/klakix-ai/ai-video-skills/tree/HEAD/skills/ai-video-editing-and-pacing

在你喜欢的 AI 中提问

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

文档

剪辑与节奏控制:AI视频

AI视频片段通常生成为4到10秒的片段,其中只有2到3秒是最佳素材。剪辑决定了视频给人的感觉是沉稳昂贵还是慌乱廉价。

节奏规则(实测数据)

  • 镜头时长 ≥ ~2.6 秒(大约相当于90到100 BPM音乐的一个小节)。第一次剪辑的中位镜头时长为1.29秒,被认为是“太快了,一切一闪而过”;重剪后中位时长为3.54秒(最短2.54秒),获得了认可。
  • 关键笑点给予4到5秒。让揭示时刻充分展现并留出呼吸空间。
  • 社交平台上的故事/喜剧片段总时长30到40秒。我们测量的病毒式参考视频时长在18到24秒之间,每2.4到2.9秒出现一个新笑点;在模仿它们时,保留其结构但不要照搬其速度,如果你的观众偏爱沉稳风格的话。
  • 仅在3到4个关键节点使用闪切/过渡效果,并且要踩在节拍上。其余地方全部使用直切。
  • 例外:当每个剪辑都精准落在节拍上,且每个镜头都承载一个清晰的笑点时,快节奏剪辑是可以接受的(一个得到认可的片段中位时长约为1.9秒)。

使用 scripts/shot_stats.py 来测量你的剪辑和任何参考视频:

python scripts/shot_stats.py reference_reel.mp4
python scripts/shot_stats.py my_cut.mp4 --threshold 0.3 --list

绝不要加速AI生成的素材

将片段加速1.5倍到1.7倍来“增加活力”,在我们所做的所有修改中,得到了最差的反馈。使用每个片段中最平稳的部分,以正常速度播放(ai-video-camera-language 中有一个脚本可以找到它)。慢动作渐变是可以的。

选择片段的最佳秒数

  1. 每0.5秒生成一帧条带。
  2. 丢弃:逻辑错误、标志/徽章帧、面部漂移、模型自身的片段中间剪辑。
  3. 偏好那些包含动作节拍且摄像机速度最低的窗口。
  4. 在动作(转身、跨步、手势)或节拍上进行剪辑;不要在眨眼中间剪辑。

节拍网格

  • 检测BPM,然后通过拟合网格进行验证;自动速度估算通常偏差几个BPM(一个轨道检测为129 BPM,实际是127)。
  • 找到小节开始:4拍周期中低频能量最强的相位。
  • 在小节开始或节拍上进行剪辑;在小节开始处用约12毫秒的交叉淡入淡出连接音乐段落。
  • 将高潮(payoff)放在鼓点(drop)上;让音乐在一个关键时刻停止(沉默也是一种剪辑)。
  • 使用生成的或有授权的音乐。商业歌曲在Instagram、TikTok和YouTube上会被静音或声称版权,并且不能用于广告。

后期添加的摄像机运动

优先让模型生成运动(参见 ai-video-camera-language)。如果必须在后期进行推近、急速变焦或防抖重构图:

  • 使用亚像素级变形(OpenCV的 warpAffine 配合三次插值)和缓动曲线实现。ffmpeg的 zoompan 将位置四舍五入到整像素,因此缓慢变焦会产生闪烁。
  • 在放大后的片段上执行此操作,而不是在原始的480p片段上。
  • 我们使用的运动:慢推/拉、向跟踪点(如手机屏幕)推进、一个踩在节拍上的急速变焦(在9帧内从1.08倍到1.10倍再回到1.0倍)、一个带径向模糊的4帧缩放穿透、一个2帧的颜色分离。

先放大,后调色

  1. 首先将原始片段(在添加颗粒、色彩、叠加层之前)使用视频放大器(Topaz类模型)放大到1080p。它对于纹理、眼睛、皮肤和金属的锐化效果远超简单的缩放。一个5秒的片段在2026年底以1080p放大成本约为0.04美元。
  2. 然后在1080p下进行色彩匹配、添加颗粒和叠加层,保持文字和用户界面清晰。
  3. 上传限制:如果你的放大器限制每小时的上传数量,可以将相同尺寸的片段连接起来(之间留4帧黑场)组成小于等于30秒的组,一次放大,然后按帧号拆分回去。确保帧数保持完整。
  4. 一些放大器返回的尺寸略有不同(例如4:3的片源返回1452x1080);在剪辑软件中裁剪到你需要的交付尺寸。

色彩

  • 保留模型的自然色彩。以半强度进行片段间的相互匹配。
  • 饱和度1.0,对比度约1.03,柔和的亮部肩部曲线,非常轻微的颗粒和暗角。
  • 不要使用青橙调色、不要提升黑色电平、不要使用扩散/辉光堆叠:这些被称为“窒息感”。
  • 在确定一个调色方案之前,始终与原始帧进行A/B对比。

音频后期处理

  • 最终集成响度-14 LUFS,真峰值 ≤ -1 dBTP(参见 ai-video-dialogue-and-voice/scripts/loudness.py)。
  • 在鼓点和最终节拍处添加低频次低音(55到32 Hz),能在使用耳机的手机上带来强烈听感,且成本为零。
  • 保留模型自带的背景环境音,叠加在音乐下方以增强真实感。

文字、字幕和品牌

  • 字幕:白色、加粗,每次显示1到3个词,使用一种强调色。在天空背景上添加轮廓。
  • 对于社交媒体的自然触达,那些让视频看起来像广告的元素(大品牌介绍、模型/品牌署名行、长黑底结束卡)在我们的小规模测试中与较低的自然触达率相关(3个品牌视频停留在初始测试池中,而相似素材的无品牌剪辑版本则走得更远)。将品牌元素限制在结尾的一个小标记,或完全不要,并将鸣谢放在视频描述中。
  • 对于横屏(4:3/16:9)交付,请为那个画幅重新定位字幕和结束卡;不要重复使用竖屏布局。

ffmpeg 常见陷阱

  • xfade 需要匹配的时间基:在两个输入上都添加 settb=AVTB。
  • 当从Python启动ffmpeg时,传入 -nostdin,否则它可能会挂起等待输入。
  • aecho 的第二个参数是整个信号的输出增益(0.25 = -12 dB),不仅仅是回声的增益。
  • RMS匹配不能匹配感知响度;请使用LUFS。
  • Windows:如果脚本将在Linux上运行,请使用LF行结束符编写脚本。

Individual skills in this repo

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

3d-previs-to-ai-video

Control AI video camera paths and choreography with a 3D blockout (previs) - build a grey-box scene in Blender, three.js or any 3D tool, animate a camera, render a reference video and pass it with character/vehicle/location reference images to Seedance 2.x reference mode (@Video1 + @Image map). Covers blockout rules, one-move-per-shot camera paths, transformations planned inside the blockout, contact-sheet checks, in-vehicle cameras and realism wording. Use for FPV flights, car transformations, complex choreography, exact camera moves, "Seedance with previsualization in Blender", or when text prompts cannot get the camera move right.

ai-video-camera-language

Camera angles, lenses and camera movement for AI video generation (Seedance, Kling, Veo, Sora, MiniMax/Hailuo, Runway, Wan, Luma). A tested library of shot types with copy-paste prompt wording, rules for camera speed, the snap-zoom-and-hold move, what to avoid (whip pans, shake, speed ramps on generated footage), and a script that measures camera speed with optical flow so you can pick the calmest part of a clip. Use when writing camera directions in a video prompt, choosing shot types for a storyboard, when a generated clip feels too fast, shaky or lifeless, or when someone asks about camera angles, camera moves or cinematography for AI video.

ai-video-prompting

Write prompts for AI video models that follow instructions precisely - Seedance 2.0 / 2.5 (text, image, multi-reference with @Image/@Video/@Audio, edit, extend), Kling, Veo, MiniMax/Hailuo, Runway, Wan and Sora. Covers prompt structure, second-by-second timelines, reference maps, negative wording, length limits, when to turn off prompt enhancers, and model-specific quirks we measured. Use when writing or fixing a text-to-video or image-to-video prompt, a Seedance reference prompt, when a model ignores parts of the prompt, or when someone asks how to prompt Seedance, Kling or Veo.

ai-video-realism

Make AI images and AI video look like real footage instead of glossy "AI slop". Device-based realism (describe the phone, GoPro, broadcast camera that shot it and its flaws), what words push models toward CGI, real-photo references for locations and vehicles, key frames with photographic image models, natural colour instead of heavy film looks, and absurd-but-real comedy. Use when output looks fake, plastic, too perfect, too cinematic or like a video game, when someone asks for "hyper-realistic", "photorealistic", "looks like a real video", or when planning key frames for an AI video.

ai-video-shot-planning

Plan a multi-shot AI video (Seedance, Kling, Veo, MiniMax/Hailuo, Runway, Wan) before spending money on generation. Turns an idea into a shot list with per-shot action beats, camera move, scene logic, costume and reference images, key frames, a cheap test plan and a cost estimate. Use when someone asks to make an AI short film, reel, ad, music video, story or "viral video" with more than one shot, asks for a storyboard or shot list, or is about to generate several clips in a row.

viral-ai-video-formats

Proven short-form formats for AI video on Instagram Reels, TikTok and YouTube Shorts, broken down from frame-by-frame analysis of viral AI reels - "history + one modern object", delayed reveal ("is this real?"), macro proof, POV-from-a-bystander-phone, spoken comment-to-DM call to action - with measured hook timing, shot length, duration, aspect ratio, music and AI-label rules. Use when planning an AI reel or short meant for reach, picking a concept, writing hooks and CTAs, or diagnosing why an AI video did not reach Explore / For You.

相关技能