The source for the catcrafts.net website
  • C++ 75.9%
  • Shell 17%
  • CSS 5.6%
  • WGSL 1.1%
  • JavaScript 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf a625176c7d
All checks were successful
Deploy / build-deploy (push) Successful in 7m30s
media: H.264 fallback beside every AV1, and the post links the H.264
The AV1-only publish lasted four hours in the wild: the first viewer on
mobile Safari got "bad media error" from the raw file, because a post's
link is fetched raw — Lemmy apps and browsers play that exact URL, with
no <source> negotiation in front of it. The previous commit's note
("--raw ... if that audience matters") had it backwards: the audience
that cannot play AV1 is not a per-post judgement call, it is whoever
happens to open the thread on an iPhone.

So publish-media.sh now emits two encodings and points the post at the
compatible one:

  * Every video transcode also produces <hash>.h264.mp4 (x264 crf 23,
    same denoise, same frames), uploaded beside the AV1 under the AV1's
    hash — the poster's sibling-naming trick, reused, so fetch-media.sh
    finds it by name with nothing to look up.
  * The printed URL to paste into the post is the H.264 one. pict-rs
    can thumbnail it too, so instance thumbnails come back as a bonus.

fetch-media.sh adopting an own-origin .h264.mp4 URL swaps the AV1 back
in as the page's primary when it is on the mount, and records the H.264
as `fallback` in posts.json. The renderer turns a non-empty fallback
into a <source> pair: the AV1 first with an explicit codecs parameter —
both files are video/mp4, so the parameter is the only thing that lets
a non-AV1 browser skip to the file it can play — and the H.264 second.
Browsers with AV1 keep downloading the small file; Safari before 17
gets one that plays instead of an element that will not.

e2e gains the matching conditional gate: a page offering an av01
<source> must offer an .h264.mp4 one, so an AV1 video can never again
ship without its fallback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 03:14:51 +02:00
.forgejo/workflows media: publish to our own origin instead of mirroring a file host 2026-08-08 01:16:17 +02:00
content SEO 2026-08-06 23:42:25 +02:00
deploy media: H.264 fallback beside every AV1, and the post links the H.264 2026-08-08 03:14:51 +02:00
images new logo 2026-08-05 23:52:40 +02:00
implementations rewrite 2026-08-05 04:18:37 +02:00
interfaces rewrite 2026-08-05 04:18:37 +02:00
server SEO 2026-08-06 23:42:25 +02:00
shaders webgpu demo 2026-07-19 01:13:30 +02:00
shared/interfaces media: H.264 fallback beside every AV1, and the post links the H.264 2026-08-08 03:14:51 +02:00
styles changes 2026-08-05 22:32:03 +02:00
tools media: H.264 fallback beside every AV1, and the post links the H.264 2026-08-08 03:14:51 +02:00
.gitignore rewrite 2026-08-05 04:18:37 +02:00
catcrafts-head.js rewrite 2026-08-05 04:18:37 +02:00
favicon.svg new logo 2026-08-05 23:52:40 +02:00
LICENSE inital commit 2025-11-12 20:58:07 +01:00
project.cpp ci fix 2026-08-05 05:50:01 +02:00
README.md webgpu demo 2026-07-19 01:13:30 +02:00
robots.txt about page 2026-08-05 07:05:00 +02:00

catcrafts.net

This is the source code for catcrafts.net, a website built entirely in C++ using the Crafter.Graphics library.

crafter-build -r

This will compile the project and serve it locally on http:://localhost:8080.

This project is source available for educational and viewing purposes only. No permission is granted to copy, modify, distribute, or create derivative works.