Communitygithub.com

DansiDanutz/视频编辑器

用于剪辑、结构化和增强真实视频素材的 AI 辅助视频编辑工作流。涵盖从原始素材到 FFmpeg、Remotion、ElevenLabs、fal.ai,以及最终在 Descript 或 CapCut 中精修的完整流程。当用户想要编辑视频、剪辑素材、创建 vlog 或制作视频内容时使用。

视频编辑器 是什么?

该技能定义了一个完整的 AI 辅助视频编辑工作流,重点在于“编辑,而非生成”。它明确将视频制作分解为六个有序层级:从原始素材捕获(Screen Studio 或原始文件)、AI 驱动的组织与结构规划(Claude/Codex)、确定性剪辑(FFmpeg)、可编程合成(Remotion)、按需生成资产(ElevenLabs 文字转语音、fal.ai 音乐与音效),到最终在传统编辑器(Descript 或 CapCut)中由人进行创意精修。核心价值在于“压缩”——利用 AI 高效地组织和剪辑现有高质量素材,而非从头生成内容。每个工具都有明确职责,不可越俎代庖。该技能还涵盖了社交媒体重制、场景检测、静音自动剪辑,以及通过 FFmpeg 进行批处理操作。它支持所有主流平台,并强调“品味是最后一层”:AI 清除重复性工作,最终创意决策由人完成。

兼容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/DansiDanutz/Video-Editor/tree/HEAD/.claude/skills/video-editing

在你喜欢的 AI 中提问

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

预览

来自技能 README

文档

视频编辑

AI 辅助的真实视频素材编辑。不是通过提示词生成。快速编辑现有视频。

何时激活

  • 用户想要编辑、剪辑或结构化视频素材
  • 将长录制内容转为短视频
  • 从原始素材制作 vlog、教程或演示视频
  • 为现有视频添加叠加层、字幕、音乐或画外音
  • 为不同平台(YouTube、TikTok、Instagram)重新构图视频
  • 用户说“编辑视频”、“剪辑这段素材”、“做个 vlog”或“视频工作流”

核心论点

AI 视频编辑的用处在于,当你停止让它创建整个视频,而是开始用它来压缩、结构和增强真实素材时。价值不在于生成,而在于压缩。

工作流

对于基于参考的测量驱动工作,先将 taste-distillation 链入 taste-application,然后返回此处进行编辑和最终输出审查。独立的 taste 技能可以使用现有素材;生成是可选的。

在对实时编辑器或 DAW 进行更改之前,请保存一个版本化的项目检查点并验证文件是否存在。更改后再保存并验证另一个检查点。API 回读只能证明当前内存状态,而不能证明文件已保存。在手写交接中,请将渲染的媒体、可编辑项目和创意批准作为独立状态保存。

对于 MIDI 驱动的音频,请检查音高与接收机架的音符映射并试听结果;成功创建片段仍可能产生静音。对于重构项目,请通过原生加载和保存进行验证,按时间线顺序对事件排序,验证样本链接和静音状态,然后检查并试听确切的导出音频以发现无意的静音。仅 XML 解析并不能证明 DAW 接受了每个片段或产生了可听输出。在调用较新的命令之前,请检查桥接器的能力握手。不要将上传或训练数据遥测作为创意任务的副作用启用;当同意或能力缺失时,请使用受支持的本地控制路径。

Screen Studio / 原始素材
  → Claude / Codex
  → FFmpeg
  → Remotion
  → ElevenLabs / fal.ai
  → Descript 或 CapCut

每一层都有特定任务。不要跳过任何层。不要试图让一个工具包办一切。

第 1 层:捕获(Screen Studio / 原始素材)

收集源材料:

  • Screen Studio:用于应用演示、编码会话、浏览器工作流程的精美屏幕录制
  • 原始相机素材:vlog 素材、访谈、活动录制
  • 通过 VideoDB 的桌面捕获:具有实时上下文的会话录制(参见 videodb 技能)

输出:准备进行整理的原始文件。

第 2 层:组织(Claude / Codex)

使用 Claude Code 或 Codex 进行:

  • 转录和标注:生成转录稿,识别主题和话题
  • 规划结构:决定保留什么、剪掉什么、什么顺序有效
  • 识别无效部分:寻找停顿、偏离主题、重复拍摄
  • 生成编辑决策列表:用于剪辑的时间戳、要保留的片段
  • 搭建 FFmpeg 和 Remotion 代码:生成命令和合成
