mirror of
https://github.com/PlayableIntelligence/game-creator.git
synced 2026-09-19 07:34:10 +08:00
4c5c0f3309
- Add Step 2.5 (Promo Video) to make-game pipeline between visual polish and audio. Records autonomous 50 FPS gameplay footage using Playwright slow-mo capture + FFmpeg speed-up. - Add skills/promo-video/ with full technique docs, capture script template, and FFmpeg conversion script - Add skills/record-promo/ as standalone slash command - Move nick-land-dodger into examples/ directory - Add rule: games created from within game-creator go into examples/ - Add 8 new celebrity character spritesheets to character library - Update game-assets skill with broad photo search and bobblehead body - Renumber pipeline tasks (now 7 total) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
1.1 KiB
Bash
Executable File
37 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Speed up a slow-mo Playwright recording to produce high-FPS output.
|
|
# Usage: convert-highfps.sh <input.webm> <output.mp4> [slow_mo_factor]
|
|
|
|
INPUT="${1:?Usage: convert-highfps.sh <input> <output> [factor]}"
|
|
OUTPUT="${2:?Usage: convert-highfps.sh <input> <output> [factor]}"
|
|
FACTOR="${3:-0.5}"
|
|
|
|
if [ ! -f "$INPUT" ]; then
|
|
echo "Error: input file not found: $INPUT" >&2
|
|
exit 1
|
|
fi
|
|
|
|
OUTPUT_FPS=$(echo "25 / $FACTOR" | bc)
|
|
|
|
echo "Converting: $INPUT -> $OUTPUT"
|
|
echo " Factor: ${FACTOR} | Output FPS: ${OUTPUT_FPS}"
|
|
|
|
ffmpeg -y -i "$INPUT" \
|
|
-vf "setpts=${FACTOR}*PTS" \
|
|
-r "$OUTPUT_FPS" \
|
|
-c:v libx264 -preset fast -crf 23 -pix_fmt yuv420p \
|
|
-movflags +faststart -an \
|
|
"$OUTPUT"
|
|
|
|
echo ""
|
|
echo "Verifying output..."
|
|
DURATION=$(ffprobe -v quiet -show_entries format=duration -of csv=p=0 "$OUTPUT")
|
|
ACTUAL_FPS=$(ffprobe -v quiet -select_streams v:0 -show_entries stream=r_frame_rate -of csv=p=0 "$OUTPUT")
|
|
|
|
echo " Duration: ${DURATION}s"
|
|
echo " Frame rate: ${ACTUAL_FPS}"
|
|
echo " File size: $(du -h "$OUTPUT" | cut -f1)"
|
|
echo "Done."
|