Clips unfurl: share cards, faststart video, a share button

Each clip page already carried its own title, blurb, poster and
og:video — but the assets behind the tags let the unfurl down. The mp4s
were tail-indexed, so previewers in iMessage, Discord, Slack and
Facebook gave up before finding a player; the tags carried no video
dimensions, without which those same sites refuse to embed one; and the
poster was a 736x578 screenshot of the workshop chrome, cropped to
nothing by any share sheet.

deploy/clips-prep.mjs fixes the set before clips-publish.sh ships it:
a lossless faststart remux of every take, a 1200x630 card per clip cut
from the poster's first-person viewport with the title set over it (an
HTML card screenshot through the harness's chromium — ffmpeg here has
no drawtext), and the fpv frame size stamped into clips.json. The page
emits the card with its dimensions, og:video:width/height, and a Share
button that opens the phone's share sheet or copies the link.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
Eric Wagoner
2026-09-02 11:26:27 -04:00
co-authored by Claude Fable 5.1
parent bea8a2e1e1
commit 8488e9a8d1
4 changed files with 165 additions and 8 deletions
Regular → Executable
+3 -1
View File
@@ -1,7 +1,9 @@
#!/usr/bin/env bash
# Publish showcase clips to the droplet's clip vault (/var/lib/wizwar/clips).
# Run deploy/clips-prep.mjs on the directory first: it remuxes the video
# for streaming, cuts the share cards, and stamps frame sizes into clips.json.
# The gallery at /clips serves whatever this ships: <slug>-fpv.mp4,
# <slug>-board.mp4, <slug>.jpg per clip, described by clips.json.
# <slug>-board.mp4, <slug>.jpg, <slug>-card.jpg per clip, described by clips.json.
set -euo pipefail
host=${1:?usage: clips-publish.sh <host> <clips-dir>}
dir=${2:?usage: clips-publish.sh <host> <clips-dir>}