Skip to content

Add video compressor tool using ffmpeg.wasm - #331

Merged
simonw merged 2 commits into
mainfrom
claude/video-compression-wasm-ffmpeg-6uduj9
Sep 7, 2026
Merged

Add video compressor tool using ffmpeg.wasm#331
simonw merged 2 commits into
mainfrom
claude/video-compression-wasm-ffmpeg-6uduj9

Conversation

@simonw

@simonw simonw commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Build a tool where I can open a video file and it uses Wasm Ffmpeg to present me with several alternative versions of that video at different file sizes so I can pick the smallest one that is still good, each file must be a .mp4 that will work in as many mobile browsers and operating systems as possible, describe your plan before building it

Add an option for omitting audio

Opens a video and encodes several smaller MP4 versions of it entirely in
the browser so the smallest acceptable one can be picked. Every output is
H.264 (Main profile by default) + AAC in a faststart MP4 with yuv420p,
even dimensions and a 1080p cap, for maximum mobile compatibility.

Vendors the two small @ffmpeg/ffmpeg 0.12.15 wrapper files into
ffmpeg-wasm/ because the Web Worker must be same-origin; the 32 MB
@ffmpeg/core is loaded from jsDelivr at runtime.

Includes Playwright tests with a small H.264/AAC fixture and a pure
Python MP4 box parser that checks the profile, level, audio codec and
faststart layout of the encoded files.

Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01QHTdJZ4xg6TZfDXCmuvAE9

Opens a video and encodes several smaller MP4 versions of it entirely in
the browser so the smallest acceptable one can be picked. Every output is
H.264 (Main profile by default) + AAC in a faststart MP4 with yuv420p,
even dimensions and a 1080p cap, for maximum mobile compatibility.

Vendors the two small @ffmpeg/ffmpeg 0.12.15 wrapper files into
ffmpeg-wasm/ because the Web Worker must be same-origin; the 32 MB
@ffmpeg/core is loaded from jsDelivr at runtime.

Includes Playwright tests with a small H.264/AAC fixture and a pure
Python MP4 box parser that checks the profile, level, audio codec and
faststart layout of the encoded files.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QHTdJZ4xg6TZfDXCmuvAE9
@claude

claude Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

Drops the sound track from every generated version (-an, no audio
stream mapped), greys out the per-version audio bitrate inputs while it
is on, and notes "no audio" on the result cards. The sample-mode test
now also checks the option and confirms the output has no audio track.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QHTdJZ4xg6TZfDXCmuvAE9
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 7, 2026

Copy link
Copy Markdown

Deploying tools with  Cloudflare Pages  Cloudflare Pages

Latest commit: 75e79c5
Status: ✅  Deploy successful!
Preview URL: https://c9f40925.tools-b1q.pages.dev
Branch Preview URL: https://claude-video-compression-was.tools-b1q.pages.dev

View logs

@claude

claude Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

@simonw
simonw merged commit 31769f8 into main Sep 7, 2026
3 of 4 checks passed
@simonw
simonw deleted the claude/video-compression-wasm-ffmpeg-6uduj9 branch September 7, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants