Skip to content

programmatic video rendering framework that is actually fast

feat: Host the landing page on Cloudflare at fframes.studio (#140)

Dmitriy Kovalenko3aaacb572dde
diff --git a/.github/workflows/landing.yml b/.github/workflows/landing.yml
new file mode 100644
index 00000000..255d98df
--- /dev/null
+++ b/.github/workflows/landing.yml
@@ -0,0 +1,95 @@
+name: Landing
+on:
+ push:
+ branches: [ main ]
+ paths: [ "landing/**", ".github/workflows/landing.yml" ]
+ pull_request:
+ types: [ opened, synchronize, reopened, closed ]
+ paths: [ "landing/**", ".github/workflows/landing.yml" ]
+ workflow_dispatch:
+
+# Deploys never overlap, the newest push wins
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
+permissions:
+ contents: read
+ pull-requests: write
+
+# The site is plain files: wrangler uploads landing/ as static assets, nothing is installed or built
+env:
+ CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+
+jobs:
+ deploy:
+ name: Deploy to Cloudflare
+ if: github.event_name != 'pull_request'
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: landing
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+
+ - name: Deploy
+ run: npx --yes wrangler@4 deploy
+
+ # One Preview per pull request (pr-<number>), its URL is commented on the PR
+ preview:
+ name: Preview on Cloudflare
+ if: github.event_name == 'pull_request' && github.event.action != 'closed'
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: landing
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+
+ # Forks get no secrets, they only check that the files deploy
+ - name: Check
+ if: github.event.pull_request.head.repo.full_name != github.repository
+ run: npx --yes wrangler@4 deploy --dry-run
+
+ - name: Create or update Preview
+ id: preview
+ if: github.event.pull_request.head.repo.full_name == github.repository
+ run: |
+ set -o pipefail
+ output="$(npx --yes wrangler@4 preview --name "pr-${{ github.event.pull_request.number }}" --json)"
+ url="$(printf '%s' "$output" | jq -er '.preview.urls[0]')"
+ echo "url=$url" >> "$GITHUB_OUTPUT"
+
+ - name: Comment Preview URL
+ if: steps.preview.outputs.url
+ run: gh pr comment "$PR" --edit-last --create-if-none --body "Landing preview → $URL"
+ env:
+ GH_TOKEN: ${{ github.token }}
+ PR: ${{ github.event.pull_request.number }}
+ URL: ${{ steps.preview.outputs.url }}
+
+ preview-cleanup:
+ name: Delete Preview
+ if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.head.repo.full_name == github.repository
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: landing
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Delete Preview
+ run: npx --yes wrangler@4 preview delete --name "pr-${{ github.event.pull_request.number }}" --skip-confirmation
diff --git a/justfile b/justfile
index 03ff0192..72e80bdf 100644
--- a/justfile
+++ b/justfile
@@ -102,3 +102,7 @@ test *ARGS:
# Render a markdown file in the terminal (defaults to the agent guidelines)
md file="AGENTS.md":
bat {{file}}
+
+# Encode a rendered video into the landing page's AV1 + H.264 demo files
+landing-video input:
+ scripts/landing-video.sh {{input}}
diff --git a/landing/.assetsignore b/landing/.assetsignore
new file mode 100644
index 00000000..fddccbcb
--- /dev/null
+++ b/landing/.assetsignore
@@ -0,0 +1,2 @@
+wrangler.jsonc
+.assetsignore
diff --git a/landing/fframes-demo.av1.mp4 b/landing/fframes-demo.av1.mp4
new file mode 100644
index 00000000..ced56b7e
Binary files /dev/null and b/landing/fframes-demo.av1.mp4 differ
diff --git a/landing/fframes-demo.mp4 b/landing/fframes-demo.mp4
index 95687a6c..61885288 100644
Binary files a/landing/fframes-demo.mp4 and b/landing/fframes-demo.mp4 differ
diff --git a/landing/index.html b/landing/index.html
index e3cb2cdc..17b09a04 100644
--- a/landing/index.html
+++ b/landing/index.html
@@ -239,6 +239,7 @@
letter-spacing: -0.045em;
text-wrap: balance;
}
+ h1 .name,
h1 .accent {
font-family: var(--font-accent);
font-style: italic;
@@ -248,6 +249,8 @@
line-height: 0.9;
white-space: nowrap;
padding-right: .04em;
+ }
+ h1 .accent {
background-image: linear-gradient(90deg, var(--orange), var(--orange));
background-repeat: no-repeat;
background-position: 0 92%;
@@ -494,13 +497,15 @@
<meta property="og:site_name" content="fframes" />
<meta property="og:title" content="fframes – video vibe coding framework that is actually fast" />
<meta property="og:description" content="Stop wasting hours waiting for video to be built from the web page in a browser. Vibe code your video on GPU using Rust &amp; SVG framework." />
- <!-- TODO: link previews need absolute URLs once the site has a domain, e.g. https://fframes.dev/brand/og-image.png -->
- <meta property="og:image" content="brand/og-image.png" />
+ <link rel="canonical" href="https://fframes.studio/" />
+ <meta property="og:url" content="https://fframes.studio/" />
+ <meta property="og:image" content="https://fframes.studio/brand/og-image.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="twitter:card" content="summary_large_image" />
- <meta name="twitter:image" content="brand/og-image.png" />
+ <meta name="twitter:image" content="https://fframes.studio/brand/og-image.png" />
<!-- /fframes brand -->
+ <script defer data-domain="fframes.studio" src="https://plausible.io/js/plausible.js"></script>
</head>
<body>
<div class="light-leak" aria-hidden="true"></div>
@@ -539,7 +544,7 @@
<main id="top" class="wrap">
<section class="masthead">
- <h1>fframes – video vibe coding framework that is <span class="accent">actually fast</span></h1>
+ <h1><span class="name">fframes</span> – video vibe coding framework that is <span class="accent">actually fast</span></h1>
<div class="standfirst">
<span class="rule" aria-hidden="true"></span>
<p>Stop wasting hours waiting for video to be built from the web page in a browser. Vibe code your video on GPU using Rust &amp; SVG framework.</p>
@@ -548,7 +553,10 @@
<figure>
<div class="video-frame">
- <video src="fframes-demo.mp4" poster="poster.jpg" autoplay muted loop playsinline controls preload="metadata" aria-label="A video made with fframes"></video>
+ <video poster="poster.jpg" autoplay muted loop playsinline controls preload="metadata" aria-label="A video made with fframes">
+ <source src="fframes-demo.av1.mp4" type='video/mp4; codecs="av01.0.09M.10, mp4a.40.2"'>
+ <source src="fframes-demo.mp4" type='video/mp4; codecs="avc1.64002a, mp4a.40.2"'>
+ </video>
</div>
<figcaption>
<svg viewBox="0 0 34 30" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
diff --git a/landing/wrangler.jsonc b/landing/wrangler.jsonc
new file mode 100644
index 00000000..bbeed00a
--- /dev/null
+++ b/landing/wrangler.jsonc
@@ -0,0 +1,11 @@
+// Deployed as static assets by .github/workflows/landing.yml
+{
+ "name": "fframes",
+ "account_id": "86ddf0334885d2955aa80c778509d857",
+ "compatibility_date": "2026-09-01",
+ "assets": { "directory": "." },
+ "workers_dev": true,
+ "preview_urls": true,
+ // Pull requests get their own Preview URL, same files, no separate settings
+ "previews": {}
+}
diff --git a/scripts/landing-video.sh b/scripts/landing-video.sh
new file mode 100755
index 00000000..6f2fb677
--- /dev/null
+++ b/scripts/landing-video.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+# Encodes a rendered video into the two files the landing page plays:
+#
+# scripts/landing-video.sh out.mp4
+#
+# landing/fframes-demo.av1.mp4 AV1 10-bit, played by browsers with AV1 support
+# landing/fframes-demo.mp4 H.264 [email protected], the fallback for everything else
+#
+# Both use AAC audio and have the index at the front (faststart) so playback starts before
+# the download finishes. Cloudflare rejects files over 25 MiB, so keep each one below that.
+set -euo pipefail
+
+input="${1:?usage: scripts/landing-video.sh <rendered-video>}"
+out="$(cd "$(dirname "$0")/.." && pwd)/landing"
+tmp="$(mktemp -d)"
+trap 'rm -rf "$tmp"' EXIT
+
+ffmpeg -hide_banner -loglevel error -y -i "$input" \
+ -c:v libsvtav1 -preset 4 -crf 30 -g 120 -pix_fmt yuv420p10le -svtav1-params tune=0 \
+ -c:a aac -b:a 96k -movflags +faststart "$tmp/fframes-demo.av1.mp4"
+
+ffmpeg -hide_banner -loglevel error -y -i "$input" \
+ -c:v libx264 -preset slow -crf 21 -profile:v high -level:v 4.2 -pix_fmt yuv420p -g 120 \
+ -c:a aac -b:a 96k -movflags +faststart "$tmp/fframes-demo.mp4"
+
+limit=$((25 * 1024 * 1024))
+for file in "$tmp"/*.mp4; do
+ size=$(wc -c <"$file")
+ if [ "$size" -gt "$limit" ]; then
+ echo "error: $(basename "$file") is $((size / 1024 / 1024)) MiB, Cloudflare serves at most 25 MiB" >&2
+ exit 1
+ fi
+done
+
+mv "$tmp"/*.mp4 "$out/"
+ls -lh "$out"/fframes-demo*.mp4