Communitygithub.com

长视频渲染

组装最终视频并运行审阅循环。根据剪辑(或带镜头运动的图片)、配音、音效和字幕构建编辑版本,渲染带场景编号和时间的低质量审阅版本供客户审阅,收集并应用修改(根据需要反复渲染审阅版本),并在用户批准后渲染高质量最终视频。使用支持CLI或MCP的视频编辑器(如果有且用户愿意),否则使用捆绑的ffmpeg渲染器。在 long-video-sound 之后或用户要求渲染、组装、导出、预览或最终确定视频时使用。

长视频渲染 是什么?

长视频渲染是长视频工作流的第9个阶段,负责将之前阶段生成的素材组装成可审阅和最终输出的视频。该技能会检查所有必需素材(视频剪辑、图片、配音、音效),构建编辑决策列表,并先渲染低质量(约360p)的审阅版本,其中会烧录场景编号和时间码,方便客户逐帧提出修改意见。用户收集反馈后,技能会分析每条意见,将其分类为剪辑级、画面级、配音级或故事结构级修改,并引导用户回到对应阶段重新生成素材,然后更新编辑列表并渲染新的审阅版本。只有当用户明确批准某个具体审阅版本后,技能才会渲染高质量的最终视频(H.264, CRF 18, 双通道响度标准化),并更新项目状态。该技能支持通过CLI或MCP协议与专业视频编辑器集成,但默认使用捆绑的ffmpeg渲染器确保可靠运行。关键规则包括:未经明确批准绝不渲染最终版本、绝不擅自修改已批准的剧本、未经用户同意绝不分享或上传视频、绝不删除旧的审阅渲染文件。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/samanfirouzi/long-video-skill/tree/HEAD/skills/long-video-render

在你喜欢的 AI 中提问

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

文档

长视频渲染 是做什么的?

长视频工作流的第9阶段。输出:审阅渲染(低质量)直到用户批准,然后输出一个高质量最终视频。

场景指剧本的一个片段,按顺序在整个视频中编号,如同前几个阶段。场景编号会烧录在审阅视频中,方便审阅者指认。

开始之前

  1. 在 ~/.long-video/projects/<slug>/ 中找到项目。需要 video-script.md,且状态为 status: approved。
  2. 加载项目配置:分辨率、画面比例、字幕模式 (visuals.captions)、响度需求、平台。
  3. 检查 ffmpeg 和 ffprobe (ffmpeg -version)。捆绑渲染器需要支持 libx264 和 libass 的 ffmpeg。
  4. 如果 render/ 已存在,询问:继续(列出已有版本)或重新开始。

步骤1:清单

检查每个场景并列出已有的内容:

项目位置用途
视频剪辑clips/scene-<NNN>_clip.*(或 _take2 及后续版本,以用户批准的为准)场景的画面
仅图片frames/scene-<NNN>_start.*带有剧本中镜头运动(推、拉、摇)的静态图片
配音audio/lines/scene-<NNN>_<speaker>_<NN>.*旁白和对白
音效sound/mix/sfx_track.wav、amb_track.wav、music_track.wav特效、环境音、音乐

用简短表格报告缺口。缺少剪辑和图片的场景是阻塞项:列出这些场景并提供返回 long-video-keyframes 或 long-video-clips 的选项。缺少配音或音效仅允许在用户选择跳过这些阶段的情况下。如果某个阶段被跳过,不要再次询问。

如果剪辑阶段被跳过(clips_mode: images-only),则每个场景变为带有剧本中镜头运动的静态图片。

步骤2:选择组装工具

  1. 检查可供Claude驱动的视频编辑器:此会话中连接的编辑MCP服务器,或设备上的CLI(FilmCraft: filmcraft-cli commands;EffectCraft: effectcraft-cli --help)。参见 ../long-video-sound/references/tools.md,第5节。
  2. 如果有可用的,询问:使用它(用户可以打开项目并进行调整),或使用捆绑渲染器。默认为捆绑渲染器。如果用户选择编辑器,先读取其命令列表和文档,在副本上工作,安装或构建任何内容前先询问,并保持相同的文件名。
  3. 说明将使用哪个工具。

