Skip to content

Five smaller things found rendering on Windows: font URLs, a missing 3D manifest, --quality, a stale export after an .svg edit, a doc line #28

Closed

Description

@JimGHTB12

All checked on raea 0.1.0-canary.2 on Windows 11, with code references to main at cc729f2. Happy to split any of these into its own issue or PR.

1. @font-face from /media/, from media/, or in brand.css falls back on Windows

The three forms sdk/guides/craft/motion/brand.md recommends all fall back. file:/// and data: URLs load. I put one face (League Gothic, not installed) in the edit's media/fonts/lg.woff2 and declared it five ways. --at 0 --manifest m.json gives the laid-out width of "Brand fonts load here" at 64 px:

src Width Loaded
url("/media/fonts/lg.woff2") in a <style> 552.7 no, same as a family that doesn't exist
url("media/fonts/lg.woff2") in a <style> 552.7 no
url("/media/fonts/lg.woff2") in brand/brand.css, through styles.gen 552.7 no
url("file:///C:/…/media/fonts/lg.woff2") 359.5 yes
data:font/woff2;base64,… 359.5 yes

For the inline <style>, media_urls (runtime/page/src/elements.rs:169-170) writes the resolved path with .display(), so it becomes C:\…. The page reads that as a URL with scheme c. raea_io_home::src already fixes exactly this for <img>, so the likely fix is one line: raea_io_home::src(&media_path(dir, url)). brand.css and imported CSS don't go through media_urls at all, and the relative form isn't resolved from the edit's folder. I haven't tested macOS or Linux.

2. A 3D still or --at with --manifest never writes the manifest

raea render scene.tsx --at 0,30 -o dir/ --manifest m.json on a composition with a Canvas3D prints APPLIED and writes no m.json. The 3D stills branch returns at runtime/export/src/render.rs:247 without writing it, as render.rs:301-303 does for 2D. A manifest left over from an earlier run stays in place and looks current.

3. --quality does nothing on Windows

--quality draft and --quality master give byte-identical MP4s (539,013 bytes, same MD5) for the same 2D clip. openh264 never reads EncodeOpts.quality, and io/codec/src/lib.rs:154 says so. The raea skill says master "keeps thin type and hard vector edges clean at 4K" and that a render is "H.264 High". On Windows it's Constrained Baseline at the default bitrate either way. A one-time note on stderr when the backend ignores --quality would make that visible.

4. The export cache returns the old video after an .svg edit

Render a composition with <img src="/media/logo.svg" />, change the SVG's fill from red to blue, and render again. The second run prints "the same export as before: from the export cache" and the video is still red. With RAEA_EXPORT_CACHE=0 it's blue. The cache key walks the edit's folder for a fixed list of extensions (runtime/bundle/src/cache.rs:72 with MEDIA_EXTS), and svg, jpeg and other image types the page loads aren't on it. Since a false miss only costs a render, keying on every file in the folder would be the safe side.

5. ShaderMesh's doc says "Uniforms are set at load"

sdk/render/src/3d/bevy.tsx:97. Uniforms are applied again on any frame where they change, and the shader isn't recompiled. Agents reading the SDK source for types take the line literally. Something like "Uniforms may change from frame to frame; the shader isn't compiled again" would fix it.

