Inspect, Transcribe & Sync
Media inspection with camera color metadata, local and vision-model descriptions, custom OpenAI-compatible providers, free on-device Parakeet transcription, and multi-recording synchronization.
Before assembling an edit, an agent needs exact technical facts, word-level transcripts, visual observations, and tight alignment across cameras and external audio recorders.
Inspecting Media (skywrite inspect)
skywrite inspect reads container and stream metadata via ffprobe:
skywrite inspect camera-a.mp4 camera-b.mp4 recorder.wav
skywrite inspect recorder.mp3 --exact-audio
Key fields returned in JSON:
- Timing. Header duration is explicitly labeled
metadata_estimate(VBR MP3 headers can overstate playtime). Passing--exact-audiodecodes the first audio stream to a null sink and reports exact counted samples, sample rate, decoded sample duration, and last audio presentation end relative to the source origin. Exact timing is cached underaudio-timing-v2/keyed by source SHA-256 and the exact installed FFmpegbuild_sha256. - Display geometry & pixels. Reports
rotation(display-matrix degrees such as-90or90for portrait phone footage; quarter turns swap displayed width and height) andpix_fmt(e.g.,yuv420p,argb). - Camera color metadata. Reports FFmpeg’s decoded
color_transfer,color_primaries,color_space, range, pixel format, container tags, and—for MXF—raw transfer, primaries, and coding-equation header labels. Private camera labels (such as Canon’s) are shown raw and marked as not publicly decodable; Skywrite never guesses an encoding from pixels. Once confirmed by an operator, declare it in your edit’ssources[].coloralong with a matching.cubefile insources[].lut.
Local Sampling & Analysis (skywrite analyze)
To let a vision-capable coding agent inspect footage without calling OpenRouter, extract uniform local frames into the content-addressed cache:
skywrite analyze camera-a.mp4 --local --frames 12 -o camera-a.local.json
--local writes a JSON manifest and persistent JPEGs under ~/.cache/skywrite/assets/<sha256>/frames/<sampling-key>/. Because paths are content-addressed, copied files reuse cached frames. Frame times are source playback seconds.
For model-assisted analysis, select a model via --model, SKYWRITE_ANALYSIS_MODEL, or skywrite defaults analysis set MODEL:
skywrite models list --task analysis --input image
skywrite analyze camera-a.mp4 --model YOUR_VISION_MODEL \
--prompt 'Find useful interview selects and cutaways' -o camera-a.analysis.json
skywrite analyze recorder.wav --model YOUR_AUDIO_CAPABLE_MODEL \
--transcript recorder.transcript.json -o recorder.analysis.json
- Use
--start SECONDS --duration SECONDSto bound the analyzed range. - Audio-only remote analysis without a transcript sends at most the first 60 seconds of the selected range and labels that coverage.
- Any transcript passed to
analyze --transcriptmust carry a matchingusage.source_sha256(checked before model requests).
[!TIP] Uniform frame samples are sparse evidence—they do not establish exact shot boundaries or catch brief gestures. Use
describe frames --aroundorreview sheetaround candidate cuts.
Frame & Video Descriptions (skywrite describe)
skywrite describe queries a vision model for structured observations of exact frames or short re-encoded video clips.
# Coarse survey: every 30th frame on the source's absolute frame grid
skywrite describe frames interview.mp4 --every 30 -o survey.json
# Dense pass around a candidate cut, with advisory cast hints
skywrite describe frames interview.mp4 --around 125.4 --window 1 --cast cast.json -o cut-125.json
# Dry run: extract frames and report cache hits & planned requests without calling a model
skywrite describe frames interview.mp4 --interval 2 --dry-run
# Short video range (re-encoded H.264, up to 480p by default, no audio)
skywrite describe video interview.mp4 --start 56 --duration 8 -o moment.json
# Inspect everything cached for a source (read-only, no network)
skywrite describe cache interview.mp4
Grid Alignment, Caching & Bounds
- Absolute grid reuse.
--every Nselects frames whose index is a multiple ofN;--interval Sselects the first decoded frame of eachS-second bucket aligned to the first video frame. A dense pass around a cut automatically reuses frames already described during a coarse survey. - Upright sizing. Frames fit within 768 px by their displayed (post-rotation) shape (9:16 portrait footage renders at
432×768) and are saved underassets/<sha256>/exact-frames/. - Cache identity. Frame descriptions cache by source SHA-256, exact presentation time, frame size, provider, model, prompt version, and cast. Rerunning or widening a pass never pays twice; fully cached runs need no API key. Failed frames are never cached.
- Limits & concurrency.
--max-framesdefaults to600;--concurrencydefaults to4(up to16; set--concurrency 1for single-slot local servers).describe videoaccepts--height 240..1080(default 480 max, never upscaled) and caps ranges at 600 seconds and 17 MiB encoded. - Transcript attachment.
describe frames --transcript words.jsonattaches spoken words around each frame locally (without sending them to the vision model) after verifyingusage.source_sha256.
Targeted Queries with --focus & --focus-schema
When a workflow needs specific structured facts—face bounding boxes, logo visibility, or sign text—add repeatable --focus TEXT (or --focus-file FILE, up to 16 items / 4,000 bytes) and optionally a JSON Schema with --focus-schema FILE:
skywrite describe frames interview.mp4 --interval 1 \
--focus "bounding box of every visible human face" \
--focus-schema faces.json -o faces-out.json
Example faces.json using Skywrite’s coordinate annotations ("x-skywrite": "box" or "point"):
{
"type": "object",
"additionalProperties": false,
"required": ["faces"],
"properties": {
"faces": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["box", "position"],
"properties": {
"box": { "x-skywrite": "box" },
"position": { "type": "string" }
}
}
}
}
}
- Coordinates. Normalized
0..1relative to the displayed (upright) frame, origin top-left ([x1, y1, x2, y2]for boxes,[x, y]for points). Values within0.02outside0..1are clamped (counted inclamped); larger out-of-range or inverted values fail validation. Coordinates are model estimates, not detector outputs—inspect the saved frame image before relying on them. - Validation & retry. Focus schemas support up to 16 KiB, depth 8, and 256 nodes (standard subset;
$ref,oneOf,patternare rejected). Invalid model answers receive one corrective retry; if still invalid, the frame records a typed error (focus_schema_mismatch,focus_invalid_json, orfocus_request_failed) and is not cached. - Separate focus cache. Focus answers cache under
focus-answers/separately from general descriptions. If a frame’s general description is already cached, adding--focusissues a focus-only request without re-paying for the description. Valid answers that fail to write to disk still return withcache_error.
Advisory Cast Files (--cast)
Provide text-only appearance hints (no reference photos, face recognition, or biometrics):
{
"version": 1,
"people": [
{ "name": "Alex", "description": "short silver hair, charcoal jacket, red tie; usually at the podium" },
{ "name": "Host", "description": "long dark hair, green blazer" }
]
}
Each frame or clip adds cast_matches (with the deciding feature and runner-up) and cast_present. Treat matches as advisory hints and confirm visually.
OpenRouter & Local / Custom Providers
By default, media-understanding requests to OpenRouter (transcribe, analyze, describe, edit suggest) route only to providers that neither train on nor retain data (data_collection: deny plus zero-data-retention zdr). Override with SKYWRITE_DATA_POLICY=no-training or provider-default.
You can register any OpenAI-compatible server—local llama-server, Ollama, LM Studio, or another hosted endpoint—once by name:
# Local llama.cpp server (keyless)
llama-server -hf ggml-org/Qwen3-VL-2B-Instruct-GGUF --host 127.0.0.1 --port 8080 -c 8192
skywrite providers add local --base-url http://127.0.0.1:8080/v1
# Ollama or LM Studio
skywrite providers add ollama --base-url http://127.0.0.1:11434/v1 --timeout 900
skywrite providers add lms --base-url http://127.0.0.1:1234/v1
# Remote OpenAI-compatible API (stores only the env var name, never the key)
skywrite providers add hosted --base-url https://api.example.com/v1 --key-env EXAMPLE_API_KEY
skywrite providers list
skywrite models list --provider local
skywrite describe frames interview.mp4 --every 30 --model local:Qwen3-VL-2B-Instruct-GGUF
PROVIDER:MODEL Rules & Security
- Syntax. The provider name is the prefix before the first
:, only when no/appears before that colon. Everything after:is passed verbatim to the provider (ollama:qwen3:0.8b,lms:qwen/qwen3-vl-4b). Bare IDs and IDs with/before:(vendor/model:free) stay on OpenRouter. - No silent fallback. Unknown providers error immediately rather than falling back to OpenRouter. Reserved names (
openrouter,ondevice, and OpenRouter variant keywords such asfree,thinking,nitro,floor,online,extended,exacto) cannot be registered. - Key isolation.
OPENROUTER_API_KEYcannot be set as a custom provider’s--key-env, and credential-like custom--headernames (Authorization,Cookie,*key*,*token*,*secret*,*password*) are refused. Plainhttp://outside loopback/private ranges emits a warning. - Supported tasks. Custom providers serve
analysis,frame-description,video-description(if the server acceptsvideo_url),editing, andtranscription(standard multipart/audio/transcriptionswith word timestamps). OpenRouter-only routing fields (SKYWRITE_DATA_POLICY,X-Title,usageaccounting) are never sent to custom providers. Generation tasks (image,video,speech,music,video-upscaling) remain OpenRouter-only.
Transcription (Remote & Free On-Device Parakeet)
Skywrite produces word-timestamped JSON transcripts from any audio or video file:
# Remote default (ElevenLabs Scribe v2 via OpenRouter; requires OPENROUTER_API_KEY)
skywrite transcribe recorder.wav -o recorder.transcript.json
# Bound to a slice of the file (word times stay relative to full source start)
skywrite transcribe interview.mp4 --start 120 --duration 60 -o slice.transcript.json
Free On-Device Transcription (NVIDIA Parakeet TDT 0.6B v3)
The built-in ondevice provider runs NVIDIA Parakeet TDT 0.6B v3 inside Skywrite (transcribe.cpp on ggml). It requires no API key, incurs zero cost, and never sends audio over the network:
# Explicit one-time download (740 MB, 8-bit GGUF; resumable & SHA-256 verified)
skywrite models download ondevice:parakeet-tdt-0.6b-v3
# Transcribe offline (or pass --download to fetch on first use)
skywrite transcribe interview.mp4 --model ondevice:parakeet-tdt-0.6b-v3 -o words.json
# Optional: make it your default transcription model
skywrite defaults transcription set ondevice:parakeet-tdt-0.6b-v3
# Inspect status/licence or delete weights later
skywrite models list --provider ondevice
skywrite models remove ondevice:parakeet-tdt-0.6b-v3
| Property | On-Device Parakeet (ondevice:parakeet-tdt-0.6b-v3) |
|---|---|
| Model artifact | 739,508,576 bytes (~740 MB) Q8_0 GGUF from a pinned Hugging Face revision; verified against pinned size & SHA-256 on download and before every load |
| Storage location | <cache>/ondevice/parakeet-tdt-0.6b-v3/ (deleted only by models remove, unaffected by --no-cache) |
| Hardware & memory | ~1.5 GB RAM on CPU (0.3 GB with Metal on Apple Silicon). Linux x86-64 requires AVX2, FMA, F16C, and BMI2 (2013+ CPUs); ARM64 requires ARMv8-A |
| Measured speed (60 s chunk) | ~1.8 s on Apple M4 (Metal; ~20 s one-time shader compile on first run), ~9.5–12 s M4 CPU, ~16 s on 4 x86-64 cores |
| Languages | 25 European languages auto-detected (bg, hr, cs, da, nl, en, et, fi, fr, de, el, hu, it, lv, lt, mt, pl, pt, ro, ru, sk, sl, es, sv, uk) |
| Word timing & style | 80 ms token steps (model’s own timings, never estimated); keeps fewer fillers/restarts than default elevenlabs/scribe-v2 |
| License | CC BY 4.0 (NVIDIA Parakeet TDT 0.6B v3; Q8_0 GGUF conversion by handy-computer) |
Transcript Integrity & Guarantees
All transcription backends (OpenRouter, custom multipart servers, and ondevice:) enforce the same safeguards:
- Real word timestamps only. Audio is sent in bounded 16-kHz mono WAV chunks (60 s default; configurable 10–120 s). Responses without actual word timestamps are rejected rather than estimated. Non-speech tags (e.g.,
[laughs]) are not stored as words. Out-of-order provider words are stably sorted and reported inusage.word_ordering. - Content fingerprint (
usage.source_sha256). Every generated transcript records the 64-hex SHA-256 of the source media bytes. Every downstream command that binds a transcript to media—analyze --transcript,edit suggest,describe frames --transcript,review lint --transcript, andfrom_transcriptsedit caption tracks—verifies this hash before running (byte-identical copies are accepted; missing or mismatched hashes fail). - Low-audio hallucination warnings. Words whose underlying audio is near silent or ≥ 30 dB below the chunk’s typical word level carry
audio_level_dbfsand incrementusage.low_audio_wordsso agents know to double-check potential hallucinations on ambient noise. - Bilingual footage warning. Pass
--languageonly when all speech is in that language—Whisper models translate other languages into the hinted language when--languageis set.
Multi-Recording Synchronization (skywrite sync)
skywrite sync aligns an --asset recording (such as a separate audio recorder or B-cam) against a --reference recording whose clock your timeline follows (usually the A-cam on V1).
# Local waveform alignment (no API call)
skywrite sync --reference camera-a.mp4 --asset recorder.wav --method audio -o recorder.sync.json
# Speech-only alignment from transcripts (when recordings share no acoustic room sound)
skywrite transcribe camera-a.mp4 -o camera-a.transcript.json
skywrite transcribe recorder.wav -o recorder.transcript.json
skywrite sync --reference camera-a.transcript.json --asset recorder.transcript.json -o recorder.sync.json
Every sync result maps asset time into reference time:
reference_time = offset_seconds + scale * asset_time
playback_rate = 1 / scale # edit clip `speed` for the asset
A negative offset_seconds means the asset started recording before the reference.
Drift, Discontinuous Takes & Diagnostics
- Audio waveform alignment. Finds coarse hypotheses from the audio energy envelope, then measures waveform anchors (2 s windows, pre-emphasis, sub-sample peak interpolation) every 2 s across the overlap (up to 1,800 anchors; default 1-hour limit per file, adjustable with
--max-audio-seconds). On dual-system takes with scratch-mic damage and 20–208 ppm clock drift, 2- to 60-minute takes align within ~1.5 ms. - Transcript alignment. Uses word/phrase anchors with robust affine fitting (
--method autoselects transcripts automatically when both inputs are.json). Becausesync --method transcriptcompares words directly without binding to media, it does not requireusage.source_sha256. - Quality & safety checks. Results report
method(audio_waveform,audio_envelope,transcript),quality(strongorlimited),drift_estimated,drift_ppm,anchor_span_seconds,median_error_seconds,p95_error_seconds, andstrong_p95_limit_seconds. Multiple equally supported passages fail with an"ambiguous synchronization"error instead of guessing. - Discontinuous recordings. When a take has a cut, dropout, or recorder restart,
discontinuous: trueis returned with per-stretch entries insegments(each carrying its ownasset_range, offset, scale, and quality; boundaries located to ~0.3 s and trimmed 0.3 s short of boundaries so no audio is placed with the wrong mapping). - Acoustic delay note. Microphone distance adds ~3 ms of acoustic delay per metre; synchronizing to scratch audio does not independently certify camera lip sync.
Applying & Verifying Sync (sync apply --verify)
Use sync apply instead of doing placement arithmetic by hand:
skywrite sync apply --sync recorder.sync.json --edit edit.json -o edit.synced.json --verify
For each clip of the reference recording (or a specific --clip TRACK:CLIP):
- Adds the asset on a new audio track (
--track,--role, defaultdialogue), placingstarton the first output frame where the asset has sound, preserving the sub-frame remainder insource_in, settingspeed = playback_rate(multiplied by the reference clip’s speed if not1), trimming duration to the real overlap, and muting the reference clip’s scratch audio (pass--keep-reference-audioto preserve it). - Handles
discontinuousresults by placing every segment automatically and reporting anyuncoveredregions. - Refuses results that are not
strongwithdrift_estimated: true(or that fell back toaudio_envelope) unless--allow-limitedis explicitly passed after checking by ear. - With
--verify, renders each placed clip and re-syncs it against the matching reference stretch;verify.passedrequires a singlestrong, continuous re-sync within 2 ms at both ends (clips shorter than 15 s, or against reference clips outside ±3% of speed1, are skipped and listed).