本技能的其余部分描述捆绑渲染器。使用编辑器时,通过其命令执行相同步骤,并将审阅和最终文件导出到相同的文件夹和名称。

步骤3:构建编辑列表

阅读 references/edl-format.md。根据项目文件编写 render/edl.json:

  • 每个场景一个条目,包含其时长(来自剧本,或当实际剪辑长度在场景时长内较短或较长时使用实际剪辑长度)、画面来源、静态图片的镜头运动、以及转场方式;
  • 配音布局:场景开始时间加上一个短偏移量(默认0.3秒),行按顺序排列,之间有微小间隙;
  • 音效轨道;
  • 字幕来源于配音文本(根据每个配音文件的时长确定起止时间),如果配置要求字幕;
  • 宽度、高度和帧率来自配置。默认帧率为24。默认响度目标为-14 LUFS,真实峰值低于-1.5 dBTP。

规则:

  • 使用已批准剧本中的确切场景时长。不要为了适应而拉伸或缩短故事。
  • 比其场景更长的剪辑从末尾裁剪。比其场景更短的剪辑保持其最后一帧。两种情况都要报告。
  • 配音行超出其场景结束或视频结束的情况,作为警告报告。
  • 转场:默认为 cut。仅当剧本中指定时才使用 fade(淡入黑场)。交叉溶解需要编辑器工具。
  • 渲染前检查计划:node <skill folder>/scripts/build-render.mjs render/edl.json review render/review --plan。

显示简短摘要:场景数量、总时长与目标时长对比、剪辑与静态图片对比、警告。修复可以在不改变故事的前提下解决的问题。询问用户任何无法自行解决的问题。

步骤4:渲染审阅版本

审阅质量:低分辨率(约360p),高压缩,场景编号和时间烧录在左上角,如果配置使用烧录字幕则包含字幕。

node <skill folder>/scripts/build-render.mjs render/edl.json review render/review --version 1
  • 输出:render/review/<slug>_review_v1.mp4,以及包含时长、大小和响度的 .report.json 文件。
  • 场景片段会被缓存。后续审阅仅重新渲染更改过的场景,因此速度更快。
  • 对于几分钟以上的视频,在后台运行命令并等待其完成。不要轮询。
  • 如果字幕模式为 srt,则在视频旁写入一个 .srt 文件。

检查报告:实际时长与计划时长对比、响度、流。然后告知用户完整路径和文件大小。

说明如何审阅:观看文件,注意角落显示的场景编号和时间,每个评论附带这些信息。Claude不会发送或上传文件。用户自行与客户分享。仅当用户要求时,才主动准备上传,并且需先询问。

步骤5:收集修改

询问:“需要修改吗?如果这是最终版,请告诉我,我将渲染高质量版本。”

用户可能粘贴客户的反馈。阅读 references/review-feedback.md。对每条评论:

  1. 找到它所指的场景编号或时间。如果评论含糊,简短提一个问题。
  2. 分类并选择处理路径:
    • 剪辑级(裁剪、时长、顺序、字幕文本、字幕开关、转场、配音、音乐或效果的音量):在此处修复 edl.json 或调整音轨增益。
    • 场景画面(外观、角色、构图、动作):返回 long-video-keyframes 或 long-video-clips 处理这些场景。新文件使用 _take2 风格名称。然后更新编辑列表。
    • 配音行(表达、发音、措辞):针对这些行返回 long-video-voice。对已批准剧本的措辞更改需要用户批准并修订剧本。
    • 音效(效果、环境音、音乐):返回 long-video-sound 处理那些提示,然后重新混音。
    • 故事或结构(添加或删除场景):返回 long-video-director,然后仅重新处理下游受影响的场景。
  3. 将列表写入 render/review-log.md,包含版本、场景、请求、路径和状态。
  4. 用简短表格向用户展示计划。在进行任何可能产生成本或时间的重新生成前,请求用户确认。
  5. 应用修改,然后渲染下一个审阅(--version 2,依此类推)。保留所有旧的审阅文件。
  6. 逐场景告知用户更改内容及新文件路径。