示例提示:
“这是 4 小时录制的转录稿。找出最精彩的 8 个片段,用于制作 24 分钟的 vlog。给出每个片段的 FFmpeg 剪辑命令。”

这一层关乎结构,而非最终创意品味。

第 3 层:确定性剪辑(FFmpeg)

FFmpeg 处理枯燥但关键的工作:分割、修剪、拼接和预处理。

按时间戳提取片段

ffmpeg -i raw.mp4 -ss 00:12:30 -to 00:15:45 -c copy segment_01.mp4

根据编辑决策列表批量剪辑

#!/bin/bash
# cuts.txt: start,end,label
while IFS=, read -r start end label; do
  ffmpeg -i raw.mp4 -ss "$start" -to "$end" -c copy "segments/${label}.mp4"
done < cuts.txt

拼接片段

# 创建文件列表
for f in segments/*.mp4; do echo "file '$f'"; done > concat.txt
ffmpeg -f concat -safe 0 -i concat.txt -c copy assembled.mp4

创建代理文件以加速编辑

ffmpeg -i raw.mp4 -vf "scale=960:-2" -c:v libx264 -preset ultrafast -crf 28 proxy.mp4

提取音频用于转录

ffmpeg -i raw.mp4 -vn -acodec pcm_s16le -ar 16000 audio.wav

标准化音频电平

ffmpeg -i segment.mp4 -af loudnorm=I=-16:TP=-1.5:LRA=11 -c:v copy normalized.mp4

第 4 层:可编程合成(Remotion)

Remotion 将编辑问题转化为可组合的代码。用于处理传统编辑器难以处理的情况:

何时使用 Remotion

  • 叠加层:文本、图像、品牌标识、下三分之一
  • 数据可视化:图表、统计、动画数字
  • 动态图形:转场、解释性动画
  • 可组合场景:跨视频的可复用模板
  • 产品演示:带注释的屏幕截图、UI 高亮

基本的 Remotion 合成

import { AbsoluteFill, Sequence, Video, useCurrentFrame } from "remotion";

export const VlogComposition: React.FC = () => {
  const frame = useCurrentFrame();

  return (
    <AbsoluteFill>
      {/* 主素材 */}
      <Sequence from={0} durationInFrames={300}>
        <Video src="/segments/intro.mp4" />
      </Sequence>

      {/* 标题叠加层 */}
      <Sequence from={30} durationInFrames={90}>
        <AbsoluteFill style={{
          justifyContent: "center",
          alignItems: "center",
        }}>
          <h1 style={{
            fontSize: 72,
            color: "white",
            textShadow: "2px 2px 8px rgba(0,0,0,0.8)",
          }}>
            AI 编辑技术栈
          </h1>
        </AbsoluteFill>
      </Sequence>

      {/* 下一个片段 */}
      <Sequence from={300} durationInFrames={450}>
        <Video src="/segments/demo.mp4" />
      </Sequence>
    </AbsoluteFill>
  );
};

渲染输出

npx remotion render src/index.ts VlogComposition output.mp4

有关详细模式和 API 参考,请参阅 Remotion 文档。

第 5 层:生成的资产(ElevenLabs / fal.ai)

只生成你需要的。不要生成整个视频。

使用 ElevenLabs 生成画外音

import os
import requests

resp = requests.post(
    f"https://api.elevenlabs.io/v1/text-to-speech/{voice_id}",
    headers={
        "xi-api-key": os.environ["ELEVENLABS_API_KEY"],
        "Content-Type": "application/json"
    },
    json={
        "text": "你的旁白文本",
        "model_id": "eleven_turbo_v2_5",
        "voice_settings": {"stability": 0.5, "similarity_boost": 0.75}
    }
)
with open("voiceover.mp3", "wb") as f:
    f.write(resp.content)

使用 fal.ai 生成音乐和音效

使用 fal-ai-media 技能进行:

  • 背景音乐生成
  • 音效(ThinkSound 模型用于视频到音频)
  • 转场音效

使用 fal.ai 生成视觉元素

用于不存在的插入镜头、缩略图或 B 卷:

generate(app_id: "fal-ai/nano-banana-pro", input_data: {
  "prompt": "专业科技 vlog 缩略图,深色背景,屏幕上显示代码",
  "image_size": "landscape_16_9"
})