Activity

  1. JimGHTB12 commented on Nov 8, 2026

    @JimGHTB12
    ContributorAuthor

    Note

    🤖 Claude Opus 5.5 responding on behalf of JimGHTB12

    More on item 1. The inline <style> case is two problems, not one. media_urls writes the Windows path into the CSS with backslashes (elements.rs:170, .display()), and CSS reads backslashes as escapes. So the path is mangled before the URL scheme even matters. For a composition under C:\Users\<user>\AppData\Local\Temp\…, url("/media/fonts/not-here.woff2") reached FileNet as:

    raea-page: file:///?%0C:Users<user>ppDataLocalTemp%0Claude%EF%BF%BD…
    

    The \A and \c became control characters, and a run of hex digits after a backslash became U+FFFD. Writing the path as a file URL with raea_io_home::src, as <img> does, avoids both, because a file URL has no backslashes.

  2. added 5 commits that reference this issue on Nov 8, 2026
  3. shinyobjectz commented on Nov 8, 2026

    @shinyobjectz
    Owner

    Thank you, @JimGHTB12. All five reproduced as described, and the code references made each one quick to find. Four are fixed on main, one commit each, and item 1 has gone to the Windows lane.

    2. No manifest from a 3D still: ca41f80. The 3D stills branch returned before writing the manifest. Now all three render paths write it through one function (write_manifest in runtime/export). A 3D still's manifest has the frames' boxes and text as drawn and the 3D clipping check, and no sounds. bench/at-3d/check.sh now requires the --at render's manifest to list its four frames. It fails on the raea before the fix and passes after. A 2D render's manifest is byte-identical before and after.

    3. --quality on openh264: 298d324, plus a doc fix in f0094cb. openh264 had nothing that read the quality. The crate offers no constant-quality mode that works:

    • A fixed QP with rate control off is dropped, because the crate never sets the layer's QP.
    • openh264's Quality mode, and a pinned QP range under Bitrate mode, both fail on encode with Native:3.

    So on openh264 the quality now scales the bitrate (raea_io_soft::quality_kbps), doubling for each 0.1 above high:

    • high (0.85) keeps the given bitrate.
    • master gets twice the bitrate.
    • draft gets under a fifth.
    • With no --quality, nothing changes.

    io/soft/tests/quality.rs encodes three seconds of 640x360 at draft, high and master, and requires each to be at least a quarter larger than the one before. Before the fix, all three were the same file. Since the quality now takes effect, I didn't add the stderr note you suggested. The skill's "H.264 High" line is still true only of VideoToolbox and ffmpeg; on openh264 a render is still Constrained Baseline. I've passed that line on rather than edit it here.

    4. Stale export after an .svg edit: 6998f9e. As you suggested, the cache key now takes every file in the edit's folder; dot-files, the output, and the exports the cache itself wrote stay out as before. runtime/bundle/tests/cache_inputs.rs checks that an edited logo.svg and shot.jpeg each change the key. It failed on the .svg before the fix.

    5. ShaderMesh doc: 1dca9ac. It now reads "Uniforms may change from frame to frame (they're set again on any frame where they change); the shader isn't compiled again."

    1. Font URLs on Windows paths goes to the Windows lane, along with your follow-up about backslashes read as CSS escapes. Writing the path through raea_io_home::src as <img> does looks right for the inline <style>. brand.css, imported CSS, and resolving the relative form from the edit's folder need the same treatment. I'll leave this issue open for that.

  4. shinyobjectz commented on Nov 8, 2026

    @shinyobjectz
    Owner

    1. Font URLs on Windows paths: 67114ed. Every stylesheet url() that names a file now goes through one rewriter, css_file_urls in runtime/bundle/src/urls.rs. That covers inline <style> text, style props, brand.css and the CSS a bundle imports. Each file is written through raea_io_home::src as <img> does, so on Windows it becomes file:///C:/... with no backslashes. That means no CSS escapes and no C: scheme. A relative URL starts from the stylesheet's own folder (brand/ for brand.css, the edit's folder otherwise), and /media/ starts from the edit's. The unit tests run a C:\Users\...\AppData\Local\Temp\... path on any system and check the result.

    Two more things came out of this issue:

    Fixed QP on openh264: 0c419d8. The optimized (mezz) copy's quantiser was silently ignored, as the issues lane found for fixed QP. With rate control off, openh264 writes QP 26 whatever QP is asked for: QP 12 and QP 40 gave byte-identical files. A fixed QP now uses openh264's Quality mode with the QP range pinned. That mode needs a nonzero bitrate, and once the QP is pinned the bitrate changes nothing. It refuses a pinned QP under 14 (Native:3), so a lower request gets 14. At QP 16, a frame of extreme detail (synthetic noise, about 1.6 MB a 1080p frame) overflows openh264's buffer, and the copy is then made again at QP 26, as every copy was before. io/soft/tests/quality.rs covers this.

    The skill's "H.264 High": c791866. SKILL.md now says H.264 High and AAC on a Mac, and Constrained Baseline and Opus (openh264) on Windows and Linux.

    A suggestion for a later change, not made here: the Native:3 errors with Quality mode and a pinned QP range came from a QP under 14 or a bitrate of 0. A pinned QP of 14 or more with any sane nonzero bitrate works. That gives --quality on openh264 a true constant-quality path (quality → QP) as an alternative to scaling the bitrate.

    That covers all five items.

  5. shinyobjectz commented on Nov 8, 2026

    @shinyobjectz
    Owner

    All five are in main now (the issues lane's four and the Windows-only three). Thanks for the thorough report. If anything still looks off on Windows with the next canary, please reopen or file a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions