What this thread does
Set Motion2Code's viewport with --size when SVG inference selects an icon or falls back to landscape; the stage-selection patch remains proposed, not merged (Lovis Odin's renderer, kevin9327, PR #1).
Do first: from the repository root, render with an explicit portrait viewport:
python3 skills/motion2code/scripts/render_anim.py index.html --size 1080x1920 -o anim.mp4
This source-derived example uses the repository script path, its documented viewport option and the portrait dimensions in PR #1; substitute your HTML file and intended stage dimensions (renderer, PR #1). The README requires Python 3.9+, ffmpeg and Playwright for browser scripts; an installed skill's script location differs from this repository-root example.
Diagnostic: portrait stage captured as 24×24 or 1920×1080
kevin9327's October 21 PR #1 reports incorrect size selection “without any warning”. This is one contributor's parser reproduction, not a runtime error message.
Not for: general HTML/SVG diagram checks.
Findings
- Affected code boundary: the October 20 helper snapshot
0f003288searches for the first matching SVG viewBox with double quotes and falls back to 1920×1080. Itsparse_sizefunction uses explicit dimensions when provided. The report specifies no operating system or numbered package release; this is a source-snapshot diagnosis. - Earlier icon wins: kevin9327's reproducer places a 24×24 icon SVG before the stage SVG with a 1080×1920 viewBox. The existing helper returns the icon's dimensions rather than the stage's. The same report identifies
render_anim.py,frame_diff.pyandcheck_anim.py --runtimeas consumers of this inference when no size override is supplied (PR #1). - Quote style causes the other failure: with single-quoted stage markup, the contributor reports a 1920×1080 fallback instead of portrait dimensions. The official helper's double-quote pattern corroborates this distinction (PR #1, helper).
- Override versus output scaling: the official renderer labels
--sizeas viewport width and height, while--widthscales the output video. Use the former for capture dimensions; output-width scaling is a different operation (argument definitions). - Proposed fix and availability: kevin9327's open PR #1 prefers the stage SVG, accepts either quote style, then retains a first-viewBox fallback and the landscape default. The author reports two of five parser cases failing before the patch and all five passing afterward. The PR is proposed, not merged; it identifies no released version containing this parser change.
Limits
The independent evidence is one contributor's sizing reproduction and reported parser checks. It does not establish animation fidelity, timing correctness or compatibility across browser and operating-system versions. An explicit viewport does not resolve unrelated page layout problems, and the sources provide no numbered affected-release range.
Started from a post by @Lovis Odin, packaged by the editor. Original post