Community编程与开发github.com

展示视频制作

录制并剪辑游戏模组的简短展示视频或片段合集,可直接发布到 X/YouTube。仅录制游戏窗口,不含其他桌面内容。

展示视频制作 是什么?

该技能为游戏模组开发者提供了一套完整的视频展示制作流程,从可重复执行的录制、精确剪辑到最终导出,全部通过命令行工具 `um win record`、`um video contact` 和 `um video compile` 实现,底层依赖 ffmpeg 和 Pillow。其核心价值在于确保每个“镜头”都是可复现的——通过脚本化动作、世界备份和清洁帧设置,开发者可以在修复 bug 后精准重拍同一场景。录制采用 GPU 级别的窗口截取(NVENC/AMF/QSV)和 WASAPI 进程回环音频,只捕捉游戏本身的画面和声音,避免系统通知或音乐干扰。剪辑阶段通过 EDL(编辑决策列表)定义片段、转场、滤镜、音乐和字幕,并内置了来自真实反馈的样式建议(如标题风格、节奏控制、声音混音),最终输出可直接用于社交媒体发布的视频文件。该技能支持在模组内部触发录制以实现帧级精确控制,并提供预览模式加速编辑迭代。

兼容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/rehan-remade/universal-modder/tree/main/skills/showcase-video

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

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

文档

展示视频制作 是做什么的?

一个模组直到能用 30 秒展示其亮点才算完成。工具链是 um win record(录制)、um video contact(预览)、um video compile(编辑),全部基于 ffmpeg + Pillow。

1. 让录制可重复

  • 脚本化操作。 使用模组侧的时间线或命令序列(生成敌人、发射武器、触发 Boss)、带有触发器和摄像机移动的场景,或 WinDrive 命令列表。第一次干净的录制应该可以精确复现,这样你就能在修复后重拍。
  • 每次录制前恢复世界状态。 爆炸会破坏地形,单位会死亡。用 um backup 保留一份原始副本,并在每次录制前恢复。
  • 干净画面。 隐藏调试文字,固定摄像机缩放(Terraria 展示使用了 1.5 倍缩放,这样 1080p 的帧看起来像是 720p 的剪辑),不聚焦时全速运行,并隐藏光标(录制使用 capture_cursor=0)。

2. 录制窗口 + 游戏本身的音频

um win record --exe Game.exe --out C:\caps\take1 --seconds 40      # -> take1.mkv, take1.audio.raw, take1.json
um video first-frame C:/caps/take1.mkv                              # 找到游戏实际开始的位置(跳过加载画面)
um video mux C:/caps/take1.mkv C:/caps/take1.audio.raw C:/caps/take1.json take1.mp4 [--offset 0.25]
  • 视频: ffmpeg 对指定窗口进行图形截取(GPU 帧,不含桌面)。当可用时会使用 NVENC、AMF 或 QSV 编码。NVENC H.264 最大支持 4096 像素宽,因此录制器会在超出该宽度时进行缩放;对于 32:9 屏幕,用 --crop 裁剪到中心 16:9 区域。
  • 音频: 对游戏 PID 进行 WASAPI 进程回环录制(um/ps1/ProcLoopback.ps1)。只录制游戏本身的声音,不会录到 Spotify 或系统通知。音频带有时间戳,文件位置即为墙上时钟时间。混流时会使用录制时记录的时间偏移。通过视觉/音频同步事件(如闪光 vs. 爆炸声)进行微调,并传入 --offset。
  • 在模组内部(可选): 从模组中启停录制以实现帧级精确控制。在停止 ffmpeg 时绝不能阻塞游戏主线程:发送 q,然后在离线程等待完成。输出 .mkv 格式,这样即使录制进程被杀,也能留下一个可播放的文件(参见 examples/terraria-tmodloader/reference/InModRecorder.cs)。

3. 剪辑前先预览

um video probe clip.mp4
um video contact clip.mp4 sheet.png --every 1.5 --cols 6     # 带时间戳的缩略图网格;读取它,选取入/出点
um video contact clip.mp4 zoom.png --start 20 --end 30 --every 0.5

挑选精彩瞬间:爆炸、Boss 亮相、阵型中的单位。将入/出时间写入 EDL。

4. 用 EDL 进行编辑

um video compile edl.json out.mp4(--preview 会以半尺寸快速渲染)。完整格式见 um video --help。

{
  "size": [1920, 1080], "fps": 30,
  "theme": {"accent": "#B6FF3B"},
  "transition": {"type": "fade", "duration": 0.3},
  "clip_volume": 0.8,
  "music": {"path": "music.mp3", "volume": 0.5},
  "watermark": {"path": "logo.png", "height": 54, "corner": "br"},
  "segments": [
    {"clip": "take1.mp4", "in": 9.0, "dur": 3.0, "hook": "泰拉瑞亚,但有了战术核弹。"},
    {"clip": "take1.mp4", "in": 24.2, "dur": 4.5, "title": "战术核弹", "transition": {"type": "pixelize"}},
    {"clip": "take2.mp4", "in": 3.0, "dur": 5.0, "title": "无人机母舰 Boss"},
    {"card": {"title": "Fal Arsenal", "sub": "一个泰拉瑞亚模组"}, "dur": 2.5}
  ]
}
  • 转场: 支持任何 ffmpeg xfade 类型(fade、pixelize、slideleft、smoothleft、circleopen、zoomin、radial...)或 cut。
  • 填充: 对于非 16:9 的片段,可使用 fill: blur(模糊背景)、crop 或 pad。
  • 每片段设置: speed 和 volume、zoom 用于放大细节避开 UI、crop [x, y, w, h] 用于重新构图。
  • 音乐: um fal music "..." --seconds 60 生成背景音乐。设置 bpm 并使用 beats 替代 dur 来按节拍剪辑;um video beats music.mp3 可估算节奏和第一拍。