重复直到用户批准。沉默或“暂时看起来不错”不算批准。

步骤6:渲染最终视频

仅在用户明确声明某个特定审阅版本是最终版本之后。

  1. 确认:“从审阅 v 渲染最终版本?”检查编辑列表与该版本匹配,并且审阅日志中没有未处理的修改请求。
  2. 最终质量:配置的分辨率,高质量 H.264(crf 18,slow 预设),AAC 192k,双通道响度标准化到目标值,无审阅标签。仅当配置指定为烧录字幕时才烧录。否则写入一个 .srt 文件。
  3. 运行,对于长视频在后台执行:
node <skill folder>/scripts/build-render.mjs render/edl.json final render/final
  1. 使用报告和 ffprobe 验证:时长与计划匹配,分辨率和帧率正确,有一个视频流和一个音频流,响度接近目标(大约在 1 LU 以内),真实峰值低于 -1 dBFS。
  2. 可选择检查是否存在意外的黑帧和长时间静音:ffmpeg -i FILE -vf blackdetect=d=0.5 -af silencedetect=noise=-50dB:d=3 -f null -。报告发现的问题。
  3. 更新 project.json:`

Individual skills in this repo

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

long-video-assets

Video and animation skill. Build the visual foundation for a long video from an approved story. Extracts the recurring characters, environments and key objects, helps the user choose one art style from suggested options (10 at a time, more on request), then writes image generation prompts for every character (portrait plus character sheet), environment and object, all sharing one locked style. Can also generate the images (installed tool, API, MCP or browser) or hand the user a folder and file names to fill. Use after lon

long-video-director

Turn an approved story into a shot-by-shot video script, acting as the director. Asks whether the video uses a narrator or characters who speak (or both), suggests professional filming choices (camera type, lenses, camera movement, lighting, color, pacing), saves them as a separate film style file, then writes a script that matches the project config. Outputs film-style.md and video-script.md. Use after long-video-story (and long-video-assets) are done, or when the user asks for the video script, shot list, camera style or lighting plan.

long-video-keyframes

Create the start and end frame image for every scene (clip) of the approved video script. Writes one image prompt per frame with a fixed file name that holds the scene number and start or end, makes a folder for the images, and can generate the images with an available image tool, or hand the prompts to the user all at once or one by one. Use after long-video-director, or when the user asks for start frames, end frames, keyframes or scene images.

long-video-sound

Video and animation skill. Create the sound effects, ambience and background music for the video and place them on the timeline. Plans the sound design from the approved script, sources or makes each sound (Openverse for openly licensed recordings and music, Earshot to make sounds from words and to listen to and judge sounds, Clipwing real-sfx to place real sounds on exact frames), records licences and credits, and mixes separate stems (effects, ambience, music) with the music ducked under speech. Or gives the user a fold

long-video-story

Agree on the story for a long video. The user either supplies a story or asks Claude to write one. When Claude writes, it first asks which story style to use (for example niche discovery, or a provocative-questions narration), runs that style's skill, and revises until the user approves. Use after long-video-setup, or when the user says "story for my video", "give me an idea", or wants to change an unapproved story. Ends only when the user explicitly approves the story.

long-video-voice

Create the spoken audio (narration and character voices) for the approved video script. First decides whether the video needs speech and asks the user to confirm. If yes, builds a voice cast (narrator plus each speaking character), makes a short sample of each voice with an available tool such as an ElevenLabs MCP and asks the user to approve the voices, then generates one audio file per spoken line with a name that holds the scene number and speaker. Or gives the user the lines, file names and folder to record or generate themselves. Use after long-video-clips (or long-video-keyframes), or when the user asks for narration, voiceover, voices or dialogue audio.

相关技能