VideoDB 生成音频

如果配置了 VideoDB:

voiceover = coll.generate_voice(text="在此处输入旁白", voice="alloy")
music = coll.generate_music(prompt="编码 vlog 的背景 lo-fi 音乐", duration=120)
sfx = coll.generate_sound_effect(prompt="微妙的嗖嗖转场音效")

第 6 层:最终精修(Descript / CapCut)

最后一层是人的部分。使用传统编辑器进行:

  • 节奏:调整感觉太快或太慢的剪辑
  • 字幕:自动生成,然后手动清理
  • 调色:基本校正和氛围设定
  • 最终音频混音:平衡语音、音乐和音效电平
  • 导出:特定平台的格式和质量设置

这是品味所在。AI 清除了重复性工作。你来做出最终决定。

社交媒体重制

不同平台需要不同的宽高比:

平台宽高比分辨率
YouTube16:91920x1080
TikTok / Reels9:161080x1920
Instagram 信息流1:11080x1080
X / Twitter16:9 或 1:11280x720 或 720x720

使用 FFmpeg 重制

# 16:9 到 9:16(中心裁剪)
ffmpeg -i input.mp4 -vf "crop=ih*9/16:ih,scale=1080:1920" vertical.mp4

# 16:9 到 1:1(中心裁剪)
ffmpeg -i input.mp4 -vf "crop=ih:ih,scale=1080:1080" square.mp4

使用 VideoDB 重制

from videodb import ReframeMode

# 智能重制(AI 引导的主体跟踪)
reframed = video.reframe(start=0, end=60, target="vertical", mode=ReframeMode.smart)

场景检测和自动剪辑

FFmpeg 场景检测

# 检测场景变化(阈值 0.3 = 中等灵敏度)
ffmpeg -i input.mp4 -vf "select='gt(scene,0.3)',showinfo" -vsync vfr -f null - 2>&1 | grep showinfo

静音检测以自动剪辑

# 查找静音片段(用于剪掉冷场)
ffmpeg -i input.mp4 -af silencedetect=noise=-30dB:d=2 -f null - 2>&1 | grep silence

高亮片段提取

使用 Claude 分析转录稿和场景时间戳:

“根据这份带有时间戳的转录稿和这些场景变化点,找出 5 个最适合社交媒体的 30 秒精彩片段。”

每种工具的最佳用途

工具优势劣势
Claude / Codex组织、规划、代码生成不是创意品味层
FFmpeg确定性剪辑、批处理、格式转换无可视化编辑界面
Remotion可编程叠加层、可组合场景、可复用模板非开发者学习曲线较陡
Screen Studio即时精美屏幕录制仅限屏幕捕获
ElevenLabs语音、旁白、音乐、音效不是工作流的中心
Descript / CapCut最终节奏、字幕、精修手动操作,不可自动化

关键原则

  1. 编辑,而非生成。 此工作流程用于剪辑真实素材,而非根据提示创建素材。
  2. 先结构,后风格。 在第 2 层先确定故事,然后再接触任何视觉元素。
  3. FFmpeg 是支柱。 虽然枯燥但至关重要。长素材在此处变得易于管理。
  4. Remotion 实现可重复性。 如果同一件事要做不止一次,就把它做成 Remotion 组件。
  5. 选择性生成。 仅对不存在的资产使用 AI 生成,不要什么都生成。
  6. 品味是最后一层。 AI 清除重复性工作。你来做出最终创意决定。

原生 Fusion 预设

ITO Production v1 提供了克制的发光高光、对立的 RGB 空间偏移以及亮度/边缘光晕。在双源视觉审查后,传入确切的文件,进行原生导入、保存/重新打开和简短的运动渲染检查。这些是需要针对镜头进行审查的起始值;光晕不会检测或跟踪主体。

ITO V28 包含已保存的、经原生验证的 Fusion 图片段和一个幂等 Lua 安装器。这些是技术兼容性示例,不是推荐的生产默认值:其文档中记录的视觉限制需要在使用前进行调优和品味审查。请参阅包来源,了解先前导入和渲染检查的范围。

相关技能

  • fal-ai-media — AI 图像、视频和音频生成
  • videodb — 服务器端视频处理、索引和流媒体
  • content-engine — 平台原生内容分发

Individual skills in this repo

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

DansiDanutz/Video-Editor

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated motion-first unit, including an animated title. Route fresh creation through hyperframes before using this skill.

