feat: give studio an output shape - #152
Open
nmbrthirteen wants to merge 1 commit into
Open
Conversation
`process` has taken --format since formats.py was written to be the single source of truth for clip dimensions. `studio` never did, and had 1080x1920 baked into all three of its stages: the fragment render, the two bookend cards, and the concat that stitches them. The pieces were already there. generate_clip takes a format and clip_studio never passed one; render-bookend.mjs takes --width and --height and clip_studio never passed those either; only the concat filtergraph genuinely hardcoded the canvas. All three now read one FormatSpec, so they cannot disagree about the shape and a square fragment is no longer pillarboxed onto a vertical canvas by the last step. Additive throughout. --format defaults to vertical, every stage defaults to the 1080x1920 it used before, and a caller that builds the namespace without a format at all still gets the old behaviour rather than a crash. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe ChangesStudio format support
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant cmd_studio
participant clip_studio.py
participant RemotionRenderer
participant FFmpeg
cmd_studio->>clip_studio.py: forward selected format
clip_studio.py->>clip_studio.py: resolve dimensions with get_format
clip_studio.py->>RemotionRenderer: render fragments and bookends
clip_studio.py->>FFmpeg: normalize and concatenate videos
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
podcli studionow takes--format vertical|horizontal|square, the same choiceprocesshas always offered.Why
services/formats.pyexists, in its own words, so "the render pipeline is parameterized on format instead of hardcoding 1080x1920 per call site".studiowas the call site that missed it, and had the vertical canvas baked into all three of its stages: the fragment render, the two bookend cards, and the concat that stitches them.How
Most of it was already wired and simply never passed:
generate_cliphas taken aformatargument all along;clip_studio.pynever gave it one.render-bookend.mjsalready accepts--widthand--height;clip_studio.pynever gave it those either.All three stages now read one
FormatSpec, so they cannot disagree. That last one matters on its own: without it, a correctly rendered square fragment would be pillarboxed back onto a vertical canvas by the final step.Compatibility
Additive.
--formatdefaults tovertical, every stage defaults to the 1080x1920 it used before, and a caller that builds the namespace without aformatat all still gets the old behaviour rather than anAttributeError. No existing caller changes shape.Tests
611 pass, up from 603. The 8 new ones cover the hand-off from
cmd_studioto the render script, the defaults on all three stages, and that the concat stops normalising onto the wrong canvas.tests/test_ai_fallback.py::test_find_cli_falls_back_to_shell_lookupfails on my machine and fails identically on untouchedmain: it finds a realclaudeat~/.local/binthat the test's mock does not isolate. Unrelated to this change.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Tests