Skip to content

Editor suite step 1: export presets, encoder fix, editor lane - #220

Open
ColinGPT9 wants to merge 3 commits into
editor-suite/step-0-guardrailsfrom
editor-suite/step-1-export-presets
Open

ColinGPT9 wants to merge 3 commits into
editor-suite/step-0-guardrailsfrom
editor-suite/step-1-export-presets

Conversation

@ColinGPT9

@ColinGPT9 ColinGPT9 commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Step 1 of the editor suite (docs/editor-suite/): export in other sizes, qualities and formats, and under a size limit if you want one, for everyone, with no plugin. Stacked on #218 (step 0): merge that first. This branch is then rebased onto main.

Closes #203. Refs #177, sizes only, so it isn't closed: the requester wants sharper 4K, and 1440p and 2160p here are made from the 1080p clip. Native 4K masters come in a later phase.

What's in it

  • Settings → Export (new card). Original, the default, saves the clip's own file exactly as before. Custom offers:
    • Size: 720p to 2160p, or a custom size from 720 to 4096. Sizes under 720p were removed on purpose.
    • Shape: the clip's own, 9:16, 16:9, 1:1, 4:5 or custom, filled by cropping, a blurred background or colour bars.
    • Quality: Smallest, Balanced, High, or your own quality number or bitrate.
    • Format: H.264, HEVC, or AV1 where the graphics card makes it. Made on picks the processor or the graphics card.
    • Frame rate and sound bitrate.
    • Keep files under a size limit: a tick box, off by default. Ticked, it shows the MB box, with a ⚠ Slower marker whose tooltip says why.
    • The card shows about how big a minute comes out. It warns when the picture would be enlarged, or when a limit is too small for long clips.
  • Size limits:
    • A limit never goes below a measured watchable floor: 700 kbps of H.264 at 1080x1920 60 fps, scaled for size, frame rate and codec. A file that can't fit at that floor is marked "over the size limit" with the reason.
    • A clip that may fit is made exactly as without the limit, checked, and made again only if it came out over. The smallest file made is kept, so a limit never makes a file bigger.
  • Editor lane (server/editor_lane.py): Export and Export all run beside the processing queue, not behind it. They run at below-normal priority, one FFmpeg at a time, with progress, Cancel and the result (name, size, width × height).
  • Encoder fix: encoding.configure(config) runs once at startup, and encoder_for(codec, pref) serves exports. An export can no longer flip the global encoder, and video.encoder in settings.yaml now reaches every render. This is the only change to plain clipping, and only for someone who forces an encoder.
  • WoopSocial: an opt-in "Make a smaller copy when a clip is over 100 MB". A clip WoopSocial would refuse is sent as a copy under about 95 MB, which is deleted afterwards. Off, uploads are exactly as before.
  • Docs:
    • the user guide's export section;
    • the API contract for the UI (docs/editor-suite/api/step1-export.md);
    • decision records ED5 and ED6;
    • state.json and STATUS.md;
    • CHANGELOG.