行之有效的风格(来自真实反馈)

  • 标题: 一行文字说明屏幕上是什么(“壮丽:泛美金字塔”、“自动驾驶出租车与送货无人机”)。不要添加关于制作方法的小字说明字幕;这些内容应放在帖子正文中。
  • 节奏: 在 2-3 秒内进入实机画面;菜单和设置保持在 3 秒内。每个片段持续 3-5 秒。以模组名称或网址结束,然后淡出。
  • 声音: 保留游戏音频。它对冲击感至关重要。合集型视频使用背景音乐,片段音频音量设在 0.5-0.8 左右。
  • 合集中使用他人的片段: 在画面上注明每位创作者(credit: "@handle")并在帖子中也注明,如果是推广性质则需获得许可。不要暗示他们的片段是用你的工具制作的。仅下载公开帖子,且只下载你会用到的内容。
  • 最后一步: 在分享前查看已完成视频的缩略图联系表。

Individual skills in this repo

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

asset-pipeline

Turn generated or hand-made art into exactly what a game engine loads. Covers sprite cutout, trim and nearest-neighbour fitting to frame sizes, pixelation to a palette, sprite sheets and strips, player/team-colour masks, seamless textures, and rendering a 3D model into sprite frames from the game

fal-assets

Generate game assets with fal (fal.ai) through the fal MCP server, the `um fal` CLI (REST) or `fal api`. Covers sprites and icons with transparent backgrounds, consistent variants and animation frames, pixel art, seamless textures, PBR material maps, image-to-3D models, remeshing, auto-rigging, sound effects, music, voice lines, and trailer or cutscene video. Use whenever a mod needs new art, audio or 3D models, or the user mentions fal, generating sprites, textures, models, SFX or music for a game.

game-automation

Launch, see and drive a real game so an agent can test its own mods. Covers launching via Steam or the exe, windowed mode at a fixed size, screenshots of the game window (GPU-safe capture), clicking and typing into menus, holding keys, relative mouse, crash-reporter cleanup, killing by PID, reading logs, scripted test scenes, and an in-game JSON bridge that lets an agent observe and act. Windows-first (also from WSL), with notes for Linux and macOS. Use when a mod must be verified in game, when navigating menus automatically, or when building a repeatable test or demo scene.

game-recon

Figure out how a specific installed game can be modded, before writing any mod code. Covers where it

game-research-websearch

Research a game, engine or modding technique on the open web with archive-aware, rate-limit-safe searches — Wayback Machine/archive.today for dead forums (XeNTaX, Zenhax, old threads), GitHub code/repo search, Nexus/Steam Workshop/Thunderstore APIs, Reddit JSON, YouTube transcripts, plus archive snapshots as evidence. Use when starting work on a game (

mashup-mods

Build cross-game mashups and total conversions, the

mod-any-game

Mod a PC game the user owns, taking an idea to working in the real game and recorded. It covers new items, weapons, enemies, bosses, units, civilizations, mechanics, art, sound, VR and cross-game mashups. Use when the user wants to mod, extend, hack on, reverse engineer or mash up a game (

port-a-mod

Port an existing mod to a newer game version or another mod loader while keeping its behaviour, values and quirks. Typical cases are an old Forge 1.7.10 or 1.12 Minecraft mod moving to modern Fabric or NeoForge, a Skyrim LE plugin moving to SE/AE, or a tModLoader 1.3 mod moving to 1.4. It covers pinning one source version, a private decompiled reference, an adaptation matrix, extracting the mod

publish-mod

Package and release a finished game mod. Covers the pre-release lint (no game files, decompiled code or leaked keys), README and install steps, credits and AI disclosure, versioning, where to upload (Nexus Mods, Steam Workshop, Thunderstore, mod.io, GitHub releases), and the post with a video. Use when the user wants to ship, share, upload, release or post a mod.

reverse-engineering

Read how a game actually works so a mod can hook it. Decompile .NET/Mono (ILSpy), IL2CPP (Cpp2IL, Il2CppDumper), Java (Vineflower) and native code (Ghidra, IDA, via MCP servers); dump data and asset formats; reverse-engineer a binary file format and prove it with a round trip; read live memory (Cheat Engine, Frida, x64dbg); find render passes (RenderDoc). Use when a mod needs game internals, e.g.

share-field-notes

Search and contribute to the shared AI-modding knowledge base, where field notes record how specific games were modded, decompiled or reverse-engineered (exact versions, route, engine facts, verification, gotchas). Use before starting work on a game (

相关技能