record-promo
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRecord Promo Video
录制游戏宣传视频
Autonomously capture smooth, high-FPS gameplay footage of your Phaser game — ready for TikTok, Reels, Moltbook, or X. No human input needed during recording.
自动捕获你的Phaser游戏流畅的高帧率游戏画面——适配TikTok、Reels、Moltbook或X平台。录制过程无需人工干预。
Instructions
操作步骤
Record a promo video of the game at (or the current directory if no path given).
$ARGUMENTS录制路径下(若未指定路径则为当前目录)游戏的宣传视频。
$ARGUMENTS1. Pre-checks
1. 前置检查
Verify these are available:
- Dev server: Check if one is already running (). If not, start one with
curl -s http://localhost:3000/in the background. Note the port.npm run dev - Playwright: . If not installed:
npx playwright --versionnpm install -D @playwright/test && npx playwright install chromium - FFmpeg: . If not found, tell the user to install it (
ffmpeg -version | head -1on macOS) and stop.brew install ffmpeg
确认以下工具已就绪:
- 开发服务器:检查是否已有运行中的开发服务器(执行)。若没有,在后台执行
curl -s http://localhost:3000/启动,并记录端口号。npm run dev - Playwright:执行检查版本。若未安装,执行
npx playwright --version进行安装。npm install -D @playwright/test && npx playwright install chromium - FFmpeg:执行检查是否安装。若未找到,告知用户进行安装(macOS系统可执行
ffmpeg -version | head -1)并终止流程。brew install ffmpeg
2. Generate the capture script
2. 生成捕获脚本
Load the skill for the full technique reference.
promo-videoRead the game's source files to understand:
- — find death/failure methods to patch out
src/scenes/GameScene.js - — event flow
src/core/EventBus.js - — input keys, game dimensions
src/core/Constants.js - — verify
src/main.jsand__GAME__globals are exposed__GAME_STATE__
Create adapted for this specific game:
scripts/capture-promo.mjs- Patch out ALL death/failure code paths
- Generate input sequences matching the game's actual controls
- Include entrance animation pause (1-2s)
- Default viewport: (9:16 mobile portrait)
1080 × 1920 - Default duration: 13s game-time
加载技能以查看完整技术参考。
promo-video读取游戏源码文件以了解以下信息:
- — 找到并屏蔽死亡/失败相关方法
src/scenes/GameScene.js - — 事件流逻辑
src/core/EventBus.js - — 输入按键、游戏尺寸
src/core/Constants.js - — 确认已暴露
src/main.js和__GAME__全局变量__GAME_STATE__
创建适配当前游戏的脚本:
scripts/capture-promo.mjs- 屏蔽所有死亡/失败代码路径
- 生成匹配游戏实际控制逻辑的输入序列
- 加入开场动画停顿(1-2秒)
- 默认视口:(9:16 竖屏移动端)
1080 × 1920 - 默认时长:13秒游戏时间
3. Copy the conversion script
3. 复制转换脚本
bash
cp <plugin-root>/skills/promo-video/scripts/convert-highfps.sh <project-dir>/scripts/
chmod +x <project-dir>/scripts/convert-highfps.shbash
cp <plugin-root>/skills/promo-video/scripts/convert-highfps.sh <project-dir>/scripts/
chmod +x <project-dir>/scripts/convert-highfps.sh4. Run the capture
4. 执行捕获
bash
mkdir -p output
node scripts/capture-promo.mjs --port <port>
bash scripts/convert-highfps.sh output/promo-raw.webm output/promo.mp4 0.5bash
mkdir -p output
node scripts/capture-promo.mjs --port <port>
bash scripts/convert-highfps.sh output/promo-raw.webm output/promo.mp4 0.55. Verify and preview
5. 验证与预览
Extract a thumbnail at the 5-second mark and show it to the user:
bash
ffmpeg -y -ss 5 -i output/promo.mp4 -frames:v 1 -update 1 output/promo-thumbnail.jpgRead the thumbnail image and display it. Report duration, frame rate, and file size.
在视频第5秒处提取缩略图并展示给用户:
bash
ffmpeg -y -ss 5 -i output/promo.mp4 -frames:v 1 -update 1 output/promo-thumbnail.jpg读取并展示该缩略图,同时报告视频时长、帧率和文件大小。
Example Usage
使用示例
/record-promo examples/flappy-birdResult: Patches out death → generates input sequence for the game's controls → captures 13s of autonomous gameplay at 1080x1920 (9:16) → converts to 50 FPS MP4 → ready for TikTok/Reels.
output/promo.mp4Tell the user:
Promo video recorded! 50 FPS, mobile portrait (1080×1920).File:output/promo.mp4Post it to TikTok, Reels, or X to drive traffic to your game.
/record-promo examples/flappy-bird结果:屏蔽死亡逻辑 → 生成适配游戏控制的输入序列 → 以1080x1920(9:16)分辨率捕获13秒自动游戏画面 → 转换为50 FPS的MP4视频 → 已可用于TikTok/Reels平台。
output/promo.mp4告知用户:
宣传视频录制完成!50 FPS,竖屏移动端(1080×1920)。文件路径:output/promo.mp4可发布至TikTok、Reels或X平台以引流至你的游戏。