How it was checked

  • QC (independent): the CI-light suite, typecheck, build, argv snapshots and golden renders.
    • 1,857,492 no-limit FFmpeg argument lists are unchanged through the fix round.
    • 646,464 limited plans were swept, and none is estimated bigger than without the limit.
    • The plain pipeline's snapshots and golden renders are untouched.
    • 21 defects were found over the rounds, all fixed; state.json lists them.
  • Black-box tester, using only the running app and the user guide. It ran 10 scenarios, then a re-test of 7 after the fix round:
    • Original is byte-identical, and a 150 s 1080p60 clip at High comes out at 95,707,128 bytes under a 100 MB limit.
    • Keep under 5 MB now gives a watchable 16 MB file, marked over the limit with its reason. Before, it was a colourless, partly grey file reported as a success.
    • High with and without "Keep under 100" now gives the same file (same sha256). Before, it was 8.1 MB against 11.2 MB.
    • Size estimates came within +5.5% to -10.3% of the real files.
  • Performance: the plain pipeline is within +0.9% / -1.2% of the base, with byte-identical outputs. There is one named exception, below.
  • UX: keyboard, the accessibility tree, axe-core (0 violations in step 1's parts) and three window sizes. 12 minor issues over two rounds, all fixed. The warnings take keyboard focus, and a warning that appears is announced.
  • Docs audit: three auditors checked every export sentence in the guide, the card, the API contract, ED5 and the changelog against the code, and each finding was verified. About 30 sentences were reworded.
  • Not checked: hardware encoders (NVENC, AMF, QSV, AV1) were checked as FFmpeg arguments only, because the dev PC's NVIDIA driver is older than the bundled FFmpeg needs. The packaged app wasn't built.

Size limits: the owner's decision

With a size limit, a clip that may fit is made as without the limit first, so a limit never makes a file bigger. One that comes out over is then made again (2-pass). On the processor, Keep under 100 MB at Balanced on a 150 s 1080p60 clip took 232 s, against 122 s in this step's first version, for the same file.

The owner kept that rule and made the limit something people turn on knowingly. It's a tick box, off by default, and when ticked, ⚠ Slower explains the cost (b40cb32).

Open (recorded in STATUS.md)

  • Estimates:
    • a changed frame rate is under-estimated (1.31x at 30 fps, 1.47x at 24 fps);
    • bars, blur and very calm clips are over-estimated;
    • H.264 Balanced came out 9-17% over its estimate on 4 real clips.
  • Custom shapes: one longer than about 5.7:1 comes out under 720 on its short side (documented).

Found in existing code (not changed here)

  • FastAPI answers 500 instead of 422 for a request holding a number that parses to inf or nan. This is app-wide and also in the released app.
  • The Original export copy answers 500 for a clip id SQLite can't hold.
  • A NUL character in an export folder name is cut at the NUL on Windows.

🤖 Generated with Claude Code

ColinGPT9 and others added 2 commits November 6, 2026 01:01
Export presets for every user, with no plugin (#177 sizes, #203):
- Sizes 240p-2160p (an upscale is marked), shapes 9:16, 16:9, 1:1,
  4:5 or custom (crop, blurred background or colour bars), quality
  Smallest / Balanced / High / Custom, H.264 or HEVC (AV1 and graphics
  cards only where this PC can encode them), frame rate, sound and a
  "Keep under N MB" target with a size check afterwards.
- A size estimate before export. "Original" stays the default and is
  still a plain copy of the file.
- Exports run on a new editor lane: one FFmpeg at a time at
  below-normal priority, with progress and cancel, so a long
  processing job no longer blocks an export.
- WoopSocial can send a smaller copy of a clip over 100 MB (off by
  default).
- Settings has an Export card. The Clip Editor shows progress, cancel
  and the result.
- A forced video.encoder now reaches every encode and no longer flips
  the global choice.

Plain auto-clipping is unchanged: argv snapshots and golden renders
are identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… file bigger

The black-box test of step 1 found two faults outside its scenarios: Keep
under 5 MB gave a colourless, partly grey file reported as a success, and a
generous limit made files bigger. The HEVC estimate was also 30-50% high.

- A size limit's bitrate never goes below a measured watchable floor (700
  kbps of H.264 at 1080x1920 60 fps, scaled for size, frame rate and codec).
  A limit that leaves less gives a file at the floor, marked over the limit
  as too small, and the Settings card warns beforehand.
- A clip that may fit, or whose size can't be told beforehand, is made
  exactly as without the limit, checked, and made again only if it came out
  over; the smallest file made is kept. Only a clip whose size is known and
  whose whole estimate is over the limit is held to it from the start.
- HEVC's estimate is measured for x265 (0.88-1.09x on 4 real clips).
- A graphics card that fails while making a file again hands it to the CPU
  (H.264 and HEVC), as a failed first try does.
- Export sizes start at 720p (the owner's call): 240p to 540p are gone, a
  custom size is 720 to 4096, and a saved smaller size loads as 720p.
- UX: choices no longer jump or get undone, Enter keeps focus, tooltips sit
  on the controls, the progress row is announced once, the warnings take
  keyboard focus and are announced, and the result keeps its warning whole.
- Every export sentence in the guide, the card, the API contract, ED5 and
  the changelog was checked against the code and reworded where a case
  broke it.

No-limit FFmpeg arguments are unchanged (1,857,492 compared), and the
plain pipeline's snapshots and golden renders are untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clips-kitty-web Ready Ready Preview Nov 7, 2026 5:58am UTC
1 Skipped Deployment
Project Deployment Actions Updated
clips-studio Ignored Ignored Preview Nov 7, 2026 5:58am UTC

… Slower warning

The owner kept the size-limit rule (a limit never makes a file bigger, so a
clip near the limit can be made twice) and asked for it to be something
people turn on knowingly:

- Settings -> Export: "Keep files under a size limit" is a tick box, off by
  default (max_mb null). Ticking it shows the MB box under it, filled with
  the last limit used (remembered in the browser) or 100, and a
  "Slower" warning marker whose tooltip says why. The engine is unchanged.
- WoopSocial's smaller-copy tooltip, its user-guide section and its
  changelog line say what it does with no caveats; the tooltip is on the
  tick box too, for keyboard and screen-reader users.
- The user guide, changelog, API contract, state.json and STATUS.md record
  the decision.

Checked: independent QC (CI-light suite: the same 27 local failures as
main; snapshots, typecheck and build pass), and a UX check in the browser
build (layout matches the owner's preview, keyboard, saved values, axe 0 in
the card).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview – clips-kitty-web — b40cb321 Deployed Nov 7, 2026 by vercel[bot]
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.

1 participant