conformtools 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +58 -0
  2. package/dist/browser/timeline_core_bg.wasm +0 -0
  3. package/dist/chunk-6TM32YIJ.js +7 -0
  4. package/dist/chunk-7XTBFOUJ.js +3 -0
  5. package/dist/chunk-E6YXZIJS.js +230 -0
  6. package/dist/chunk-GXEVALBL.js +3 -0
  7. package/dist/{chunk-YPRTUS5W.js → chunk-N43NAG5E.js} +1 -1
  8. package/dist/chunk-PSMXHDMX.js +3 -0
  9. package/dist/chunk-PZFWQJCF.js +3 -0
  10. package/dist/chunk-R6WJ6JIQ.js +3 -0
  11. package/dist/chunk-UUDNNFU7.js +3 -0
  12. package/dist/chunk-XDHIIZ6A.js +3 -0
  13. package/dist/chunk-Y2BEEOPB.js +3 -0
  14. package/dist/chunk-ZAHP3ES5.js +3 -0
  15. package/dist/cli.js +5 -4
  16. package/dist/cr3-wasm-CWKEOCYH.js +3 -0
  17. package/dist/dng-wasm-JNFS44V5.js +3 -0
  18. package/dist/dpx-wasm-VNJRFPYY.js +3 -0
  19. package/dist/exr-wasm-5D66YR7A.js +3 -0
  20. package/dist/{h264-JHQCJTWP.js → h264-ZB5DJSNV.js} +1 -1
  21. package/dist/{h264-mxf-4M63NBQK.js → h264-mxf-NVBLGU3V.js} +1 -1
  22. package/dist/http.js +2 -2
  23. package/dist/{inspect-6OM4FTVW.js → inspect-MGSZRRAF.js} +2 -2
  24. package/dist/isobmff-7G55HKDG.js +3 -0
  25. package/dist/mcp.js +11 -9
  26. package/dist/media_core-AISE7FMT.js +9 -0
  27. package/dist/{media_core_bg-XIM7Y4R3.js → media_core_bg-FGAR5KA5.js} +1 -1
  28. package/dist/mxf-YH2A2XLW.js +3 -0
  29. package/dist/{ops-7HVBBXUQ.js → ops-BQDPU4M6.js} +1 -1
  30. package/dist/premiere-uxp/icons/panel.png +0 -0
  31. package/dist/premiere-uxp/icons/panel@2x.png +0 -0
  32. package/dist/premiere-uxp/icons/plugin.png +0 -0
  33. package/dist/premiere-uxp/icons/plugin@2x.png +0 -0
  34. package/dist/premiere-uxp/index.html +38 -0
  35. package/dist/premiere-uxp/index.js +93 -0
  36. package/dist/premiere-uxp/lib/clipmeta.js +170 -0
  37. package/dist/premiere-uxp/lib/ctx.js +62 -0
  38. package/dist/premiere-uxp/lib/handles.js +57 -0
  39. package/dist/premiere-uxp/lib/markers.js +198 -0
  40. package/dist/premiere-uxp/lib/pairing.js +58 -0
  41. package/dist/premiere-uxp/lib/premiere.js +82 -0
  42. package/dist/premiere-uxp/lib/probe.js +139 -0
  43. package/dist/premiere-uxp/lib/protocol.js +165 -0
  44. package/dist/premiere-uxp/lib/render.js +38 -0
  45. package/dist/premiere-uxp/lib/session.js +85 -0
  46. package/dist/premiere-uxp/lib/sizing.js +312 -0
  47. package/dist/premiere-uxp/lib/time.js +82 -0
  48. package/dist/premiere-uxp/lib/timeline.js +336 -0
  49. package/dist/premiere-uxp/lib/verbs.js +20 -0
  50. package/dist/premiere-uxp/lib/write.js +97 -0
  51. package/dist/premiere-uxp/manifest.json +102 -0
  52. package/dist/r3d-T6D3M2XJ.js +3 -0
  53. package/dist/{r3d-AT6NNIY3.js → r3d-U4XTQJXQ.js} +1 -1
  54. package/dist/resolve-bridge.py +551 -0
  55. package/dist/resolve-presets/conform.tools.xml +127 -0
  56. package/dist/skills/auto-conform/SKILL.md +87 -0
  57. package/dist/skills/conform-artist/SKILL.md +68 -0
  58. package/dist/skills/conform-artist/references/avid.md +19 -0
  59. package/dist/skills/conform-artist/references/other-hosts.md +23 -0
  60. package/dist/skills/conform-artist/references/premiere.md +18 -0
  61. package/dist/skills/conform-artist/references/resolve.md +19 -0
  62. package/dist/skills/conform-artist/references/troubleshooting.md +33 -0
  63. package/dist/skills/conform-artist/references/turnover-checklist.md +37 -0
  64. package/dist/skills/delivery-qc/SKILL.md +48 -0
  65. package/dist/sscd-embed-DHFTEIOC.js +3 -0
  66. package/dist/sscd-sweep-OYS4XAID.js +3 -0
  67. package/dist/{still-E4HLCCST.js → still-UFLOAEM4.js} +1 -1
  68. package/dist/tiff-wasm-2CEABW6L.js +3 -0
  69. package/dist/wasm/media_core_bg.wasm +0 -0
  70. package/dist/wasm/udf_bg.wasm +0 -0
  71. package/dist/wasm-threads/media_core_bg.wasm +0 -0
  72. package/dist/{wav-DXF73Y56.js → wav-KNJZMOGX.js} +1 -1
  73. package/package.json +1 -1
  74. package/dist/chunk-35U7WGES.js +0 -3
  75. package/dist/chunk-3XTUTEKJ.js +0 -102
  76. package/dist/chunk-HJXRLQOI.js +0 -3
  77. package/dist/chunk-IDDQR56R.js +0 -7
  78. package/dist/chunk-UUMHVA7R.js +0 -3
  79. package/dist/chunk-WWGQFOB2.js +0 -64
  80. package/dist/cr3-wasm-X6Q4YMUU.js +0 -3
  81. package/dist/dng-wasm-EAB24KDN.js +0 -3
  82. package/dist/dpx-wasm-OX2D24ZB.js +0 -3
  83. package/dist/exr-wasm-Z6BBPJSN.js +0 -3
  84. package/dist/isobmff-XL33CVJR.js +0 -3
  85. package/dist/media_core-VSTO6CS4.js +0 -9
  86. package/dist/mxf-VIANACTI.js +0 -3
  87. package/dist/r3d-2QCFX7UX.js +0 -3
  88. package/dist/sscd-sweep-IXM4OD7O.js +0 -3
  89. package/dist/tiff-wasm-XYTQNL2F.js +0 -3
  90. package/dist/zod-IPSV75LP.js +0 -3
  91. /package/dist/{arriraw-Y5VXHXNX.js → arriraw-3GKCR6K2.js} +0 -0
  92. /package/dist/{chunk-NYB4ISL3.js → chunk-WHY3DVXS.js} +0 -0
  93. /package/dist/{media_core_bg-BKXQLNFA.js → media_core_bg-YK63OUDM.js} +0 -0
  94. /package/dist/{prores-TQEZ3KFH.js → prores-L4JZZWGH.js} +0 -0
  95. /package/dist/{timeline_core_bg-QEOVAIWP.js → timeline_core_bg-2TYWZ35G.js} +0 -0
  96. /package/dist/{udf_bg-UTQ6BVXX.js → udf_bg-A4WEMSAX.js} +0 -0
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: auto-conform
3
+ description: Rebuild an edit from a reference render and a folder of source media with the conform-tools MCP (`timeline_autoconform`), then check and deliver it. Use when the user hands you a reference movie (a client master, an offline export, a graded render) and camera originals, proxies or colour returns and asks to "conform", "rebuild the timeline", "find the shots" or "match this to the media".
4
+ ---
5
+
6
+ # auto-conform — reference + media → a timeline you can trust
7
+
8
+ The tool answers, per shot of the reference: which clip, which source frame, how it was
9
+ reframed and retimed — or says plainly that it could not tell. Your job around it is to
10
+ give it the right inputs, read its answer the way a conform artist would, and never present a
11
+ guess as a placement.
12
+
13
+ ## 1. Before you run anything: find the right inputs (minutes, saves hours)
14
+
15
+ - **The reference.** One movie of the whole cut. Probe it (`media_probe`): frames, rate, raster,
16
+ start timecode. Note whether it is graded (a client master) or Log (an offline).
17
+ - **The bucket — scope it deliberately.** Productions keep shoot days, cards, proxies and
18
+ originals side by side. List the folders and count the clips per shoot day *before* choosing.
19
+ If the user names one day, run that day, and expect shots from the other days to come back
20
+ "nothing in the bucket" — say so up front, so a short answer is not read as a failure.
21
+ - **Originals vs proxies.** Same names, different folders (e.g. `Camera_Files/…/Clip/<name>/<name>.mxf`
22
+ vs `ProResProxy/<name>.mov`). Conform to what the user asks for (usually the OCFs). Do not mix
23
+ both into one pool — they are the same shots twice and will contest each other.
24
+ - **A timeline, if there is one.** An editor's XML/EDL/AAF/DRT is the best input there is: open it
25
+ with `timeline_read` and pass `hints_session_id`. Its events become the shot list and its claims
26
+ are checked first; nothing in it is believed without the picture agreeing.
27
+ - **Sidecars.** Camera originals often carry per-clip metadata (Sony `M01.xml`: start timecode,
28
+ capture rate, gamma such as S-Log3; a per-clip `.cube` look). Note the camera's Log curve: a
29
+ graded reference against Log originals is the hard case.
30
+ - **Can it be read, and how fast?** Probe one original. Camera raw (X-OCN, ARRIRAW, R3D, BRAW,
31
+ ProRes RAW) decodes through media-core; H.264/HEVC through the OS decoder.
32
+
33
+ Never copy client media anywhere, never upload it, never put it in a repo or a test. Read it in
34
+ place. Refer to a job by its folder name.
35
+
36
+ ## 2. Run it
37
+
38
+ ```
39
+ timeline_autoconform reference=<movie> pool=[<folder or files>] background=true
40
+ [hints_session_id=<timeline>] [find_first=true] [display_transform=true]
41
+ ```
42
+
43
+ - `background=true` returns a job id; poll `job_status`. The phase string is your only progress
44
+ signal — relay it with elapsed time, not a guessed ETA.
45
+ - The default engine aligns the whole film at once, then checks every shot at full resolution:
46
+ plate solving for punch-ins, flops and turns, and a speed check that reads constant retimes
47
+ from the picture. With `hints_session_id`, or `engine="legacy"`, the older per-shot matcher runs
48
+ instead.
49
+ - `find_first=true` (legacy engine only) — each reference shot is looked up in a sparse index of
50
+ the pool and only confirmed where the index points.
51
+ - `display_transform=true` — **experimental, off by default.** Decodes camera originals
52
+ display-referred (Log → Rec.709/2.4 through the lab's Color Space Transform). Measured on the
53
+ first real job it did not place more shots than Log; leave it off unless asked to test it.
54
+ - Everything is cached per file on this machine (fingerprints, descriptors): a re-run against the
55
+ same media is much faster than the first. Do not "fix" a slow first run by deleting caches.
56
+
57
+ ## 3. Read the answer like a conform artist
58
+
59
+ - **Decided vs flagged is the line that matters.** A placement whose moment the shot's own motion
60
+ confirmed is trustworthy (first real job: 39 of 40 within a frame of the editor's cut, no wrong
61
+ clip). A flagged one ("in-point uncertain" marker) names the right take most of the time but the
62
+ moment is a guess — short inserts, held shots, repeated action, adjacent takes. Tell the user how
63
+ many of each and hand them the flagged list to check against the offline.
64
+ - Report per shot, not a percentage: placed (with clip + source TC), retimed, reframed, or gap.
65
+ - **"Too little motion to confirm"** (`speed_unobservable`): a still or near-still shot whose moment
66
+ and speed the picture cannot show. The clip is right; check the in-point and speed by eye.
67
+ - **Speed ramps are not measured yet.** A ramped shot comes back at one constant speed or 100 %;
68
+ flag ramps the user knows about.
69
+ - **Gaps are honest.** "Nothing in the bucket looks like this" usually means stock, graphics, VFX
70
+ or another shoot day — say which is likely and what media would answer it.
71
+ - **Unresolved / contested / weak placements are flagged on purpose.** List them for the user to
72
+ eyeball; never quietly promote them.
73
+ - Check the obvious before delivering: total placed duration vs reference duration, the first and
74
+ last shot, any shot whose source TC falls outside its clip.
75
+
76
+ ## 4. Deliver
77
+
78
+ `timeline_write session_id=<id> format=<drt|xml|edl|aaf|…>` to the host the user conforms in.
79
+ Markers carry every issue onto the timeline. Do not create, switch or close host projects unless
80
+ asked.
81
+
82
+ ## Lessons from real jobs (keep adding)
83
+
84
+ - 2026-10-02, 17-min short vs 101 VENICE 2 X-OCN originals (1.3 TB): reading whole 8.6K frames off
85
+ a USB SSD made the bucket pass ~1.5–3 h; reading only the band the matcher decodes (4% of each
86
+ frame) made fingerprinting 10× faster. SSCD embedding (~20 ms each on 18 cores) is the next cost
87
+ — which is why `find_first` exists. See docs/AUTOCONFORM_FIELD_NOTES.md.
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: conform-artist
3
+ description: Work like a professional conform artist with conform.tools — move a cut between Avid, Premiere, Resolve, Final Cut, Flame and Baselight, relink it to camera originals, prove it frame-accurate, and tell the user exactly what did not carry. Use for any turnover, timeline conversion, relink, online/offline conform or "is this conform right?" question.
4
+ ---
5
+
6
+ # Conform artist
7
+
8
+ You are doing a conform: rebuilding an editor's cut, frame-accurate, in another
9
+ system and on other media. The cut is the editor's intent. Your job is to carry it
10
+ over exactly, link it to the right media, and report every place where the target
11
+ cannot represent it. Never fix creative choices; never let a loss pass silently.
12
+
13
+ Use the conformtools tools for every step below. When you do a post-production step
14
+ with anything else (ffprobe, a script, manual host steps), call `report_gap`.
15
+
16
+ ## The loop
17
+
18
+ 1. **Read.** `timeline_read` the file the editor turned over (AAF, AVB bin, .prproj,
19
+ .drt, .fcpxml/.fcpxmld, FCP7 XML, OTIO, Flame archive, Pro Tools .ptx). If the
20
+ user says "what I have open", use `host_current` instead. Keep the `session_id`.
21
+ 2. **Inspect before you trust it.** `timeline_inspect` with `detail=summary`, then
22
+ `flags`. Confirm with the user anything surprising: project rate vs media rates,
23
+ start timecode, raster and pixel aspect, how many timelines the file holds, which
24
+ one is the cut. See [references/turnover-checklist.md](references/turnover-checklist.md).
25
+ 3. **Link.** `timeline_inspect detail=link` shows what is unbound and which match
26
+ criteria the references support. Then `timeline_relink` against the media folder.
27
+ Proxies → camera originals is the normal case: match by reel / tape / timecode
28
+ rather than file name when the names differ, and check the reframe warning (below).
29
+ 4. **Write.** `timeline_write` for the target host (first-class targets: resolve-drt,
30
+ premiere-prproj, avid-avb, flame-archive, resolve-xmeml; Final Cut, Baselight and
31
+ Pro Tools are beta). Prefer the host's native file over interchange XML/AAF: it
32
+ carries more.
33
+ 5. **Relay every capability issue.** The write returns what the target cannot carry
34
+ (nests flattened, effects not translated, audio linkage, unverified sizing…).
35
+ Tell the user each one in conform terms: which clip, where, what to do about it.
36
+ 6. **Prove it.** `timeline_judge` the source against the written file. It checks
37
+ timing, sizing, linking and content with each host's own rules. Report the
38
+ verdict first ("clean" / "N of M clips have issues"), then the clips. A
39
+ "not checked" is not a pass; say what was not checked.
40
+ 7. **Hand off.** For a package to a colourist or VFX vendor, use the
41
+ `delivery-qc` skill (`media_consolidate`, `media_deliver`).
42
+
43
+ ## What a conform artist always checks
44
+
45
+ - **Timing.** Every event at the same record timecode, same source in/out, same
46
+ duration. Retimes (constant, reverse, freeze, speed ramps) play the same frames.
47
+ - **Sizing.** Repositions, zooms, crops, flips and rotations frame the same picture.
48
+ Watch mixed rasters (HD media in a UHD timeline, anamorphic, padded H.264) and
49
+ proxy → original relinks: an offline proxy and its camera original are rarely the
50
+ same raster, and a reframe built on one shifts on the other unless the original's
51
+ raster is known. The writer warns when it had to assume.
52
+ - **Structure.** Nests/compound clips and multicam stay native where the target
53
+ supports them; adjustment layers, titles, generators and transitions are carried
54
+ or declared.
55
+ - **Audio.** Clip gain, fades, crossfades, A/V linkage, channel mapping.
56
+ - **Markers.** Markers carry; a marker the tool adds is an instruction to the next
57
+ artist, never decoration.
58
+
59
+ ## Talking to the user
60
+
61
+ Lead with the verdict in what-they-will-see terms ("All 412 events land on the same
62
+ frames; 3 clips use a Resolve keyer that Avid cannot carry, at 01:02:10:04…"). Name
63
+ host-specific consequences using the per-host notes:
64
+ [Resolve](references/resolve.md) · [Premiere](references/premiere.md) ·
65
+ [Avid Media Composer](references/avid.md) ·
66
+ [Flame, Final Cut, Baselight, Pro Tools](references/other-hosts.md).
67
+ When something looks wrong, work through [references/troubleshooting.md](references/troubleshooting.md)
68
+ before blaming the file, and use `report_issue` when a conformtools result is wrong.
@@ -0,0 +1,19 @@
1
+ # Avid Media Composer
2
+
3
+ - **Best target:** `avid-avb` (a native bin). Copy it into the project folder and
4
+ open it; the sequence links to media already in the project, or relink by source
5
+ name / tape / timecode. AAF (`avid-aaf`) is still available for pipelines that
6
+ require it.
7
+ - **Reading from Avid:** a bin (.avb) carries more than an AAF export (effect
8
+ parameters, locators, multicam groups, FrameFlex). `host_current` lists the open
9
+ project's bins, newest first; the loaded sequence must be saved in a bin.
10
+ - **Mix and match:** Avid plays media at another rate by its own cadence rules and
11
+ states sizing in its own frame units (Resize, 3D Warp, FrameFlex). conformtools
12
+ converts these to each target's terms; when an Avid effect has no equivalent it
13
+ is declared, never approximated silently.
14
+ - **FrameFlex:** the source-side framing of a clip whose raster differs from the
15
+ project. A FrameFlex reframe is carried as the equivalent zoom / position / crop.
16
+ - **Multicam:** group clips keep their angles; the target plays the selected
17
+ angle. Flattening is declared.
18
+ - **Audio:** Avid writes one mono track per channel; stereo pairs are re-paired in
19
+ hosts that use stereo clips. Clip gain and fades are carried.
@@ -0,0 +1,23 @@
1
+ # Flame, Final Cut Pro, Baselight, Pro Tools
2
+
3
+ ## Autodesk Flame
4
+ - **Target:** `flame-archive` (a Flame archive). Restore it in Flame; it carries the
5
+ sequence with segments, transitions, timewarps (including ramps), Action-based
6
+ repositions and nests as containers.
7
+ - **Reading:** a Flame archive (`format=flame`), or `host_current` for the running
8
+ project's workspace.
9
+ - FCP7 XML / FCPXML into Flame carry cuts with fewer effects; prefer the archive.
10
+
11
+ ## Final Cut Pro (beta)
12
+ - **Target:** `finalcut-fcpxmld` (an FCPXML bundle). Import it with File > Import >
13
+ XML. Compound clips, connected clips, retimes and transforms are carried.
14
+ - **Reading:** .fcpxml / .fcpxmld exports, or `host_current` for open libraries.
15
+
16
+ ## Baselight (beta)
17
+ - **Target:** `baselight-blscene` (a Baselight scene). Placement follows Baselight's
18
+ format-mapping rules (fit width by default); crops, freeze frames and stills are
19
+ carried.
20
+
21
+ ## Pro Tools (beta)
22
+ - **Targets:** `protools-ptx` (a native session) or `protools-aaf`. Audio clips,
23
+ fades and clip gain are carried for a picture-locked turnover to sound.
@@ -0,0 +1,18 @@
1
+ # Adobe Premiere Pro
2
+
3
+ - **Best target:** `premiere-prproj` (a native project). Open it directly; it holds
4
+ the sequence(s), bins and media references. It carries nests, multicam,
5
+ Motion (position / scale / rotation / anchor / crop), opacity, time remapping and
6
+ speed, Warp Stabilizer where supported, audio levels and transitions.
7
+ - **Reading from Premiere:** `host_current` finds the open project and the
8
+ sequences in its Timeline panel (as of the last save — ask the user to save).
9
+ - **Sequence vs clip rate:** clips at another rate are conformed by Premiere's
10
+ interpretation; "Interpret Footage" overrides change the playback rate and are
11
+ carried.
12
+ - **Scale to frame size / Set to frame size:** Premiere's fit options change what
13
+ 100 % means. The writer states sizing in Premiere's own terms; check zoomed
14
+ clips after a relink to camera originals.
15
+ - **Adjustment layers** apply to everything below them; they are carried as
16
+ adjustment layers where the target supports them, otherwise declared.
17
+ - **Windows paths** are written with backslashes and drive letters as Premiere
18
+ expects; media on another machine links via Link Media / Locate.
@@ -0,0 +1,19 @@
1
+ # DaVinci Resolve
2
+
3
+ - **Best target:** `resolve-drt` (a native Resolve timeline). Import with
4
+ File > Import > Timeline. It carries nests (compound clips), multicam, retimes
5
+ including ramps, sizing, clip gain and fades, markers, A/V linkage and ResolveFX
6
+ / OFX plug-ins with their parameters.
7
+ - **FCP7 XML (`resolve-xmeml`)** is the fallback when a pipeline needs XML; it
8
+ carries less (no native nests, fewer effects).
9
+ - **Timeline settings:** Resolve marks every imported timeline as having custom
10
+ settings. That is normal, not a fault.
11
+ - **Sizing:** Resolve fits media to the timeline by its "mismatched resolution"
12
+ setting and then applies the clip's zoom and position on top. A proxy relinked to
13
+ a larger camera original keeps its framing only if the original's raster is
14
+ recorded; the writer warns when it is not.
15
+ - **Reading from Resolve:** `host_current` reads the timeline open in Resolve's
16
+ viewer from its project database with no export needed. Otherwise ask for a .drt
17
+ export (right-click the timeline > Timelines > Export > Timeline .drt).
18
+ - **Relink:** for proxies → originals, Resolve matches by file name, reel name and
19
+ source timecode. Make sure reel names are carried when names differ.
@@ -0,0 +1,33 @@
1
+ # Troubleshooting a conform
2
+
3
+ Work from the evidence. Read the source, inspect, judge; do not guess.
4
+
5
+ ## "The clip is on the wrong frame"
6
+ 1. `timeline_inspect detail=clips` on the source session: is the source in/out what
7
+ the editor sees? Compare the record timecode with the user's.
8
+ 2. Start timecode and drop-frame: a 01:00:00:00 vs 00:59:59:00 start or a DF/NDF
9
+ mismatch moves everything by a constant.
10
+ 3. Mixed rates: media at another rate than the sequence lands by the target host's
11
+ cadence rule. One-frame differences on such clips can be the host's own rounding.
12
+ 4. `timeline_judge` source vs written file: its timing tier names the clip and the
13
+ offset by the target host's own rules.
14
+
15
+ ## "The framing is wrong after relink"
16
+ 1. `timeline_inspect detail=media`: raster and pixel aspect of the linked media vs
17
+ the media the edit was made with (proxy vs original).
18
+ 2. Was the original's raster known when the timeline was written? If not, the
19
+ writer warned; re-run `timeline_relink` to the originals first, then
20
+ `timeline_write`, so sizing is computed on the real raster.
21
+ 3. Anamorphic and padded media (for example H.264 stored at 1088 lines for a 1080
22
+ picture) are handled by the display raster; if the judge disagrees, report it.
23
+
24
+ ## "It won't open / it opens empty"
25
+ - Check the target and the host version, and that the file was opened the host's way
26
+ (Resolve: Import > Timeline; Avid: copy the bin into the project; Flame: restore
27
+ the archive).
28
+ - If a conformtools file is refused by the host, call `report_issue` with the
29
+ session_id, the target and the host's message.
30
+
31
+ ## When conformtools is wrong
32
+ Call `report_issue` with what happened, what was expected and the session_id. It
33
+ sends no media or timeline files.
@@ -0,0 +1,37 @@
1
+ # Turnover checklist
2
+
3
+ Run these before writing anything. Each item is a question the conform artist
4
+ answers from `timeline_inspect` (summary, clips, media, flags, link) and, where
5
+ media is on disk, `media_probe`.
6
+
7
+ ## The timeline
8
+ - Which sequence is the cut? A bin or project can hold many; confirm by name,
9
+ duration and date with the user when there is more than one.
10
+ - Project / sequence rate, drop-frame or not, and start timecode (01:00:00:00 vs
11
+ 00:59:58:00 leaders, 10:00:00:00 in some territories).
12
+ - Raster and pixel aspect of the sequence (HD, UHD, DCI, vertical, anamorphic).
13
+ - Track count, and which tracks are disabled or muted on purpose.
14
+
15
+ ## The media
16
+ - Rates: any media at a different rate from the sequence plays retimed or
17
+ mix-and-match. Say which clips and how the target will treat them.
18
+ - Rasters: media smaller or larger than the sequence is fitted, filled or
19
+ cropped by the host's rule; reframes depend on that rule.
20
+ - Linked or offline: offline media is normal for a turnover. Which identity can
21
+ link it — file name, reel/tape name, source timecode, clip name?
22
+ - Proxies: is the editorial media a proxy of camera originals? The relink to
23
+ originals is the conform.
24
+
25
+ ## The edit
26
+ - Retimes: constant, reverse, freeze frames, speed ramps; motion-estimated
27
+ ("optical flow") retimes may need re-rendering in the target.
28
+ - Effects: which are geometry (resize, reposition, crop, flip, rotate, stabilize),
29
+ which are plug-ins (BorisFX Sapphire / Continuum, ResolveFX, Lumetri), which are
30
+ grades. Grades are usually rebuilt by the colourist; geometry must carry.
31
+ - Nests, compound clips, multicams, adjustment layers, titles, generators.
32
+ - Audio: clip gain, fades, crossfades, linked A/V.
33
+
34
+ ## Report back
35
+ Summarise in one short block: what the cut is, anything unusual, what will not
36
+ carry to the target, and what you need from the user (the media folder, which
37
+ sequence, which target).
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: delivery-qc
3
+ description: Hand a finished conform to the next facility the way a conform artist does — consolidate the used media with handles, build the delivery package (folder or ISO), and QC it against the source cut before it leaves. Use for "send this to the colourist / VFX / sound", "media manage", "consolidate", "package the turnover" or "check the delivery".
4
+ ---
5
+
6
+ # Delivery and QC
7
+
8
+ The conform is done when the receiving facility can open it, link everything and
9
+ see the editor's cut. This skill packages it and proves it before it leaves.
10
+ Start from a session that has been read, relinked and written (the
11
+ `conform-artist` skill).
12
+
13
+ ## The loop
14
+
15
+ 1. **Know the media.** `timeline_inspect detail=media`: every reference linked?
16
+ Unlinked references cannot be trimmed; relink first (`timeline_relink`) or tell
17
+ the user exactly which are missing.
18
+ 2. **Agree the handles.** Ask if the user has not said: 12, 24 or 48 frames are
19
+ common; VFX vendors often want more. Long-GOP media (H.264/HEVC) trims to the
20
+ nearest keyframes, so the real handles can be longer than asked.
21
+ 3. **Consolidate** (optional, for a local media-managed copy): `media_consolidate`
22
+ writes byte-exact trims of the used frames plus handles, with no re-encode and
23
+ with source timecode preserved, then repoints the session at them.
24
+ 4. **Package:** `media_deliver` builds the delivery:
25
+ `01_PROJECT_FILES/source` (the original turnover), `01_PROJECT_FILES/converted`
26
+ (the target host timelines, paths rewritten to the package), `02_MEDIA` (trimmed
27
+ media; RED as .RDC bundles), `03_REFERENCES`. Use `destination=iso` for one
28
+ mountable image when the package travels as a single file. Large jobs run with
29
+ `background=true`; follow with `job_status`.
30
+ 5. **QC before it leaves:**
31
+ - `timeline_judge` each converted timeline against the source turnover. Lead
32
+ with the verdict; any clip with issues is listed by track and timecode.
33
+ - `media_probe` a sample of the trimmed media: codec, raster, rate and start
34
+ timecode must match the source file; frame count = used span + handles.
35
+ - Every capability issue from the write is in the delivery notes.
36
+ 6. **Write the notes.** One short block for the receiving facility: what the
37
+ package holds, rates / raster / start timecode, handles, what did not carry and
38
+ where (clip, timecode), and any media that is missing and why.
39
+
40
+ ## Rules
41
+
42
+ - Never re-encode camera media to deliver it; trims are byte-exact.
43
+ - Never drop a missing clip silently: the package ships, with the gap named.
44
+ - A reframe that depended on an unknown camera-original raster is called out in the
45
+ notes, clip by clip.
46
+ - AI-rendered shots that came back with dropped or held frames: when the
47
+ `media_repair_cadence` tool is available (the full local install), repair them
48
+ against the plate before delivery and report any re-paced render as-is.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
+ import{a as o}from"./chunk-DRHOPOC7.js";import{a as c,b as a,c as l,d as w,e as _}from"./chunk-Y2BEEOPB.js";import"./chunk-PSANHDZM.js";var f=import.meta.env?.VITE_SSCD_MODEL_URL||"/sscd/sscd_disc_mixup.288.fp16.onnx";async function C(){try{let t=await fetch(f,{method:"HEAD"});if(!t.ok||(t.headers.get("content-type")??"").startsWith("text/html"))return!1;let r=t.headers.get("content-length");return r===null||Number(r)>1e6}catch{return!1}}var m=null;function p(){return m||(m=(async()=>{let t=await import("./onnxruntime-web-stub-PKJ2NZBF.js"),r=(typeof globalThis.crossOriginIsolated=="boolean"?globalThis.crossOriginIsolated:!1)?Math.max(1,Math.min(navigator.hardwareConcurrency||4,10)):1;return t.env.wasm.wasmPaths=r>1?{wasm:o,mjs:o}:{wasm:o},t.env.wasm.numThreads=r,t.InferenceSession.create(f,{executionProviders:["wasm"]})})()),m}function T(){p().catch(()=>{})}async function v(t,e=288){if(t.length===0)return[];let r=await import("./onnxruntime-web-stub-PKJ2NZBF.js"),y=await p(),d=[];for(let n=0;n<t.length;n+=8){let i=t.slice(n,n+8),S=l(i,e),u=(await y.run({rgb:new r.Tensor("float32",S,[i.length,3,e,e])})).embedding,h=u.dims[1],g=u.data;for(let s=0;s<i.length;s++)d.push(g.slice(s*h,(s+1)*h))}return d}export{a as SSCD_BATCH,f as SSCD_MODEL_URL,c as SSCD_SIZE,w as cosine,v as embedFrames,p as initSscd,_ as norm,C as sscdAvailable,l as toTensorData,T as warmSscd};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
+ import{a,b,c,d,e}from"./chunk-GXEVALBL.js";import"./chunk-Y2BEEOPB.js";import"./chunk-PSANHDZM.js";export{a as MAX_EMBED_STRIDE,e as embedAtFrames,c as lumaToRgba,b as squareRgba,d as sweepClipEmbeddings};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{a as _}from"./chunk-RXHNBSER.js";import{a as M}from"./chunk-UCMNH6Q6.js";import"./chunk-PSANHDZM.js";function v(n){return{size:n.fileSize,read:(t,e)=>n.read(t,e)}}var U=class{constructor(t){this.r=t;this.buf=new Uint8Array(0);this.base=0}async at(t,e){if(t<0||e<=0)return new Uint8Array(0);let r=t-this.base;return r>=0&&r+e<=this.buf.length?this.buf.subarray(r,r+e):(this.buf=await this.r.read(t,Math.max(e,65536)),this.base=t,this.buf.subarray(0,Math.min(e,this.buf.length)))}},A=(n,t)=>n[t]<<8|n[t+1],w=(n,t)=>n[t]|n[t+1]<<8,W=(n,t)=>n[t]|n[t+1]<<8|n[t+2]<<16,d=(n,t)=>(n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3])>>>0,b=(n,t)=>(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0,P=(n,t)=>n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24,p=(n,t,e)=>String.fromCharCode(...n.subarray(t,t+e));function h(n,t){if(!Number.isFinite(n)||!Number.isFinite(t))return null;let e=Math.round(n),r=Math.round(t);return e<1||r<1||e>1e6||r>1e6?null:{width:e,height:r}}var k=n=>({width:n.height,height:n.width});async function C(n){let t=await n.at(0,24);return t.length<24||t[0]!==137||p(t,1,3)!=="PNG"||p(t,12,4)!=="IHDR"?null:h(d(t,16),d(t,20))}var D=new Set([192,193,194,195,197,198,199,201,202,203,205,206,207]);function I(n){if(n.length<8)return null;let t=n[0]===73&&n[1]===73,e=n[0]===77&&n[1]===77;if(!t&&!e)return null;let r=a=>t?w(n,a):A(n,a),i=a=>t?b(n,a):d(n,a);if(r(2)!==42)return null;let l=i(4);if(l+2>n.length)return null;let c=r(l);for(let a=0;a<c;a++){let u=l+2+a*12;if(u+12>n.length)break;if(r(u)===274)return r(u+8)}return null}async function F(n,t){let e=await n.at(0,2);if(e.length<2||e[0]!==255||e[1]!==216)return null;let r=1,i=null,l=2;for(;l+4<=t;){let c=await n.at(l,4);if(c.length<4)break;if(c[0]!==255){l++;continue}let a=c[1];if(a===255){l++;continue}if(a===1||a>=208&&a<=217){l+=2;continue}if(a===218)break;let u=A(c,2);if(u<2)break;if(D.has(a)){let o=await n.at(l+4,5);o.length>=5&&(i=h(A(o,3),A(o,1)));break}if(a===225){let o=await n.at(l+4,Math.min(u-2,65536));o.length>6&&p(o,0,4)==="Exif"&&(r=I(o.subarray(6))??1)}l+=2+u}return i?r>=5&&r<=8?k(i):i:null}async function j(n){let t=await n.at(0,10);return t.length<10||p(t,0,3)!=="GIF"?null:h(w(t,6),w(t,8))}async function L(n){let t=await n.at(0,26);return t.length<22||p(t,0,2)!=="BM"?null:b(t,14)===12?h(w(t,18),w(t,20)):t.length<26?null:h(P(t,18),Math.abs(P(t,22)))}async function H(n){let t=await n.at(0,30);if(t.length<16||p(t,0,4)!=="RIFF"||p(t,8,4)!=="WEBP")return null;let e=p(t,12,4);if(e==="VP8X")return t.length<30?null:h(W(t,24)+1,W(t,27)+1);if(e==="VP8 ")return t.length<30||t[23]!==157||t[24]!==1||t[25]!==42?null:h(w(t,26)&16383,w(t,28)&16383);if(e==="VP8L"){if(t.length<25||t[20]!==47)return null;let r=b(t,21);return h((r&16383)+1,(r>>>14&16383)+1)}return null}async function S(n,t){let e=[],r=0;async function i(a,u,o){let f=a;for(;f+8<=u&&o<8;){let g=await n.at(f,16);if(g.length<8)return;let s=d(g,0),m=p(g,4,4),y=8;if(s===1){if(g.length<16)return;s=d(g,8)*2**32+d(g,12),y=16}else s===0&&(s=u-f);if(s<y||f+s>u)return;if(m==="meta")await i(f+y+4,f+s,o+1);else if(m==="iprp"||m==="ipco")await i(f+y,f+s,o+1);else if(m==="ispe"){let x=await n.at(f+y+4,8);if(x.length===8){let R=h(d(x,0),d(x,4));R&&e.push(R)}}else if(m==="irot"){let x=await n.at(f+y,1);x.length===1&&(r=x[0]&3)}f+=s}}let l=await n.at(0,12);if(l.length<12||p(l,4,4)!=="ftyp"||(await i(0,t,0),e.length===0))return null;let c=e.reduce((a,u)=>a.width*a.height>=u.width*u.height?a:u);return r===1||r===3?k(c):c}async function G(n){let t=await n.at(0,22);return t.length<22||p(t,0,4)!=="8BPS"?null:h(d(t,18),d(t,14))}var N=new Set([0,1,2,3,9,10,11]);async function T(n){let t=await n.at(0,18);if(t.length<18||t[1]>1||!N.has(t[2]))return null;let e=t[16];return[8,15,16,24,32].includes(e)?h(w(t,12),w(t,14)):null}async function B(n){let t=await n.at(0,8);if(t.length<8)return null;let e=t[0]===73&&t[1]===73,r=t[0]===77&&t[1]===77;if(!e&&!r)return null;let i=(s,m)=>e?w(s,m):A(s,m),l=(s,m)=>e?b(s,m):d(s,m);if(i(t,2)!==42)return null;let c=l(t,4),a=await n.at(c,2);if(a.length<2)return null;let u=i(a,0);if(u<1||u>4096)return null;let o=await n.at(c+2,u*12),f=0,g=0;for(let s=0;s<u;s++){let m=s*12;if(m+12>o.length)break;let y=i(o,m),R=i(o,m+2)===3?i(o,m+8):l(o,m+8);y===256?f=R:y===257&&(g=R)}return h(f,g)}async function V(n,t){let e=await n.at(0,8);if(e.length<8||e[0]!==118||e[1]!==47||e[2]!==49||e[3]!==1)return null;let r=8,i=Math.min(t,1<<20);for(;r<i;){let l=await n.at(r,512);if(l.length===0)return null;let c=l.indexOf(0);if(c<=0)return null;let a=p(l,0,c),u=l.subarray(c+1).indexOf(0);if(u<0)return null;let o=c+1+u+1;if(o+4>l.length)return null;let f=b(l,o),g=r+o+4;if(a==="dataWindow"){if(f<16)return null;let s=await n.at(g,16);return s.length<16?null:h(P(s,8)-P(s,0)+1,P(s,12)-P(s,4)+1)}r=g+f}return null}async function X(n){let t=await n.at(0,4);if(t.length<4)return null;let e=p(t,0,4),r=e==="SDPX";if(!r&&e!=="XPDS")return null;let i=await n.at(772,8);return i.length<8?null:h(r?d(i,0):b(i,0),r?d(i,4):b(i,4))}var Y={png:C,jpg:F,jpeg:F,gif:j,bmp:L,webp:H,avif:S,heic:S,heif:S,psd:G,tga:T,tif:B,tiff:B,exr:V,dpx:X};async function z(n,t){let e=Y[(n??"").toLowerCase()];if(!e)return null;try{return await e(new U(t),t.size)}catch{return null}}var q=n=>{let t=n.split(/[/\\]/).pop()??"",e=t.lastIndexOf(".");return e>0?t.slice(e+1).toLowerCase():""};async function J(n,t){try{if(n==="dpx"){let e=await(await import("./dpx-wasm-OX2D24ZB.js")).inspectDpxWasm(t);return e?{width:e.width,height:e.height}:null}if(n==="exr"){let e=await(await import("./exr-wasm-Z6BBPJSN.js")).inspectExrWasm(t);return e?{width:e.width,height:e.height}:null}if(n==="dng"){let e=await(await import("./dng-wasm-EAB24KDN.js")).inspectDngWasm(t);return e?{width:e.width,height:e.height}:null}if(n==="cr3"){let e=await(await import("./cr3-wasm-X6Q4YMUU.js")).inspectCr3Wasm(t);return e?{width:e.width,height:e.height}:null}if(n==="tif"||n==="tiff"){let e=await(await import("./tiff-wasm-XYTQNL2F.js")).inspectTiffWasm(t);return e?{width:e.width,height:e.height}:null}}catch{}return null}async function K(n){if(typeof createImageBitmap!="function"||typeof Blob>"u")return null;try{let t=await createImageBitmap(new Blob([n])),e={width:t.width,height:t.height};return t.close?.(),e.width>0&&e.height>0?e:null}catch{return null}}async function O(n){let t=q(n.filename),e=await z(t,v(n));if(e)return e;let r=M(t);if(r===null||r==="none")return null;let i;try{i=await n.read(0,n.fileSize)}catch{return null}return r==="wasm-decoder"?await J(t,i):await K(i)}function E(n){let t=_(n);return t==="jpg"?"jpeg":t==="tif"?"tiff":t||"still"}var rt={async inspect(n){let t=n.parts[0],e=await O(t);return{id:t.filename,kind:"external",content_kind:"still",target_url:t.filename,available_range:null,reel_name:null,source_timecode:null,container:_(t.filename)||"still",codec:E(t.filename),size_bytes:t.fileSize,bitrate_bps:null,source_resolution_w:e?.width??null,source_resolution_h:e?.height??null,source_pixel_aspect:e?1:null,streams:[],vendor_metadata:{},binding_state:"unbound",raw_extraction:{},metadata:{}}},async extract(n){let t=n.parts.map((e,r)=>({kind:"frame",part:r,offset:0,length:e.fileSize,frame_in:r,frame_out:r}));return t.length===0?null:{v:1,container:_(n.parts[0].filename)||"still",codec:E(n.parts[0].filename),frame_count:t.length,granularity:"frame",segments:t,...n.parts.length>1?{part_names:n.parts.map(e=>e.filename)}:{}}},async sparsify(){throw new Error("stillFormat.sparsify: stills ship whole \u2014 no sparse plan exists")},async trim(){throw new Error("stillFormat.trim: stills ship whole \u2014 no trim plan exists")}};export{rt as stillFormat};
3
+ import{a as _}from"./chunk-RXHNBSER.js";import{a as M}from"./chunk-UCMNH6Q6.js";import"./chunk-PSANHDZM.js";function v(n){return{size:n.fileSize,read:(t,e)=>n.read(t,e)}}var U=class{constructor(t){this.r=t;this.buf=new Uint8Array(0);this.base=0}async at(t,e){if(t<0||e<=0)return new Uint8Array(0);let r=t-this.base;return r>=0&&r+e<=this.buf.length?this.buf.subarray(r,r+e):(this.buf=await this.r.read(t,Math.max(e,65536)),this.base=t,this.buf.subarray(0,Math.min(e,this.buf.length)))}},A=(n,t)=>n[t]<<8|n[t+1],w=(n,t)=>n[t]|n[t+1]<<8,W=(n,t)=>n[t]|n[t+1]<<8|n[t+2]<<16,d=(n,t)=>(n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3])>>>0,b=(n,t)=>(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0,P=(n,t)=>n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24,p=(n,t,e)=>String.fromCharCode(...n.subarray(t,t+e));function h(n,t){if(!Number.isFinite(n)||!Number.isFinite(t))return null;let e=Math.round(n),r=Math.round(t);return e<1||r<1||e>1e6||r>1e6?null:{width:e,height:r}}var k=n=>({width:n.height,height:n.width});async function C(n){let t=await n.at(0,24);return t.length<24||t[0]!==137||p(t,1,3)!=="PNG"||p(t,12,4)!=="IHDR"?null:h(d(t,16),d(t,20))}var D=new Set([192,193,194,195,197,198,199,201,202,203,205,206,207]);function I(n){if(n.length<8)return null;let t=n[0]===73&&n[1]===73,e=n[0]===77&&n[1]===77;if(!t&&!e)return null;let r=a=>t?w(n,a):A(n,a),i=a=>t?b(n,a):d(n,a);if(r(2)!==42)return null;let l=i(4);if(l+2>n.length)return null;let c=r(l);for(let a=0;a<c;a++){let u=l+2+a*12;if(u+12>n.length)break;if(r(u)===274)return r(u+8)}return null}async function F(n,t){let e=await n.at(0,2);if(e.length<2||e[0]!==255||e[1]!==216)return null;let r=1,i=null,l=2;for(;l+4<=t;){let c=await n.at(l,4);if(c.length<4)break;if(c[0]!==255){l++;continue}let a=c[1];if(a===255){l++;continue}if(a===1||a>=208&&a<=217){l+=2;continue}if(a===218)break;let u=A(c,2);if(u<2)break;if(D.has(a)){let o=await n.at(l+4,5);o.length>=5&&(i=h(A(o,3),A(o,1)));break}if(a===225){let o=await n.at(l+4,Math.min(u-2,65536));o.length>6&&p(o,0,4)==="Exif"&&(r=I(o.subarray(6))??1)}l+=2+u}return i?r>=5&&r<=8?k(i):i:null}async function j(n){let t=await n.at(0,10);return t.length<10||p(t,0,3)!=="GIF"?null:h(w(t,6),w(t,8))}async function L(n){let t=await n.at(0,26);return t.length<22||p(t,0,2)!=="BM"?null:b(t,14)===12?h(w(t,18),w(t,20)):t.length<26?null:h(P(t,18),Math.abs(P(t,22)))}async function H(n){let t=await n.at(0,30);if(t.length<16||p(t,0,4)!=="RIFF"||p(t,8,4)!=="WEBP")return null;let e=p(t,12,4);if(e==="VP8X")return t.length<30?null:h(W(t,24)+1,W(t,27)+1);if(e==="VP8 ")return t.length<30||t[23]!==157||t[24]!==1||t[25]!==42?null:h(w(t,26)&16383,w(t,28)&16383);if(e==="VP8L"){if(t.length<25||t[20]!==47)return null;let r=b(t,21);return h((r&16383)+1,(r>>>14&16383)+1)}return null}async function S(n,t){let e=[],r=0;async function i(a,u,o){let f=a;for(;f+8<=u&&o<8;){let g=await n.at(f,16);if(g.length<8)return;let s=d(g,0),m=p(g,4,4),y=8;if(s===1){if(g.length<16)return;s=d(g,8)*2**32+d(g,12),y=16}else s===0&&(s=u-f);if(s<y||f+s>u)return;if(m==="meta")await i(f+y+4,f+s,o+1);else if(m==="iprp"||m==="ipco")await i(f+y,f+s,o+1);else if(m==="ispe"){let x=await n.at(f+y+4,8);if(x.length===8){let R=h(d(x,0),d(x,4));R&&e.push(R)}}else if(m==="irot"){let x=await n.at(f+y,1);x.length===1&&(r=x[0]&3)}f+=s}}let l=await n.at(0,12);if(l.length<12||p(l,4,4)!=="ftyp"||(await i(0,t,0),e.length===0))return null;let c=e.reduce((a,u)=>a.width*a.height>=u.width*u.height?a:u);return r===1||r===3?k(c):c}async function G(n){let t=await n.at(0,22);return t.length<22||p(t,0,4)!=="8BPS"?null:h(d(t,18),d(t,14))}var N=new Set([0,1,2,3,9,10,11]);async function T(n){let t=await n.at(0,18);if(t.length<18||t[1]>1||!N.has(t[2]))return null;let e=t[16];return[8,15,16,24,32].includes(e)?h(w(t,12),w(t,14)):null}async function B(n){let t=await n.at(0,8);if(t.length<8)return null;let e=t[0]===73&&t[1]===73,r=t[0]===77&&t[1]===77;if(!e&&!r)return null;let i=(s,m)=>e?w(s,m):A(s,m),l=(s,m)=>e?b(s,m):d(s,m);if(i(t,2)!==42)return null;let c=l(t,4),a=await n.at(c,2);if(a.length<2)return null;let u=i(a,0);if(u<1||u>4096)return null;let o=await n.at(c+2,u*12),f=0,g=0;for(let s=0;s<u;s++){let m=s*12;if(m+12>o.length)break;let y=i(o,m),R=i(o,m+2)===3?i(o,m+8):l(o,m+8);y===256?f=R:y===257&&(g=R)}return h(f,g)}async function V(n,t){let e=await n.at(0,8);if(e.length<8||e[0]!==118||e[1]!==47||e[2]!==49||e[3]!==1)return null;let r=8,i=Math.min(t,1<<20);for(;r<i;){let l=await n.at(r,512);if(l.length===0)return null;let c=l.indexOf(0);if(c<=0)return null;let a=p(l,0,c),u=l.subarray(c+1).indexOf(0);if(u<0)return null;let o=c+1+u+1;if(o+4>l.length)return null;let f=b(l,o),g=r+o+4;if(a==="dataWindow"){if(f<16)return null;let s=await n.at(g,16);return s.length<16?null:h(P(s,8)-P(s,0)+1,P(s,12)-P(s,4)+1)}r=g+f}return null}async function X(n){let t=await n.at(0,4);if(t.length<4)return null;let e=p(t,0,4),r=e==="SDPX";if(!r&&e!=="XPDS")return null;let i=await n.at(772,8);return i.length<8?null:h(r?d(i,0):b(i,0),r?d(i,4):b(i,4))}var Y={png:C,jpg:F,jpeg:F,gif:j,bmp:L,webp:H,avif:S,heic:S,heif:S,psd:G,tga:T,tif:B,tiff:B,exr:V,dpx:X};async function z(n,t){let e=Y[(n??"").toLowerCase()];if(!e)return null;try{return await e(new U(t),t.size)}catch{return null}}var q=n=>{let t=n.split(/[/\\]/).pop()??"",e=t.lastIndexOf(".");return e>0?t.slice(e+1).toLowerCase():""};async function J(n,t){try{if(n==="dpx"){let e=await(await import("./dpx-wasm-VNJRFPYY.js")).inspectDpxWasm(t);return e?{width:e.width,height:e.height}:null}if(n==="exr"){let e=await(await import("./exr-wasm-5D66YR7A.js")).inspectExrWasm(t);return e?{width:e.width,height:e.height}:null}if(n==="dng"){let e=await(await import("./dng-wasm-JNFS44V5.js")).inspectDngWasm(t);return e?{width:e.width,height:e.height}:null}if(n==="cr3"){let e=await(await import("./cr3-wasm-CWKEOCYH.js")).inspectCr3Wasm(t);return e?{width:e.width,height:e.height}:null}if(n==="tif"||n==="tiff"){let e=await(await import("./tiff-wasm-2CEABW6L.js")).inspectTiffWasm(t);return e?{width:e.width,height:e.height}:null}}catch{}return null}async function K(n){if(typeof createImageBitmap!="function"||typeof Blob>"u")return null;try{let t=await createImageBitmap(new Blob([n])),e={width:t.width,height:t.height};return t.close?.(),e.width>0&&e.height>0?e:null}catch{return null}}async function O(n){let t=q(n.filename),e=await z(t,v(n));if(e)return e;let r=M(t);if(r===null||r==="none")return null;let i;try{i=await n.read(0,n.fileSize)}catch{return null}return r==="wasm-decoder"?await J(t,i):await K(i)}function E(n){let t=_(n);return t==="jpg"?"jpeg":t==="tif"?"tiff":t||"still"}var rt={async inspect(n){let t=n.parts[0],e=await O(t);return{id:t.filename,kind:"external",content_kind:"still",target_url:t.filename,available_range:null,reel_name:null,source_timecode:null,container:_(t.filename)||"still",codec:E(t.filename),size_bytes:t.fileSize,bitrate_bps:null,source_resolution_w:e?.width??null,source_resolution_h:e?.height??null,source_pixel_aspect:e?1:null,streams:[],vendor_metadata:{},binding_state:"unbound",raw_extraction:{},metadata:{}}},async extract(n){let t=n.parts.map((e,r)=>({kind:"frame",part:r,offset:0,length:e.fileSize,frame_in:r,frame_out:r}));return t.length===0?null:{v:1,container:_(n.parts[0].filename)||"still",codec:E(n.parts[0].filename),frame_count:t.length,granularity:"frame",segments:t,...n.parts.length>1?{part_names:n.parts.map(e=>e.filename)}:{}}},async sparsify(){throw new Error("stillFormat.sparsify: stills ship whole \u2014 no sparse plan exists")},async trim(){throw new Error("stillFormat.trim: stills ship whole \u2014 no trim plan exists")}};export{rt as stillFormat};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
+ import{a,b,c}from"./chunk-UUDNNFU7.js";import"./chunk-DKGGJM6Z.js";import"./chunk-R6WJ6JIQ.js";import"./chunk-PSANHDZM.js";export{c as decodeTiffPreviewWasm,b as decodeTiffWasm,a as inspectTiffWasm};
Binary file
Binary file
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{a as b}from"./chunk-AACY2V3L.js";import{T as _,ba as f,ha as d,ka as g,ua as u}from"./chunk-UUMHVA7R.js";import"./chunk-PSANHDZM.js";function p(s){return(r,t)=>s.read(r,t)}function S(s){let r=[];for(let t of s)t.kind!=="clip"||!t.source_range||r.push({start_frame:t.source_range.start.value,dur_frames:t.source_range.duration.value,fps:t.source_range.start.rate??1});return r}var w={async inspect(s){await u();let r=s.parts[0],t=await _(p(r),r.fileSize),e=JSON.parse(t);if(!e||!e.sample_rate)return null;let a=e.byte_rate>0?e.data_length/e.byte_rate:null,m=a?Math.round(a*e.sample_rate):0,n=[{kind:"audio",codec:"pcm",rate:e.sample_rate,channels:e.channels,bit_depth:e.bits_per_sample,codec_specific:{bits_per_sample:e.bits_per_sample}}];return{id:r.filename,kind:"external",content_kind:"audio",target_url:r.filename,available_range:a?{start:{value:0,rate:e.sample_rate},duration:{value:m,rate:e.sample_rate}}:null,reel_name:null,source_timecode:e.source_timecode??null,container:"wav",codec:"pcm",size_bytes:r.fileSize,bitrate_bps:e.byte_rate*8,streams:n,vendor_metadata:e.bext?{bext:e.bext}:{},binding_state:"unbound",raw_extraction:{wav_meta:e},metadata:{}}},async extract(s){await u();let r=s.parts[0],t=JSON.parse(await f(p(r),r.fileSize));return t.length===0?null:{v:1,container:"wav",codec:"pcm",frame_count:b(t),granularity:"second",segments:t}},async sparsify(s,r){await u();let t=s.parts[0],e=await g(p(t),t.fileSize,JSON.stringify(S(r.items)),r.handles),a=JSON.parse(e);return[{filename:t.filename,fileSize:a.fileSize,structuralRanges:a.structuralRanges,essenceRanges:a.essenceRanges,trimInputs:a.trimInputs}]},async trim(s,r){await u();let t=s.parts[0],e=[];for(let n of r.items){if(n.kind!=="clip"||!n.source_range)continue;let i=n.source_range.start.rate??1,o=Math.max(0,(n.source_range.start.value-r.handles)/i),c=(n.source_range.start.value+n.source_range.duration.value+r.handles)/i;c>o&&e.push([o,c])}if(e.length===0)throw new Error("wav trim: no usable trim ranges in items");e.sort((n,i)=>n[0]-i[0]);let a=[];for(let[n,i]of e){let o=a[a.length-1];o&&n<=o[1]?o[1]=Math.max(o[1],i):a.push([n,i])}let m=[];for(let[n,[i,o]]of a.entries()){let c=await d(p(t),t.fileSize,i,o,1),l=JSON.parse(c);a.length>1&&(l.output_clip_number=n+1,l.output_clip_count=a.length,l.output_part_number=1),m.push(l)}return m}};export{w as wavFormat};
3
+ import{a as b}from"./chunk-AACY2V3L.js";import{Ca as u,Y as _,ga as f,ma as d,pa as g}from"./chunk-R6WJ6JIQ.js";import"./chunk-PSANHDZM.js";function p(s){return(r,t)=>s.read(r,t)}function S(s){let r=[];for(let t of s)t.kind!=="clip"||!t.source_range||r.push({start_frame:t.source_range.start.value,dur_frames:t.source_range.duration.value,fps:t.source_range.start.rate??1});return r}var w={async inspect(s){await u();let r=s.parts[0],t=await _(p(r),r.fileSize),e=JSON.parse(t);if(!e||!e.sample_rate)return null;let a=e.byte_rate>0?e.data_length/e.byte_rate:null,m=a?Math.round(a*e.sample_rate):0,n=[{kind:"audio",codec:"pcm",rate:e.sample_rate,channels:e.channels,bit_depth:e.bits_per_sample,codec_specific:{bits_per_sample:e.bits_per_sample}}];return{id:r.filename,kind:"external",content_kind:"audio",target_url:r.filename,available_range:a?{start:{value:0,rate:e.sample_rate},duration:{value:m,rate:e.sample_rate}}:null,reel_name:null,source_timecode:e.source_timecode??null,container:"wav",codec:"pcm",size_bytes:r.fileSize,bitrate_bps:e.byte_rate*8,streams:n,vendor_metadata:e.bext?{bext:e.bext}:{},binding_state:"unbound",raw_extraction:{wav_meta:e},metadata:{}}},async extract(s){await u();let r=s.parts[0],t=JSON.parse(await f(p(r),r.fileSize));return t.length===0?null:{v:1,container:"wav",codec:"pcm",frame_count:b(t),granularity:"second",segments:t}},async sparsify(s,r){await u();let t=s.parts[0],e=await g(p(t),t.fileSize,JSON.stringify(S(r.items)),r.handles),a=JSON.parse(e);return[{filename:t.filename,fileSize:a.fileSize,structuralRanges:a.structuralRanges,essenceRanges:a.essenceRanges,trimInputs:a.trimInputs}]},async trim(s,r){await u();let t=s.parts[0],e=[];for(let n of r.items){if(n.kind!=="clip"||!n.source_range)continue;let i=n.source_range.start.rate??1,o=Math.max(0,(n.source_range.start.value-r.handles)/i),c=(n.source_range.start.value+n.source_range.duration.value+r.handles)/i;c>o&&e.push([o,c])}if(e.length===0)throw new Error("wav trim: no usable trim ranges in items");e.sort((n,i)=>n[0]-i[0]);let a=[];for(let[n,i]of e){let o=a[a.length-1];o&&n<=o[1]?o[1]=Math.max(o[1],i):a.push([n,i])}let m=[];for(let[n,[i,o]]of a.entries()){let c=await d(p(t),t.fileSize,i,o,1),l=JSON.parse(c);a.length>1&&(l.output_clip_number=n+1,l.output_clip_count=a.length,l.output_part_number=1),m.push(l)}return m}};export{w as wavFormat};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conformtools",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "conform.tools on your machine: timeline exchange, relink, media trim, delivery and auto conform, as MCP tools for Claude and other AI apps, a CLI and a local HTTP API",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{c as m,d as w}from"./chunk-P7OVDUA5.js";import{i as b}from"./chunk-YPRTUS5W.js";import{G as g,S as _}from"./chunk-C2ESM27Z.js";var f={prproj:"prproj","resolve-drt":"drt",aaf:"aaf",avb:"avb",otio:"otio","flame-archive":"flame","resolve-fcpxml":"fcpxml","fcp-xml":"xmeml","premiere-xml":"xmeml","resolve-xml":"xmeml"};function S(e){return e in f}var p=null;function l(){return p||(p=E()),p}async function E(){let e=await import("./timeline_core-VK2ZWPCO.js"),r=(await import("./timeline_core_bg-QEOVAIWP.js")).default;return await e.default({module_or_path:r}),e}async function A(e,r){let o=f[r];if(!o)throw new Error(`timelineInspect: no Rust engine for format '${r}'`);let t=await l(),i=e.name.replace(/\.[^.]+$/,""),n=(R,...M)=>t[R](...M),s;switch(o){case"prproj":s=n("inspect_prproj_json",await a(e));break;case"aaf":s=n("inspect_aaf_json",await a(e));break;case"avb":s=n("inspect_avb_json",await a(e));break;case"flame":s=n("inspect_flame_json",await a(e),i);break;case"drt":s=n("inspect_drt_json",await y(e));break;case"otio":s=n("inspect_otio_json",await e.text(),i);break;case"fcpxml":s=n("inspect_fcpxml_json",await e.text(),i);break;case"xmeml":s=n("inspect_xmeml_json",await e.text(),i);break}return I(s)}var x=12*1024*1024,d=!1;function j(e){d=e}var h=null,k=8e3;async function F(){!h||d||await Promise.race([h,new Promise(e=>setTimeout(e,k))])}function c(e,r,o){if(d||e.length<=x)return e;let t=(e.length/1048576).toFixed(0),i=o?.length??0;throw i===1?new Error(`This ${r.toUpperCase()} timeline extracts to ${t} MB, past what our conversion server can hold in one pass (the ceiling is ours, not your file \u2014 a single long timeline can exceed it on its own). Get in touch and we will convert it for you while we lift the limit.`):new Error(`This ${r.toUpperCase()} selection${i?` (${i} sequences)`:""} extracts to ${t} MB, past what our conversion server can hold in one pass. Convert a few sequences at a time \u2014 one long timeline is usually about ${(x/1048576).toFixed(0)} MB. If a single timeline still will not go through, get in touch and we will convert it for you.`)}async function T(e,r,o){let t=f[r];if(!t)throw new Error(`timelineExtract: no Rust engine for format '${r}'`);switch(await F(),t){case"otio":case"fcpxml":case"xmeml":return{fmt:t,extract:await e.text()};case"drt":{let n=(await l()).extract_drt_json(await y(e));return{fmt:t,extract:c(n,t,o)}}case"prproj":{let i=await l(),n=JSON.stringify(o??[]),s=i.extract_prproj_json(await a(e),n);return{fmt:t,extract:c(s,t,o)}}case"avb":{let i=await l(),n=JSON.stringify(o??[]),s=i.extract_avb_json(await a(e),n);return{fmt:t,extract:c(s,t,o)}}case"aaf":case"flame":{let n=(await l())[`extract_${t}_json`](await a(e));return{fmt:t,extract:c(n,t,o)}}}}async function a(e){return new Uint8Array(await e.arrayBuffer())}async function y(e){let r=_(await a(e)),o={};for(let[t,i]of Object.entries(r))t.toLowerCase().endsWith(".xml")&&(o[t]=g(i));return JSON.stringify(o)}function I(e){let r=JSON.parse(e),o=Array.isArray(r)?r:r?.timelines??r?.sequences??[],t=o.filter(n=>typeof n=="object"&&n!==null),i=o.map(n=>{if(typeof n=="string")return n;let s=n;return s?.name??s?.title??s?.id??""}).filter(n=>!!n);return{names:Array.from(new Set(i)),timelines:t}}var P=/^(.+)_(\d{3})\.R3D$/i;function u(e){let o=(e.split(/[/\\]/).pop()??e).match(P);return o?{clipBase:o[1],partNumber:parseInt(o[2],10)}:null}function C(e){return u(e)!==null}function U(e,r){let o=u(e);if(!o)return[];let t=[];for(let i of r){let n=u(i);n&&n.clipBase===o.clipBase&&t.push({name:i,n:n.partNumber})}return t.sort((i,n)=>i.n-n.n),t.map(i=>i.name)}async function L(e){if(!m(e.name))return null;try{return await b(w(e),{verb:"inspect"})}catch(r){return console.warn(`[probeMedia] ${e.name} probe failed:`,r),null}}var z={reelName:!1,fileName:!0,fileNameMode:"loose",fileExtensions:"",totalDuration:!1,resolution:!1,bitDepth:!1,fileFormat:!1,codec:!1,mediaUmid:!1};var Y="X-Write-Issues";function Q(e){if(!e)return[];try{let r=JSON.parse(decodeURIComponent(e));return Array.isArray(r)?r:[]}catch{return[]}}export{u as a,C as b,U as c,z as d,S as e,A as f,j as g,T as h,Y as i,Q as j,L as k};