diff --git a/deploy/README.md b/deploy/README.md index 878ec8e..fb811f0 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -132,8 +132,13 @@ pointing at its original URL rather than losing the post. **The recommended flow is to put a recording on catcrafts.net before writing the post, and use that URL as the post's link.** Run `tools/publish-media.sh -recording.mp4`; it transcodes, uploads to the media mount under its content hash, -and prints a `https://catcrafts.net/media/.mp4` URL to paste into the post. +recording.mp4`; it transcodes to AV1 *and* an H.264 sibling, uploads both to the +media mount under the AV1's content hash, and prints a +`https://catcrafts.net/media/.h264.mp4` URL to paste into the post. The +H.264 one on purpose: a post's link is fetched raw — Lemmy apps and browsers play +that exact file, with no negotiation in front of it — so it must be the encoding +everything can play. (An AV1 link posted before this existed drew "bad media +error" reports from iPhones within hours.) `fetch-media.sh` recognises its own origin and **adopts** such a URL: it rewrites it to `/media/` and probes the local file for dimensions, downloading @@ -143,6 +148,12 @@ file host once hit `MAX_BYTES` (64 MB), so the entry kept its original URL, and the deploy then failed the e2e "media origin" check on a file that was sitting on our own disk the entire time. +Adopting a `.h264.mp4` URL swaps the AV1 sibling back in as the page's +primary `` when it is on the mount, keeping the H.264 as the fallback +``. So the post links the compatible file, while browsers that can take +AV1 download the small one — the `codecs` parameter on the first source is what +lets the rest skip it. + The transcode matters as much as the hosting. Phone recordings are wildly oversized for what they show — that same 167 MB clip was 78 s of a dark room at 17 Mbps, and denoising into AV1 gives the same picture in 15 MB. It also **bakes @@ -154,15 +165,18 @@ correct too — but transcoding means nothing downstream has to know.) Two things to know about publishing AV1: -* Nothing emits a fallback encoding and `