No description
  • TypeScript 98.3%
  • CSS 1.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-03 14:10:28 -04:00
.zed initial commit 2026-07-23 14:16:55 -04:00
public perf improvements, better loading, etc 2026-08-03 14:10:28 -04:00
src perf improvements, better loading, etc 2026-08-03 14:10:28 -04:00
.cta.json initial commit 2026-07-23 14:16:55 -04:00
.gitignore initial commit 2026-07-23 14:16:55 -04:00
.oxfmtrc.json initial commit 2026-07-23 14:16:55 -04:00
bun.lock perf improvements, better loading, etc 2026-08-03 14:10:28 -04:00
package.json perf improvements, better loading, etc 2026-08-03 14:10:28 -04:00
README.md perf improvements, better loading, etc 2026-08-03 14:10:28 -04:00
tsconfig.json initial commit 2026-07-23 14:16:55 -04:00
tsr.config.json initial commit 2026-07-23 14:16:55 -04:00
vite.config.ts perf improvements, better loading, etc 2026-08-03 14:10:28 -04:00
worker-configuration.d.ts initial commit 2026-07-23 14:16:55 -04:00
wrangler.jsonc route / tweak 2026-07-23 14:34:03 -04:00

gifslop

A small TanStack Start app that converts MOV/MP4 videos to GIFs entirely in the browser.

Why client-side?

For a small, occasional-use app this is the simplest and most private architecture:

  • video bytes never leave the device
  • no upload storage, job queue, or conversion server to operate
  • static/serverless-friendly deployment

The app reads only the required parts of the file with Mediabunny, decodes frames with the browser's native WebCodecs implementation, and encodes them in a small gifenc worker pool. High color builds a stable 256-color palette from representative frames across the clip and applies ordered Bayer dithering, closely matching the previous FFmpeg palette pipeline. Balanced uses a 256-color RGB565 palette per frame; Fast uses a smaller 64-color RGB444 palette. The video remains on the device throughout.

Browser and operating-system codec support varies. Videos that cannot be decoded through WebCodecs are reported as unsupported.

The homepage is prerendered by TanStack Start and served through Cloudflare's static asset layer. Width, frame rate, and color mode are validated URL search parameters, so conversion presets can be bookmarked without storing user data.

Develop

bun install
bun --bun run dev

Code quality

The project uses the Oxc toolchain:

bun run format
bun run lint
bun run typecheck
bun run check

Deploy to Cloudflare Workers

The app uses Cloudflare's official Vite plugin with TanStack Start's Worker entrypoint.

bunx wrangler login
bun run deploy

Generate binding types after adding Cloudflare bindings to wrangler.jsonc:

bun run cf-typegen

The editor defaults to five seconds and limits conversions to 30 seconds so a long compressed source cannot create an unbounded browser workload.