video-editing
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVideo Editing
视频剪辑
Edit whatever footage the user supplies. This is a general workbench, not a preset for one visual style. Treat each edit as an editorial system with observed source facts, explicit timing, an appropriate rendering engine, rapid review artifacts, and a validated master.
Set to the absolute directory containing this file. Resolve bundled scripts, references, assets, and examples relative to it.
SKILL_DIRWhen the primary request is to reverse-engineer a finished reference film—shots, camera behavior, sound, titles, pacing, and interview/B-roll grammar—use the adjacent skill first. When the request is to find, vet, or place cutaways against spoken words, use the adjacent skill before bringing its approved manifest into this editing workflow.
analyze-video-editingfind-brollInitialize a neutral edit workspace when the task does not already have one:
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" init /path/to/edit-projectThe generated is a human-and-agent planning artifact, not an executable timeline schema. Rendering remains explicit: an arbitrary FFmpeg graph through , a typed Remotion composition, or both. This avoids pretending a small schema can represent every edit.
editorial-plan.jsonrender-ffmpeg剪辑用户提供的任何素材。这是一个通用工作台,并非针对某一种视觉风格的预设。将每次剪辑视为一套编辑系统,其中包含经观察确认的源素材事实、明确的时间安排、合适的渲染引擎、快速的审阅产物,以及经过验证的母版。
将 设置为包含此文件的绝对目录。相对于该目录解析随附的脚本、参考文档、资产和示例。
SKILL_DIR如果主要请求是逆向分析已完成的参考影片——包括镜头、运镜行为、声音、标题、节奏,以及采访/B-roll 语法——请先使用相邻的 skill。如果请求是查找、审核 cutaways,或根据对白内容为其匹配位置,请先使用相邻的 skill,再将其批准的 manifest 引入此编辑工作流。
analyze-video-editingfind-broll如果任务尚未创建通用编辑工作区,请进行初始化:
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" init /path/to/edit-project生成的 是供人和 Agent 共同使用的规划产物,而不是可执行的时间线 schema。渲染仍需显式定义:可通过 运行任意 FFmpeg graph、使用经过类型定义的 Remotion composition,或将两者结合。这样可以避免假装用一个小型 schema 就能表示所有剪辑方案。
editorial-plan.jsonrender-ffmpegStart by observing
先从观察开始
Never infer duration, dimensions, frame rate, stream order, rotation, color metadata, or audio from filenames. Inspect the real payloads:
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" inspect \
--work-dir /path/to/work \
/path/to/source-a.mp4 /path/to/source-b.movThis writes raw probes, checksums, audio scans, and contact sheets. Add transcription only when speech content helps determine cuts:
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" transcribe \
/path/to/source.mp4 /path/to/work/transcriptReview the sources before making an edit plan. Preserve the evidence for synchronization, speaker identity, orientation decisions, and important source defects.
绝不要根据文件名推断时长、尺寸、帧率、流顺序、旋转信息、色彩元数据或音频属性。必须检查真实的媒体数据:
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" inspect \
--work-dir /path/to/work \
/path/to/source-a.mp4 /path/to/source-b.mov该命令会写入原始探测数据、校验和、音频扫描结果和 contact sheet。仅当语音内容有助于确定剪切点时,才添加转录:
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" transcribe \
/path/to/source.mp4 /path/to/work/transcript制定剪辑计划前先审阅源素材。保留用于同步、说话者身份辨识、方向决策及重要源素材缺陷的证据。
Choose the rendering lane
选择渲染路线
Use the smallest engine that comfortably expresses the edit:
- FFmpeg: trims, concatenation, reframing, speed, audio mixing, normalization, straightforward overlays, masks, fades, color transforms, and final encoding.
- Remotion with React/SVG: designed graphics, titles, captions, callouts, diagrams, data-driven scenes, browser typography, animated layouts, and mixed footage-plus-graphics work.
- Hybrid: render a transparent graphic overlay from Remotion, then composite it with footage in FFmpeg. This is often the cleanest lane.
Do not force a complex graphic into one unreadable FFmpeg expression. Do not create a React project for a simple cut.
Initialize the general motion project when useful:
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" init-motion /path/to/edit-motion
cd /path/to/edit-motion
npm install
npm run devThe starter supports local footage, React layout, inline SVG, full-frame video, and transparent ProRes 4444 overlays. Read references/motion-graphics.md before changing its render contract.
选择能够充分表达剪辑需求的最轻量引擎:
- **FFmpeg:**裁剪、拼接、重新构图、变速、音频混音、标准化、简单叠加、遮罩、淡入淡出、色彩变换和最终编码。
- **Remotion with React/SVG:**设计型图形、标题、字幕、标注、图表、数据驱动场景、浏览器排版、动画布局,以及视频素材与图形混合制作。
- **Hybrid:**从 Remotion 渲染透明图形叠加层,再在 FFmpeg 中与素材合成。这通常是最佳路线。
不要把复杂图形塞进一个难以理解的 FFmpeg 表达式。也不要因简单剪切而创建 React 项目。
在需要时初始化通用动态图形项目:
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" init-motion /path/to/edit-motion
cd /path/to/edit-motion
npm install
npm run dev初始项目支持本地素材、React 布局、内联 SVG、全屏视频和透明 ProRes 4444 叠加层。修改其渲染契约前,请阅读 references/motion-graphics.md。
Design the edit
设计剪辑
Write down:
- delivery aspect ratio, dimensions, frame rate, duration target, and platform;
- source-time selects and output-time placement;
- track ownership: base picture, inserts, graphics, captions, music, effects, and dialogue;
- the purpose of every transition or layout change;
- audio hierarchy and loudness target;
- representative frames and transition ranges to review.
Keep source time and output time distinct. Use stable clip and beat identifiers. Derive frame numbers from one project frame rate instead of scattering timing arithmetic.
Read references/workflow.md for the full loop and references/timeline-and-compositing.md for reusable editorial and compositing principles.
For tested filtergraph building blocks and end-of-file choices, use references/ffmpeg-recipes.md.
记录以下内容:
- 交付画幅比例、尺寸、帧率、目标时长和发布平台;
- 源时间选段和输出时间排布;
- 轨道归属:基础画面、插入镜头、图形、字幕、音乐、音效和对白;
- 每个转场或布局变化的目的;
- 音频层级和响度目标;
- 用于审阅的代表性帧和转场范围。
明确区分源时间和输出时间。使用稳定的片段与节拍标识符。帧号应统一根据一个项目帧率推导,不要在各处进行时间计算。
完整工作流参见 references/workflow.md,可复用的剪辑与合成原则参见 references/timeline-and-compositing.md。
有关经过测试的 filtergraph 构建模块和文件结束选项,请使用 references/ffmpeg-recipes.md。
Work in cheap passes
以低成本逐轮推进
- Make an assembly with correct content and sync.
- Make a low-resolution full draft.
- Generate a contact sheet for rhythm.
- Generate strips around every cut, transition, graphic entrance, and synchronization cue.
- Render stills for composition, typography, safe areas, masks, and color.
- Fix those artifacts before the master.
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" sheet draft.mp4 review/contact.jpg
python3 "$SKILL_DIR/scripts/video_workbench.py" strip \
draft.mp4 review/transition.jpg --center 12.4 --window 1.6
python3 "$SKILL_DIR/scripts/video_workbench.py" stills \
draft.mp4 review/stills --times 0,12.4,27.8For independent quality control, give another agent the brief, source report, draft, contact sheet, and transition strips—not the implementation story—and ask it to report only concrete defects.
- 制作内容与同步正确的组装版。
- 制作低分辨率完整草稿。
- 生成用于检查节奏的 contact sheet。
- 生成每个剪切点、转场、图形入场和同步提示位置周围的 strip。
- 渲染静帧,用于检查构图、排版、安全区域、遮罩和色彩。
- 在制作母版前修复这些审阅产物中发现的问题。
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" sheet draft.mp4 review/contact.jpg
python3 "$SKILL_DIR/scripts/video_workbench.py" strip \
draft.mp4 review/transition.jpg --center 12.4 --window 1.6
python3 "$SKILL_DIR/scripts/video_workbench.py" stills \
draft.mp4 review/stills --times 0,12.4,27.8如需独立质量控制,应将需求说明、源素材报告、草稿、contact sheet 和转场 strip 交给另一个 Agent——不要提供实现过程——并要求其仅报告具体缺陷。
Render safely
安全渲染
For a custom FFmpeg graph, put the graph in a file and describe the render in the generic plan format from references/render-plan.md:
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" render-ffmpeg render-plan.jsonThe workbench renders to a candidate, validates it, and promotes it only after it passes. Existing deliverables are archived reversibly.
For Remotion, typecheck before rendering. Use , , , and ; do not use timers, CSS keyframes, unseeded randomness, or runtime network calls. Render representative stills and ranges before a full master.
useCurrentFrame()interpolate()spring()Sequence对于自定义 FFmpeg graph,请将 graph 写入文件,并按照 references/render-plan.md 中的通用 plan 格式描述渲染:
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" render-ffmpeg render-plan.json工作台会将内容渲染为候选文件,进行验证,并且仅在通过后将其提升为正式交付物。现有交付物会以可逆方式归档。
对于 Remotion,渲染前先进行类型检查。使用 、、 和 ;不要使用定时器、CSS keyframes、未设定种子的随机性或运行时网络调用。完整母版前先渲染代表性静帧和时间范围。
useCurrentFrame()interpolate()spring()SequenceValidate the deliverable
验证交付物
Run validation even when playback looks correct:
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" validate final.mp4 \
--report /path/to/work/validation.json \
--width 1920 --height 1080 --audio-rate 48000 --lufs -16Validation checks the real output payload, full decode, expected geometry and duration when supplied, audio sample rate, loudness, and checksum. Read references/quality-gates.md.
Deliver the master together with the source report, edit plan or source project, review artifacts, render command, validation report, and checksum.
即使播放看起来正确,也必须运行验证:
bash
python3 "$SKILL_DIR/scripts/video_workbench.py" validate final.mp4 \
--report /path/to/work/validation.json \
--width 1920 --height 1080 --audio-rate 48000 --lufs -16验证会检查实际输出数据、完整解码、所提供的预期画面尺寸和时长、音频采样率、响度以及校验和。阅读 references/quality-gates.md。
交付母版时,应同时提供源素材报告、剪辑计划或源项目、审阅产物、渲染命令、验证报告和校验和。
General principles
通用原则
- Let meaning determine transitions; motion without an attention change is decoration.
- Keep the viewer oriented. Establish spatial context before aggressive crops.
- Make text readable at delivery size, not merely on a large monitor.
- Prefer authentic interface recordings over invented screenshots.
- Preserve original dialogue unless replacement was requested.
- Normalize dialogue before the final sample-rate conversion.
- Crossfading differently scaled copies often creates ghosting; use a motivated cut or animate one continuous layer.
- When an overlay source ends early, decide explicitly whether to hold, disappear, or reveal the base.
- Use alpha-capable assets and codecs for reusable graphics; never fake transparency with a guessed background color.
- 让内容含义决定转场;没有带来注意力变化的动效只是装饰。
- 让观众始终明确方位。在进行激进裁切前,先建立空间环境。
- 确保文本在交付尺寸下可读,而不只是在大屏幕上可读。
- 优先使用真实界面录制,而不是伪造截图。
- 除非明确要求替换,否则保留原始对白。
- 在最终采样率转换前对白进行标准化。
- 对不同缩放比例的副本进行交叉淡化通常会产生重影;应使用有叙事动机的剪切,或将一个连续图层制作成动画。
- 当叠加层源素材提前结束时,明确决定是保持、消失还是显露底层画面。
- 可复用图形应使用支持 alpha 的资产和编解码器;绝不要用猜测的背景色伪造透明效果。
Keep solutions general
保持方案的通用性
Do not turn one successful edit into a default style. Preserve reusable mechanics—inspection, timing, compositing, motion systems, review artifacts, and validation—while choosing layouts, graphics, transitions, and sound treatment from the current material and brief.
不要把一次成功的剪辑固化为默认风格。保留可复用的机制——检查、时间安排、合成、动态图形系统、审阅产物和验证——同时根据当前素材和需求说明选择布局、图形、转场及声音处理方式。