showcase-video

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Showcase video

展示视频

A mod isn't finished until you can show it in 30 seconds. The toolchain is
um win record
(capture),
um video contact
(look),
um video compile
(edit), all ffmpeg + Pillow.
模组只有在 30 秒内展示清楚后才算完成。整套工具链包括
um win record
(录制)、
um video contact
(查看)、
um video compile
(剪辑),全部基于 ffmpeg + Pillow。

1. Make the take repeatable

1. 让每次拍摄都可复现

  • Script the action. Use a mod-side timeline or command sequence (spawn enemies, fire the weapon, cue the boss), a scenario with triggers and camera moves, or a WinDrive command list. The first clean take should be reproducible exactly, so you can reshoot after a fix.
  • Restore the world before each take. Explosions crater worlds; units die. Keep a pristine copy with
    um backup
    and restore it every take.
  • Clean frame. Hide debug text, fix the camera zoom (the Terraria showcase used 1.5x so 1080p frames read like a 720p cut), run at full speed when unfocused, and hide the cursor (capture uses
    capture_cursor=0
    ).
  • 编排动作。 使用模组端时间线或命令序列(生成敌人、开火、提示 Boss 出场)、带触发器和镜头移动的场景,或 WinDrive 命令列表。第一次干净的拍摄应能精确复现,以便修复后重新拍摄。
  • 每次拍摄前恢复世界。 爆炸会在世界中留下坑洞,单位也会死亡。使用
    um backup
    保留一份原始副本,并在每次拍摄前恢复它。
  • 画面清理。 隐藏调试文本,修正摄像机缩放(Terraria 展示使用 1.5x,让 1080p 帧呈现类似 720p 剪辑的效果),窗口未聚焦时全速运行,并隐藏光标(录制使用
    capture_cursor=0
    )。

2. Record the window + the game's own audio

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

bash
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                              # where gameplay starts (skips loading screens)
um video mux C:/caps/take1.mkv C:/caps/take1.audio.raw C:/caps/take1.json take1.mp4 [--offset 0.25]
  • Video: ffmpeg gfxcapture of that window only (GPU frames, no desktop). It encodes with NVENC, AMF or QSV when available. NVENC H.264 maxes out at 4096 px wide, so the recorder scales above that; for 32:9 screens, crop to the centre 16:9 with
    --crop
    .
  • Audio: WASAPI process loopback of the game's PID (
    um/ps1/ProcLoopback.ps1
    ). Only the game is recorded; no Spotify, no notifications. It's timestamped so the file position is wall time. Muxing uses the recorded offset. Fine-tune with a visual/audio sync event (a flash vs its boom) and pass
    --offset
    .
  • Inside a mod (optional): start and stop recording from the mod for frame-exact takes. Never block the game's main thread while stopping ffmpeg: send
    q
    , then wait off-thread. Write
    .mkv
    so a killed recorder still leaves a playable file (see
    examples/terraria-tmodloader/reference/InModRecorder.cs
    ).
bash
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                              # where gameplay starts (skips loading screens)
um video mux C:/caps/take1.mkv C:/caps/take1.audio.raw C:/caps/take1.json take1.mp4 [--offset 0.25]
  • 视频: 使用 ffmpeg gfxcapture 仅捕获该窗口(GPU 帧,不包含桌面)。可用时会使用 NVENC、AMF 或 QSV 编码。NVENC H.264 的最大宽度为 4096 px,因此录制器会对更宽的画面进行缩放;对于 32:9 屏幕,使用
    --crop
    将其裁剪为居中的 16:9。
  • 音频: 通过 WASAPI process loopback 捕获游戏 PID 的音频(
    um/ps1/ProcLoopback.ps1
    )。只录制游戏自身的声音;不包含 Spotify 和通知。音频带有时间戳,因此文件中的位置与 wall time 对应。混流时采用录制得到的 offset。可以利用视觉与音频的同步事件(闪光与轰鸣声)进行微调,并传入
    --offset
    。
  • 在模组内部(可选): 从模组中开始和停止录制,以获得帧级精确的拍摄。停止 ffmpeg 时切勿阻塞游戏主线程:发送
    q
    ,然后在其他线程中等待。写入
    .mkv
    ,这样即使录制器进程被终止,也会留下可播放的文件(参见
    examples/terraria-tmodloader/reference/InModRecorder.cs
    )。

