Skip to content

loop render: --blur N motion blur, --webm and --apng output - #85

Merged
IsraelWebDev merged 2 commits into
mainfrom
feat/loop-blur-webm-apng
Nov 30, 2026
Merged

IsraelWebDev merged 2 commits into
mainfrom
feat/loop-blur-webm-apng

Conversation

@IsraelWebDev

Copy link
Copy Markdown
Owner

What

funkbox loop render gets three options (and the loop_render MCP tool gets the same three arguments):

  • --blur N (1-16, default 1 = off): motion blur by temporal supersampling. Each frame is the mean of N sub-frames spread over a half-frame shutter, centred on the frame.
  • --webm: also write a VP9 .webm (Opus if there is audio).
  • --apng: also write a looping, silent .apng.

Why

From the repo scout (claude/repo-scout-feature-plan-2026-11-29.md, item 2; idea from anidoodle, Apache-2.0, no code copied). Engine only, no browser.

Behaviour worth knowing

  • Loop time wraps (t mod 1), so frame 0 blends with the end of the loop and the seam stays seamless. The loop check still runs first.
  • Cost is N times the render time; capped at 16.
  • Film grain gets softer under blur (it is averaged along with everything else).
  • webm and apng are made from the mp4 pass (same approach as the GIF), so they are a second lossy encode. --target delivers an MP4 and refuses them.

Tests

tests/test_loop_blur_formats.py: sub-frame count and shutter spread, wrap at the seam, blur range check, webm/apng containers (header bytes and the APNG acTL chunk), CLI flags and the --target refusal. A real GL render with --blur 4 --webm --apng was also run locally. The full suite is left to CI.

Not included

No change to the hosted repo. No new dependency.


Generated by Claude Code

Blur averages N sub-frames per frame across a half-frame shutter, wrapping loop time so the seam stays seamless. webm and apng are made from the mp4 pass. Also on the loop_render MCP tool.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qYKdYke3ySSZS76W9Tp34
@IsraelWebDev
IsraelWebDev marked this pull request as ready for review November 30, 2026 00:31
@IsraelWebDev
IsraelWebDev merged commit bb061a1 into main Nov 30, 2026
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