Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions site/scripts/landing-recordings.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Expected assets (all at 1280 × 800):

Encoded videos stay local and are ignored by Git and Docker; PNG posters stay
in the repository so Astro can optimize them. Published videos live in the
Cloudflare R2 bucket `fanout-assets`, served at `https://assets.fanout.run/`.
Cloudflare R2 bucket `fanout`, served at `https://assets.fanout.run/`.

Each slot stays poster-only until both themes have both video formats in
`site/src/data/landing-media.json`. An absent manifest also shows posters. The
Expand Down Expand Up @@ -111,7 +111,7 @@ It writes VP9 WebM and H.264
MP4 at 1280 × 800 and 30 fps with a two-pass target of about 4 MB per file.
It extracts each PNG poster from the final encoded frame. Review the clips and
posters, then upload from the repository root with Wrangler logged in to the
account that owns `fanout-assets`:
account that owns `fanout`:

```sh
bash site/scripts/upload-clips.sh
Expand Down
2 changes: 1 addition & 1 deletion site/scripts/upload-clips.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function uploadClips({ input = defaultInput, manifestPath = defaultManife
const file = join(input, filename);
const { key, url } = clipObject(name, format, readFileSync(file));
if (manifest[name]?.[format] === url) continue;
upload(["r2", "object", "put", `fanout-assets/${key}`, "--file", file,
upload(["r2", "object", "put", `fanout/${key}`, "--file", file,
"--content-type", `video/${format}`, "--cache-control", "public, max-age=31536000, immutable", "--remote"]);
manifest[name] = { ...manifest[name], [format]: url };
}
Expand Down
2 changes: 1 addition & 1 deletion site/scripts/upload-clips.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ require("node:fs").appendFileSync(process.env.CLIP_UPLOAD_LOG, JSON.stringify(pr
const manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
for (const [index, [name, format]] of names.flatMap(name => ["mp4", "webm"].map(format => [name, format])).entries()) {
const { key, url } = clipObject(name, format, Buffer.from("abc"));
assert.deepEqual(uploads[index], ["r2", "object", "put", `fanout-assets/${key}`, "--file", join(input, `${name}.${format}`),
assert.deepEqual(uploads[index], ["r2", "object", "put", `fanout/${key}`, "--file", join(input, `${name}.${format}`),
"--content-type", `video/${format}`, "--cache-control", "public, max-age=31536000, immutable", "--remote"]);
assert.equal(manifest[name][format], url);
}
Expand Down
Loading