3. Look before you cut

3. 先检查,再剪辑

bash
um video probe clip.mp4
um video contact clip.mp4 sheet.png --every 1.5 --cols 6     # a timestamped grid; read it, pick in/out points
um video contact clip.mp4 zoom.png --start 20 --end 30 --every 0.5
Pick the peak moments: the explosion, the boss reveal, the unit in formation. Write in/out times into the EDL.
bash
um video probe clip.mp4
um video contact clip.mp4 sheet.png --every 1.5 --cols 6     # a timestamped grid; read it, pick in/out points
um video contact clip.mp4 zoom.png --start 20 --end 30 --every 0.5
选择最具冲击力的时刻:爆炸、Boss 登场、队列中的单位。将入点和出点时间写入 EDL。

4. Edit with an EDL

4. 使用 EDL 进行剪辑

um video compile edl.json out.mp4
(
--preview
renders half size and fast). The full format is in
um video --help
.
json
{
  "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": "Terraria, but with a tactical nuke."},
    {"clip": "take1.mp4", "in": 24.2, "dur": 4.5, "title": "Tactical Nuke", "transition": {"type": "pixelize"}},
    {"clip": "take2.mp4", "in": 3.0, "dur": 5.0, "title": "Drone Mothership boss"},
    {"card": {"title": "Fal Arsenal", "sub": "a Terraria mod"}, "dur": 2.5}
  ]
}
  • Transitions: any ffmpeg xfade type (fade, pixelize, slideleft, smoothleft, circleopen, zoomin, radial...) or
    cut
    .
  • Fills: for non-16:9 clips,
    fill: blur
    (blurred backdrop),
    crop
    or
    pad
    .
  • Per clip:
    speed
    and
    volume
    ,
    zoom
    to punch in past UI,
    crop
    [x, y, w, h] to reframe.
  • Music:
    um fal music "..." --seconds 60
    makes a bed. Set
    bpm
    and use
    beats
    instead of
    dur
    to cut on the beat;
    um video beats music.mp3
    estimates tempo and first beat.
um video compile edl.json out.mp4
(
--preview
会以半尺寸快速渲染)。完整格式请参阅
um video --help
。
json
{
  "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": "Terraria, but with a tactical nuke."},
    {"clip": "take1.mp4", "in": 24.2, "dur": 4.5, "title": "Tactical Nuke", "transition": {"type": "pixelize"}},
    {"clip": "take2.mp4", "in": 3.0, "dur": 5.0, "title": "Drone Mothership boss"},
    {"card": {"title": "Fal Arsenal", "sub": "a Terraria mod"}, "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
    可估算速度和第一个节拍。

Style that works (from real feedback)

真正有效的风格(来自实际反馈)

  • Titles: one line naming what's on screen ("Wonder: the Transamerica Pyramid", "Robotaxis and Delivery Drones"). No small explanatory captions about how it was made; that goes in the post text.
  • Pace: get into gameplay within 2-3 s; menus and setup stay under 3 s. Clips run 3-5 s each. End on the mod name or URL and fade out.
  • Sound: keep the game's audio. It sells impacts. Music under a compilation, clip audio around 0.5-0.8.
  • Compilations of other people's clips: credit every creator on screen (
    credit: "@handle"
    ) and in the post, and ask permission when it's promotional. Don't imply their clips were made with your tool. Download only public posts, and only what you'll use.
  • Last step: look at a contact sheet of the finished video before sharing it.
  • 标题: 用一行文字点明画面内容("Wonder: the Transamerica Pyramid"、"Robotaxis and Delivery Drones")。不要添加介绍制作方式的小字号说明字幕;这些内容应放在发布文案中。
  • 节奏: 在 2–3 s 内进入游戏画面;菜单和设置过程控制在 3 s 以内。每个片段持续 3–5 s。最后展示模组名称或 URL,并淡出。
  • 声音: 保留游戏原声,因为它能增强打击感。合集视频中加入背景音乐,片段音频音量保持在 0.5–0.8。
  • 合集他人片段: 在画面中(
    credit: "@handle"
    )和发布文案中标注每位创作者;用于推广时要征得许可。不要暗示这些片段是用你的工具制作的。只下载公开帖子,并且只使用实际会用到的内容。
  • 最后一步: 分享前查看成片的 contact sheet。