Skip to content

Video compressor: filename field, poster JPEG and embed snippet - #332

Merged
simonw merged 2 commits into
mainfrom
claude/video-compression-tool-enhancements-kpfrnk
Sep 7, 2026
Merged

Video compressor: filename field, poster JPEG and embed snippet#332
simonw merged 2 commits into
mainfrom
claude/video-compression-tool-enhancements-kpfrnk

Conversation

@simonw

@simonw simonw commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Modify most recently added video compression tool

Add a form field for the filename - populate it automatically from the selected file but allow user to edit it. Use that as the base filename for the download links (adding -medium.mp4 etc to them)

Add a feature where the first frame of the video is automatically converted to a JPG (from the original video) with a size and download button - show this under the videos

Always have the tool show the HTML video tag for embedding the video on the page (use the first of the displayed video filenames) which uses <video> and <source> and has a JPEG poster (same filename as the downloadable JPEG) and whatever attributes causes the video to only load if you click play

Add a "XHTML checkbox (default unchecked) that shows valid XHTML instead of HTML

Have buttons on the different video sizes that cause the JPEG to be resized to match the dimensions of that video, only visible if the current dimensions do not match

Use quality 0.85 for the JPEG

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

- Add an editable filename field, populated from the chosen file, that
  drives every download name (name-medium.mp4, name-small.mp4, ...) and
  updates existing results when edited
- Extract the first frame of the original video as a JPEG, shown under the
  results with its size and a download button. ffmpeg writes the frame as a
  PNG and the browser converts it, because encoding straight to JPEG with
  the mjpeg encoder crashed the ffmpeg.wasm worker
- Always show a <video>/<source> embed snippet for the first displayed
  video, with the JPEG as its poster and preload="none" so nothing downloads
  until play is pressed
- Add a Playwright test for the new features and share the ffmpeg core
  cache routing between tests

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LEWEx4Q6xnTbJ6DqdW1jP6
@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 commented Sep 7, 2026

Copy link
Copy Markdown
Owner Author

Add a "XHTML checkbox (default unchecked) that shows valid XHTML instead of HTML

Have buttons on the different video sizes that cause the JPEG to be resized to match the dimensions of that video, only visible if the current dimensions do not match

Use quality 0.85 for the JPEG

…lity 0.85

- Add an XHTML checkbox (off by default) to the embed snippet that writes
  boolean attributes in full and self-closes the <source> element
- Keep the extracted PNG frame and give each encoded version a "Resize
  poster to WxH" button, shown only while the poster's dimensions differ
  from that version's, that regenerates the JPEG at that size
- Encode the poster JPEG at quality 0.85
- Extend the Playwright test to cover both

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LEWEx4Q6xnTbJ6DqdW1jP6
@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: 456967d
Status: ✅  Deploy successful!
Preview URL: https://c58057d7.tools-b1q.pages.dev
Branch Preview URL: https://claude-video-compression-too.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 36e1518 into main Sep 7, 2026
1 of 4 checks passed
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