Skill Tracer
Skills › HyperFrames › remotion-to-hyperframes › setup.sh

setup.sh

34 lines · skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/setup.sh at a595755

1#!/usr/bin/env bash
2# setup.sh — generate the binary assets this fixture needs.
3#
4# Both Remotion and HyperFrames variants need a 200x200 blue PNG and a
5# 6-second silent WAV. Generating them via ffmpeg keeps binaries out of
6# the repo while still letting the fixture render reproducibly.
7#
8# Run from the fixture root: ./setup.sh
9
10set -euo pipefail
12THIS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14if ! command -v ffmpeg >/dev/null 2>&1; then
15 echo "error: ffmpeg not on PATH" >&2
16 exit 2
17fi
19mkdir -p "$THIS_DIR/remotion-src/public" "$THIS_DIR/hf-src/assets"
21# 200x200 solid blue PNG, ~200 bytes.
22ffmpeg -y -hide_banner -loglevel error \
23 -f lavfi -i "color=color=#3066be:size=200x200" -frames:v 1 \
24 "$THIS_DIR/remotion-src/public/square.png"
25cp "$THIS_DIR/remotion-src/public/square.png" "$THIS_DIR/hf-src/assets/square.png"
27# 6-second silent WAV at 8 kHz mono. ~96 KB if checked in, but it is generated.
28ffmpeg -y -hide_banner -loglevel error \
29 -f lavfi -i "anullsrc=cl=mono:r=8000" -t 6 -acodec pcm_s16le \
30 "$THIS_DIR/remotion-src/public/music.wav"
31cp "$THIS_DIR/remotion-src/public/music.wav" "$THIS_DIR/hf-src/assets/music.wav"
33echo "generated:"
34ls -la "$THIS_DIR/remotion-src/public/" "$THIS_DIR/hf-src/assets/"