DansiDanutz/Video-Editor

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

DansiDanutz/Video-Editor

Use when audio already placed in a HyperFrames composition needs to be mixed: fade-in/fade-out, crossfade, track gain or volume, volume automation, ducking, a music bed that fights a voiceover (voiceover carve), effects on a track (EQ, compressor, limiter, gate, saturation, delay, reverb, chorus, phaser, bitcrush), automation envelopes drawn on a track's volume or any effect parameter, or one submix bus carrying a chain, a fader and an automation clock for several tracks at once (`<hf-audio-group>`). Don't use for sourcing or generating audio — finding BGM, SFX, or making a voiceover is `/media-use`. Don't use for clip timing or track layout, which is `/hyperframes-core`.

DansiDanutz/Video-Editor

Use the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish, cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, timeline, history, docs, benchmark, telemetry, transcribe, auth, tts, and remove-background. Also use when diagnosing build or render failures. validate, inspect, and layout are deprecated aliases; use check. Covers local, HeyGen-hosted cloud, AWS Lambda, and Google Cloud Run rendering.

DansiDanutz/Video-Editor

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

DansiDanutz/Video-Editor

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

DansiDanutz/Video-Editor

Use when a HyperFrames composition needs a punch-in, punch-out, zoom, reframe, Ken Burns treatment, camera move, visual match/whip handoff, or other seek-safe 2D/3D keyframes; also for GSAP, CSS keyframes, Anime.js, WAAPI, FLIP, paths, masks, SVG morph/draw, text trails, 3D depth, or `hyperframes keyframes` diagnostics. Don't use for broad scene strategy, brand design, media sourcing, captions, or general video planning.

DansiDanutz/Video-Editor

Search, install, and wire registry blocks and components into HyperFrames compositions. Use BEFORE hand-building any named visual — whenever a brief, a user, or a storyboard names a look, effect, treatment, or transition such as CRT scanlines, glitch, chromatic aberration, film grain, a shimmer sweep, a chart, a code or terminal window, a map, or a confetti burst — because roughly 400 hosted items already cover many of them and the search ranks all of them with nothing installed, no project, and no account. Also use when running hyperframes add or hyperframes catalog, installing one item or every block matching a tag, wiring an installed item into index.html, or working with hyperframes.json. Covers discovery, install locations, block sub-composition wiring, component snippet merging, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

DansiDanutz/Video-Editor

Mandatory entry point: read this first for any request to make, create, edit, animate, or render a video, animation, or motion graphic, including a promo, explainer, captioned clip, title card, overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing footage, or music. It resumes project state, captures intent when applicable, selects and installs the owning workflow, and routes domain capabilities. HyperFrames is the default output framework unless the user explicitly chooses another framework for the deliverable or asks only to record a browser session.

DansiDanutz/Video-Editor

Use when building or editing a HyperFrames project that people open in Studio: how the timeline should be laid out so it reads well (one caption track, one element kind per track, every scene a sub-composition) and where captions and key content may sit (safe zones). Don't use for how to perform an individual edit (split, trim, retime, volume, copy, swap): that is `creator-editing-recipes.md` in `/hyperframes-core`.

DansiDanutz/Video-Editor

Agent Media OS, the single skill for every media need in a HyperFrames project. Resolve BGM, SFX, image, icon, brand logo, voice, color grade, or LUT into a frozen local file or paste-ready block + ledger record (one verb, `resolve`); generate via TTS / music / image models when the catalog misses; produce voiceover, transcription, captions, and background removal through one shared audio engine; operate on media (cut / reframe / transform); and reuse assets across projects. Also use for vague feedback that real footage looks dark, flat, boring, should feel retro/camcorder/print/ASCII, needs privacy, or needs a media reveal.

DansiDanutz/Video-Editor

Turn a product or marketing URL, pasted script, or brief into a product launch / promo video — SaaS promos, feature reveals, product demos, app and company launches. Use when the user wants to market, launch, promote, or reveal a product; the default for any commercial URL. Site tours / showcases of a website route here too — the brief carries the show-it-as-is intent. Unclear → /hyperframes.

DansiDanutz/Video-Editor

Divide a finished story/script into filmable scenes with per-scene image and animation prompts. Use when building a scene outline or shot list, deciding scene boundaries, durations, or what each visual must show.

相关技能