Skip to content

armgit / brag

Public Imported from GitHub
0

You built it. Now brag. Turn the project you just created into a short, shareable launch video with one command.

Bake the poster into brag.mp4 frame 0 for idle thumbnails

shunithavivdd3fd152fb22
diff --git a/docs/README.md b/docs/README.md
index 7bcdcd0..b82a94c 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -17,10 +17,18 @@ The gallery videos ship committed: each demo shown (`examples/horse-tinder/`, `e
## Adding / updating a gallery example
-1. Render the brag video and place `brag.mp4`, `brag.jpg` (poster), and `site.jpg` (thumbnail) under `examples/<slug>/`, next to the demo's `index.html` and `styles.css`. Pick `brag.jpg` as the **best** frame, not an arbitrary one — grab the video's strongest settled beat (the hook line, or the hero/logo reveal) full-res with ffmpeg:
+1. Render the brag video and place `brag.mp4`, `brag.jpg` (poster), and `site.jpg` (thumbnail) under `examples/<slug>/`, next to the demo's `index.html` and `styles.css`. Pick `brag.jpg` as the **best** frame, not an arbitrary one — grab the video's strongest settled beat (the hook line, or the hero/logo reveal) full-res with ffmpeg, then bake it as the video's frame 0 so idle thumbnails everywhere show it:
```bash
+ # extract the best settled beat as the poster
ffmpeg -ss 3.2 -i docs/examples/<slug>/brag.mp4 -frames:v 1 -q:v 2 docs/examples/<slug>/brag.jpg
+
+ # replace only frame 0 with the poster (same duration, frames, and audio)
+ cd docs/examples/<slug>
+ ffmpeg -y -i brag.mp4 -i brag.jpg \
+ -filter_complex "[0:v][1:v]overlay=0:0:enable='eq(n,0)'[v]" \
+ -map "[v]" -map 0:a? -c:v libx264 -crf 18 -preset slow -pix_fmt yuv420p \
+ -c:a copy -movflags +faststart brag.poster.mp4 && mv brag.poster.mp4 brag.mp4
```
2. Add a card in `index.html` pointing at those paths.
3. Un-ignore the slug in `.gitignore` and commit the assets.
diff --git a/skills/brag/SKILL.md b/skills/brag/SKILL.md
index b0fbc28..1e6821c 100644
--- a/skills/brag/SKILL.md
+++ b/skills/brag/SKILL.md
@@ -101,9 +101,9 @@ Write the composition brief and use Hyperframes to create the video implementati
**Read:** [references/step-4-deliver.md](references/step-4-deliver.md)
-Validate, preview, render to `<output-dir>/brag.mp4`, pick the best poster frame into `<output-dir>/brag.jpg`, and write `<output-dir>/share-copy.txt`.
+Validate, preview, render to `<output-dir>/brag.mp4`, pick the best poster frame into `<output-dir>/brag.jpg`, bake that poster as the video's frame 0 so it's the idle thumbnail everywhere, and write `<output-dir>/share-copy.txt`.
-**Gate:** `<output-dir>/brag.mp4` exists. A best-frame poster `<output-dir>/brag.jpg` is picked (not an arbitrary frame). Share copy is written.
+**Gate:** `<output-dir>/brag.mp4` exists. A best-frame poster `<output-dir>/brag.jpg` is picked (not an arbitrary frame) and baked as frame 0 of `brag.mp4`. Share copy is written.
---
diff --git a/skills/brag/references/step-4-deliver.md b/skills/brag/references/step-4-deliver.md
index e495769..4d9b7dd 100644
--- a/skills/brag/references/step-4-deliver.md
+++ b/skills/brag/references/step-4-deliver.md
@@ -47,7 +47,7 @@ npx hyperframes render --quality high --output ../brag.mp4
## Pick the poster frame
-The poster is the still shown before the video plays (a `<video>`'s `poster` image) — the first thing anyone sees. Don't leave it to the first frame or an arbitrary timestamp; those land on fades, mid-transitions, or half-rendered text.
+The poster is the still shown before the video plays — the first thing anyone sees when it's idle or unplayed. Don't leave it to the raw first frame or an arbitrary timestamp; those land on fades, mid-transitions, blank intro backgrounds, or half-rendered text.
You built this composition, so you already know its strongest moment and exactly when it lands — the hook line, the hero reveal, or the final logo. Pick that beat at a **settled** point: text fully animated in, before it exits (the storyboard timings tell you the safe window). Then extract that one frame full-res with ffmpeg. From `brag-output/composition`:
@@ -56,7 +56,23 @@ You built this composition, so you already know its strongest moment and exactly
ffmpeg -ss 3.2 -i ../brag.mp4 -frames:v 1 -q:v 2 ../brag.jpg
```
-Aim for a frame that's postable on its own (the "show the thing" law — any frozen frame should be shareable). If the pulled frame lands on a transition or mid-animation, nudge the timestamp a few tenths of a second and re-extract. Wire the poster into any `<video>` that embeds the brag (the composition, a gallery card, the user's site) with `poster="brag.jpg"`.
+Aim for a frame that's postable on its own (the "show the thing" law — any frozen frame should be shareable). If the pulled frame lands on a transition or mid-animation, nudge the timestamp a few tenths of a second and re-extract.
+
+### Bake the poster as frame 0
+
+A bare `.mp4` has no `poster` attribute — every player and platform picks its own idle thumbnail, and almost all of them grab **frame 0**. Slack, Twitter/X, and Discord regenerate thumbnails server-side and ignore embedded cover-art metadata, so the *only* reliable way to control the idle image everywhere is to make frame 0 *be* the poster.
+
+Replace **only** the first frame's pixels with `brag.jpg`, leaving every other frame and all timing untouched — same duration, same frame count, audio copied through. At 30fps the poster shows for 1/30s before the intro rolls, so it's imperceptible on playback but it's what every thumbnail grabber sees. From `brag-output`:
+
+```bash
+ffmpeg -y -i brag.mp4 -i brag.jpg \
+ -filter_complex "[0:v][1:v]overlay=0:0:enable='eq(n,0)'[v]" \
+ -map "[v]" -map 0:a? -c:v libx264 -crf 18 -preset slow -pix_fmt yuv420p \
+ -c:a copy -movflags +faststart brag.poster.mp4 \
+ && mv brag.poster.mp4 brag.mp4
+```
+
+The poster (`brag.jpg`) matches the video's dimensions because it was pulled from the same render, so the overlay lines up exactly. Keep `brag.jpg` alongside — it's the custom-thumbnail asset for platforms that accept an upload (Instagram, TikTok, YouTube, Facebook, and the LinkedIn post editor) and the `poster="brag.jpg"` image for any `<video>` that embeds the brag (a gallery card, the user's site).
## Write share copy