Communitygithub.com

Dudu 粗剪工具包

用于 Dudu(AI 宣传片导演)第 7 阶段,测量每个镜头的实际运动区域,将每个镜头裁剪到动作发生的位置,对问题与解决方案镜头进行色彩分级,并通过 tools/build_cut.py 使用 ffmpeg 组装粗剪。

Dudu 粗剪工具包 是什么?

该技能是 AI 宣传片导演 Dudu 工作流程中的第 7 阶段——粗剪,解决了生成式 AI 视频常见的“节奏缓慢”问题。它首先通过 `tools/motion_report.py` 量化运动强度,识别出每个镜头中真正有动作的片段(通常仅 1.5–4 秒),从而避免使用完整的 5 秒静态片段。随后,它指导用户根据镜头类型选择剪辑节奏:开篇和结尾可保留更长,问题部分加快节奏以制造紧张感,高潮处可缩短至 1 秒以下。最后,通过 `project/cut.json` 配置并运行 `python tools/build_cut.py project/cut.json`,在剪辑中直接完成色彩分级(问题部分使用冷色调,转向后使用暖色调),输出标准的 H.264 1080p30 视频。该技能适用于任何基于 ffmpeg 和 Python 的视频项目,不依赖特定平台,强调手动决策与自动化工具结合。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/EyalZameret/Dudu-Director-Video-kit/tree/HEAD/.claude/skills/dudu-edit

在你喜欢的 AI 中提问

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

文档

Dudu:粗剪

Generators 返回固定 5 秒的片段。完整播放时感觉节奏很慢:在我们的第一个剪辑中,审片人说“剪辑节奏太慢了”,测量显示 52 秒中只有约 30 秒包含实际动作。

1. 测量

python tools/motion_report.py project/clips/*.mp4 每半秒输出一次运动量:

  • 0.1–0.5:静止;1–3:缓慢镜头移动;3+:有动作。 对于数字无法捕捉的时刻(例如小灯颜色变化),裁剪并平铺该区域: ffmpeg -i shot10.mp4 -vf "fps=2,crop=360:200:X:Y,tile=5x2" -frames:v 1 detail.png(imageio-ffmpeg 安装的 ffmpeg 路径:python -c "import imageio_ffmpeg; print(imageio_ffmpeg.get_ffmpeg_exe())")。

2. 决定剪辑点

  • 查看 library/INDEX.md,找到客户期望的节奏参考,并匹配其指标(每 10 秒的剪切次数、中位数镜头时长)。
  • 节奏是曲线,而非恒定值(参见 library/study/V5AFQaEbHQU):平静的开场应当保持,问题部分压缩,高潮片段需切至 1 秒以下,转折和 CTA 则让呼吸恢复。
  • 只保留有动作的部分。大多数镜头最终长度在 1.5–4 秒。开篇和 CTA 可以更长(需要展示 Logo 和旁白台词)。
  • 问题部分使用更快的剪切来营造紧张感;转折处则让呼吸恢复。
  • 在出现画面瑕疵(面部变化、变形)之前剪切。用该镜头的关键帧加缓慢缩放替换失败镜头。
  • 对话可以延续到下一个镜头(J/L 剪切),因此长台词不一定要对应长镜头。

3. 构建

编写 project/cut.json(参见 project/cut.example.json),然后运行 python tools/build_cut.py project/cut.json。

  • 在剪辑中直接调色:问题镜头使用 cold(冷色),从转折开始使用 warm(暖色)。保持调色柔和,不要将蓝色推入阴影。
  • 输出格式:H.264 [email protected],yuv420p,bt709,1080p30。如果有人用旧版 Windows Media Player 看到蓝色色块,那是播放器的解码器问题;可通过提取一帧并用 eq=saturation=4 提高饱和度来验证。如果提取的帧是干净的,则文件本身没有问题。
  • 使用 python tools/contact_sheet.py project/out/roughcut-vN.mp4 --every 2.5 --cols 6 检查结果。

4. 下一步:声音

先锁定画面,然后加载 dudu-sound(第 8 阶段):一条连续的音乐轨道、效果和配音,使用 tools/mix_audio.py 混合。每个镜头单独生成的音频无法合并成一条轨道。

Individual skills in this repo

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

EyalZameret/Dudu-Director-Video-kit

Used by Dudu (AI promo video director) to drive Gemini (Nano Banana images, Veo video), ChatGPT (GPT Image) and Kling (image-to-video) in a Playwright browser the owner logged into. Contains the working click paths, upload and download recipes, and the fixes for every failure we hit.

EyalZameret/Dudu-Director-Video-kit

Used by Dudu (AI promo video director) for stage 6. Picks the animation model with a one-shot A/B test, writes image-to-video motion prompts for Kling (and Veo / Seedance), and reviews every clip with contact sheets and a motion report.

EyalZameret/Dudu-Director-Video-kit

Used by Dudu (AI promo video director) at every gate. Checks script claims against project/product.md, structure and pacing, and reviews images and clips with keep/fix/regenerate decisions into project/qa-notes.md.

EyalZameret/Dudu-Director-Video-kit

Used by Dudu (AI promo video director) for stages 1-2. Interviews the owner for the brief and writes a 12-shot promo script (problem-agitate-solve, about 70/30 problem/solution, minimal dialogue, one CTA) into project/brief.md and project/script.md.

EyalZameret/Dudu-Director-Video-kit

Switch this session to Dudu (דודו), the AI promo video director, until the owner leaves Dudu mode.

EyalZameret/Dudu-Director-Video-kit

Used by Dudu (AI promo video director) after the picture cut. Designs the sound (cue sheet synced to cuts), generates music, effects and voice (Gemini, TTS, recordings, free libraries), and mixes it onto the cut with tools/mix_audio.py into a finished film.

EyalZameret/Dudu-Director-Video-kit

Used by Dudu (AI promo video director) to learn from a reference video link (YouTube and most video sites). Downloads it for private analysis, detects every cut, reviews one frame per shot, writes a structured analysis into library/study/<id>/analysis.md and updates library/INDEX.md, then deletes the video. Use when the owner shares a link and says "learn from this", "study this", "do it like this", or asks for a style taken from an ad.

EyalZameret/Dudu-Director-Video-kit

Used by Dudu (AI promo video director) for stages 3-5. Builds the style and character bible, the 12-shot list, reference sheets, location frames and the 12 keyframe prompts for Gemini / Nano Banana or ChatGPT / GPT Image, and reviews every generated image.

相关技能