Communitygithub.com

视频编辑 (Video Editing)

AI辅助的视频编辑工作流,用于剪辑、结构化并增强真实素材。涵盖从原始捕获到 FFmpeg、Remotion、ElevenLabs、fal.ai,以及最终在 Descript 或 CapCut 中精修的完整流程。

视频编辑 (Video Editing) 是什么?

该技能提供了一套完整的 AI 辅助视频编辑工作流,专注于快速、高效地处理真实拍摄的素材(而非 AI 生成内容)。其核心理念是“压缩”而非“生成”:利用 AI 来整理、结构化素材并生成资产,从而节省大量手动工作。 技能将工作流划分为六个明确的层级: 1. **捕获**:使用 Screen Studio 或原始相机素材。 2. **组织**:通过 Claude/Codex 进行转录、标注、规划结构并生成剪辑决策列表(EDL)。 3. **确定性剪辑**:使用 FFmpeg 进行精确的裁剪、拼接、转码和预处理。 4. **可编程合成**:使用 Remotion 创建可复用的、代码驱动的叠加层、动画和模板。 5. **生成型资产**:使用 ElevenLabs 生成配音/音效,使用 fal.ai 生成壁纸或背景音乐。 6. **最终抛光**:将素材导入 Descript 或 CapCut 进行节奏调整、字幕、调色和最终混音。 该工作流支持 YouTube、TikTok、Instagram 等多个主流平台的尺寸转换,并包含场景检测、静音剪切、代理文件创建等实用技巧。最后,它强调了“品位是最终层”——AI 清除重复性工作,而用户保留最终的创造性决策权。

兼容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/affaan-m/everything-claude-code/video-editing

在你喜欢的 AI 中提问

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

预览

来自技能 README

文档

视频编辑

AI 辅助的真实素材编辑。不是 AI 生成,而是对现有视频的快速编辑。

何时激活

  • 用户需要编辑、剪切或组织视频素材
  • 将长时间录制内容转换为短视频
  • 从原始素材制作 vlog、教程或演示视频
  • 为现有视频添加叠加层、字幕、音乐或旁白
  • 为不同平台(YouTube、TikTok、Instagram)重新调整视频比例
  • 用户说出“编辑视频”、“剪辑这段素材”、“制作 vlog”或“视频工作流”

核心理论

AI 视频编辑的有用之处在于:别再让它从头到尾生成完整视频,而是利用它来压缩、结构化并增强真实素材。价值不在于生成,而在于压缩。

工作流管线

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

每个层级有特定职责。不要跳过层级,也不要试图让一个工具完成所有工作。

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

收集源素材:

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

输出:准备好进行组织的原始文件。

第二层:组织(Claude / Codex)

使用 Claude Code 或 Codex 进行:

  • 转录与标注:生成转录稿,识别主题和话题。
  • 规划结构:决定哪些保留、哪些剪掉、顺序如何。
  • 识别无效部分:找到停顿、跑题、重复片段。
  • 生成剪辑决策列表(EDL):剪辑时间戳、保留的片段。
  • 搭建 FFmpeg 和 Remotion 代码框架:生成命令和组合。
示例提示:
“这是长达 4 小时录制内容的转录稿。提取其中最强的 8 个片段,
用于 24 分钟的 vlog。为每个片段提供 FFmpeg 剪辑命令。”

这一层关注结构,而非最终的创意审美。

第三层:确定性剪辑(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

第四层:可编程合成(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 文档。

第五层:生成型资产(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": "Your narration text here",
        "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-roll:

generate(app_id: "fal-ai/nano-banana-pro", input_data: {
  "prompt": "professional thumbnail for tech vlog, dark background, code on screen",
  "image_size": "landscape_16_9"
})

使用 VideoDB 生成音频

如果已配置 VideoDB:

voiceover = coll.generate_voice(text="Narration here", voice="alloy")
music = coll.generate_music(prompt="lo-fi background for coding vlog", duration=120)
sfx = coll.generate_sound_effect(prompt="subtle whoosh transition")

第六层:最终抛光(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. 先结构后风格。 在接触到任何视觉效果之前,先在第二层把故事讲好。
  3. FFmpeg 是支柱。 枯燥但至关重要。它是长素材变得可控的地方。
  4. Remotion 用于可复用性。 如果一件事会做一次以上,就把它做成 Remotion 组件。
  5. 选择性生成。 只用 AI 生成那些不存在的资产,而不是所有东西都生成。
  6. 品位是最后层。 AI 清除重复性工作,而你做出最终的创意决策。

相关技能

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

Individual skills in this repo

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

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Next.js 16+ uses App Router with Server Components by default. Client Components are only used when interactivity is needed (hooks, event handlers, browser APIs).

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

相关技能