Export & Takumi Graphics
Exporting Edit JSON v1 to Premiere XML, FCPXML 1.10, native FFmpeg MP4, standalone Python scripts, Hyperframes, and Remotion, importing Premiere XML, and rendering native still graphics with embedded Takumi.
Once an edit passes validation and lint, Skywrite can render it directly to MP4, emit a standalone Python/FFmpeg script, export timelines for desktop NLEs, scaffold code-driven video compositions, or import an editor’s NLE timeline back into Edit JSON v1. It also embeds upstream Takumi for native HTML/JSON title cards and diagrams.
Export Target Matrix
Unsupported target features are reported explicitly in the JSON output rather than silently discarded.
| Feature | Native MP4 / Python Script | Premiere XML (xmeml) |
FCPXML 1.10 | Remotion | Hyperframes |
|---|---|---|---|---|---|
| Layers, timing, constant speed | Yes | Yes | Yes | Yes | Yes |
| Opacity & picture fades | Yes | Opacity keyframes | adjust-blend |
Yes | Yes (GSAP) |
| Volume, keyframes & audio fades | Yes | Audio Levels keyframes | adjust-volume |
Yes | Constant volume only |
.cube LUTs |
Yes | Warning (apply in NLE) | Warning | Warning | Warning |
Master limiter (limiter_db) |
Yes | Warning | Warning | Warning | Warning |
Sub-frame source_in |
Yes (exact) | Rounded to frames (warned) | Yes (exact) | Rounded to frames | Yes |
| Captions & chapters | Yes (soft or burn-in) | Sidecar .srt + chapter markers |
Native <caption> + markers |
Sidecars | Sidecars |
Pauses (pauses[]) |
Ignored | Sequence Pause markers |
<marker value="Pause"> |
Ignored | Ignored |
Every edit render and edit export output includes external_sources listing any file resolved outside the edit JSON’s directory.
Native MP4 Render & Standalone Python Script
# Direct H.264 / AAC MP4 render
skywrite edit render edit.json -o preview.mp4
# Dialogue-only stem render (all audible tracks must declare a `role`)
skywrite edit render edit.json --roles dialogue -o dialogue-check.mp4
# Export a self-contained Python 3 + FFmpeg script (stdlib only, no shell invocation)
skywrite edit export edit.json --to ffmpeg -o render.py
python3 render.py --output preview.mp4
Frame-Exact Placement & Audio Time-Stretching (--stretcher)
Both the native renderer and exported Python script place every clip on exact output grid frames at integer and NTSC rates (23.976, 25, 29.97, 30, 59.94, 60 fps). Output frame n of a clip displays the source frame on screen at source_in + n × speed / fps, keeping picture locked to 48-kHz audio.
Audio follows speed in three regimes:
speed == 1: Passes through unchanged at 48 kHz.- Within ±0.1% of 1 (clock-drift conform, e.g.
skywrite sync): Resampled for sample-exact timing over any length (< 1.8 cents pitch shift). - Larger creative speed changes: Pitch-preserving time-stretching selected via
--stretcher:
--stretcher |
Behavior |
|---|---|
auto (default) |
Uses FFmpeg’s rubberband (window=short:channels=together) if available, otherwise falls back to atempo with a warning |
rubberband |
Requires rubberband; fails if missing |
atempo |
Always uses atempo |
Skywrite compensates rubberband’s speed-dependent filter latency by prepending 16,384 time-reversed source samples (avoiding artificial silence-onset dips) and calibrating the exact sample offset with five 50 ms bursts per distinct speed (up to 64 speeds per command), chaining 2× stages above 2×. In benchmarks on FFmpeg 8.0.1 / librubberband 4.0, compensated rubberband lands within ~0.5–5 ms across 0.5×–2× (vs −36 to −3 ms for atempo). The JSON output records the chosen stretcher and measured calibration under audio_stretcher.
The exported Python script uses only the Python standard library, passes argument lists directly to FFmpeg (never a shell), protects its own script and all source inputs from overwrite, and cleans up its owned FFmpeg process group on SIGINT/SIGTERM on Linux (waitid(WNOWAIT)).
Premiere XML (xmeml v5) & --media-root
skywrite edit export edit.json --to premiere -o edit.xml
# Cloud / remote export rewritten for an editor's local folder (macOS, Linux, or Windows)
skywrite edit export edits/cut.json --to premiere -o edits/cut.xml \
--media-root /Users/sam/Projects/film
- Structure. Writes Final Cut Pro 7 XML (
xmemlv5) with Premiere’sexplodedTracksstereo channel layout, separate mono tracks (mixed mono/stereo tracks split with a warning), Time Remap for speed, Opacity keyframes, Audio Levels keyframes, and Basic Motion Scale fitting (using displayed upright size for square-pixel sources; omitted when scale is exactly 100%). - Captions. Premiere XML cannot embed captions; Skywrite writes each caption track automatically beside the XML as
NAME.<lang>.srtfor side-by-side import. - Cross-machine relinking (
--media-root). Rewrites source URLs relative tomedia_base(the deepest common directory of the edit and its sources) onto the editor’s absolute--media-root(including Windows paths like'D:\Projects\film'). Duplicate basenames trigger a warning because NLE auto-relinking matches by filename. - Verification status. Structure and timing are checked independently with OpenTimelineIO. Live import into Premiere Pro
26.5.2(macOS) was verified for stereo/mono tracks, Audio Levels keyframes, fades,23.976fps cut alignment, one-frame tail trimming,--media-rootlinking, and Time Remap speed; captions, Opacity keyframes, and Basic Motion Scale were outside that check.
FCPXML 1.10 (Final Cut Pro / DaVinci Resolve)
skywrite edit export edit.json --to fcpxml -o edit.fcpxml
skywrite edit export edit.json --to fcpxml -o edit.fcpxml --media-root /Users/sam/Projects/film
- Uses rational time values, absolute
file://URLs to original media, and a full-length gap anchoring each track as an independent connected storyline (video tracks above, audio tracks below) so retiming one track never shifts another. - Carries audio roles (
dialogue,music,effects), constant retiming (timeMap),adjust-blend,adjust-volume, chapter andPausemarkers, and native<caption>elements (SRT role). - Important caveats. FCPXML generation on Linux cannot certify Final Cut Pro or DaVinci Resolve import fidelity—check imported timelines in your NLE, especially native captions and rotated phone footage (source
<format>elements record stored dimensions without an explicit transform, leaving conform to the NLE).
Importing Premiere XML & .prproj Back (edit import)
Bring an editor’s NLE timeline back into Edit JSON v1:
skywrite edit import premiere-export.xml --output edit.json
skywrite edit import project.prproj --output edit.json # experimental, read-only
- Premiere / FCP 7 XML (supported). Reconstructs video layers, linked audio (merging matching enabled/muted audio onto video clips and splitting mismatched or unlinked audio onto independent audio tracks), stereo partner tracks, Time Remap speed, Opacity and Audio Levels keyframes, fades, ranged
Pausemarkers (intopauses[]), and other markers (intochapters[]). Unsupported generators, transitions, and effects are reported explicitly rather than silently dropped. .prproj(experimental, read-only). Reads clip placement, in points, and media paths only. Skywrite never writes.prproj; prefer exporting FCP 7 XML from Premiere.
Hyperframes & Remotion Projects
Scaffold editable motion-graphics projects with copied media (up to 20 GiB total media; target directory must not exist even with --overwrite; --media-root is refused):
skywrite edit export edit.json --to hyperframes -o hyperframes-project
skywrite edit export edit.json --to remotion -o remotion-project
- Hyperframes. Generates an HTML/GSAP composition project and
READMEfor the Hyperframes CLI (audio supports constant volume only; pinned GSAP may need network or a vendor cache). - Remotion. Generates a React composition project (
npm install,npm run studio,npm run render). Currently requires integer FPS (use FFmpeg/FCPXML for rational NTSC rates) and is governed by Remotion’s own license. - Captions & chapters. Both exports write SRT/VTT, FFmetadata, and JSON sidecars without applying them automatically. After rendering, attach soft/burned captions and chapters in one step:
skywrite captions mux rendered.mp4 --edit edit.json --output finished.mp4
Native Still Graphics with Embedded Takumi (image render)
Skywrite embeds upstream takumi = 2.20.0 (with its from-html feature) directly inside the Rust binary. Rendering title cards, lower thirds, diagrams, and social frames requires no browser, no JavaScript runtime, no FFmpeg, no external Takumi binary, and no system fonts.
# Render an HTML fragment to transparent PNG using the bundled Geist font
skywrite image render --file title.html -o title.png --width 1280 --height 720
# Render a Takumi JSON node tree to WebP with a local font
skywrite image render --file card.json -o card.webp --quality 90 --font ./Brand.ttf
# Explicitly load Google Fonts (cached locally; --offline reuses cache without network)
skywrite image render --file title.html -o title.png --google-font 'Inter:wght@400;700'
skywrite image render --file title.html -o title-2.png --google-font 'Inter:wght@400;700' --offline
HTML & JSON Templates
HTML templates (.html/.htm) support inline style attributes and Takumi’s tw utility attribute (Tailwind-like layout/color/typography utilities, not a full browser or Tailwind compiler). Because upstream’s HTML entry point discards stylesheets, <style> and <link> tags are explicitly rejected with guidance to use inline styles.
<div tw="flex flex-col items-center justify-center w-full h-full bg-slate-950 text-white" style="font-family: Inter;">
<h1 style="font-size: 72px; font-weight: 700;">Chapter 1: Architecture</h1>
<p style="font-size: 32px; color: #94a3b8;">Zero-browser native rendering</p>
</div>
Or pass an upstream Takumi JSON node tree directly (.json):
{
"type": "text",
"text": "Hello from Takumi",
"style": { "fontSize": 48, "color": "white" }
}
Output Formats, Typography & Google Fonts
- Formats. Inferred from the output extension (or set explicitly): PNG (lossless with alpha; rejects
--quality), WebP, and JPEG (--quality 0..100, default75). - Bundled & local fonts. An unmodified Geist variable font is embedded (SIL Open Font License 1.1). Load extra
.ttf,.otf,.woff, or.woff2files with repeatable--font PATHand reference their family name in your template. - Explicit Google Fonts (
--google-font). Supports CSS2 axis selectors (Inter:wght@400;700,Inter:wght@100..900,Crimson Pro:ital,wght@0,400;1,700). Only the selector anddisplay=swapare sent to Google’s CSS2 endpoint—never your HTML, template text, ortext=subsets. Assets must come from HTTPSfonts.gstatic.com/s/with redirects rejected, and are stored under<cache>/fonts/google/with SHA-256 verification on every reuse (including--offline). No OpenRouter key is used.
Security & Resource Limits
Rendering makes zero network requests unless a --google-font misses the cache. Image src attributes resolve strictly to local raster files relative to the template—remote URLs, data URIs, inline buffers, SVGs, and CSS background images are unsupported.
| Resource | Hard Input Limit |
|---|---|
| Template file | 1 MiB, max 4,096 rendered nodes, max nesting depth 64 |
| Canvas dimensions | 1..8192 px per side, max 16 megapixels |
| Local raster images | Max 64 images, 16 MP per image, 32 MP combined, 16 MiB per image |
| Extra fonts | Max 16 font files total (local + Google), max 8 --google-font selectors, 16 MiB/local font, 8 MiB/Google font, 128 KiB CSS |
| Combined extra resources | 32 MiB across all extra images and fonts |
| Google Fonts network timeouts | 15 s connect, 60 s per request, 120 s total deadline |
Outputs are published atomically, existing files require --overwrite, and the template, loaded fonts, and loaded images cannot be overwritten by the output.