davinci-resolve-mcp 2.191.0 → 2.192.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  Release history for the DaVinci Resolve MCP Server. The latest release is summarized in the root README; older entries live here to keep the README focused.
4
4
 
5
+ ## What's New in v2.192.0 — E140: a .drt retime decodes to its speed
6
+
7
+ ### Added
8
+
9
+ - **A `.drt` retime decodes to its speed.** The keyed `MediaTimemapBA`
10
+ (`Sm2TimeMap`) that E139 could only flag now reads through the DRP library's
11
+ `decodeTimemap`, the same reader the `.drp` side uses: the keyframe slope is
12
+ the speed ratio, `XMax 60000` with a zero slope is the freeze sentinel, a
13
+ negative slope is a reverse. The parser's `timemap` becomes an object
14
+ (`kind` linear | linear-multi | constant | variable | freeze | unknown,
15
+ `speed`, `reverse`, durations, ramp `segments`), and a DRT event carries
16
+ `speed` in the percent every other parser speaks with `srcOut` following the
17
+ record window at that speed; a freeze is the zero-speed in==out event; a map
18
+ the decoder cannot read stays `speed`/`srcOut` null + `retimeUnknown`, never
19
+ a faked 100%. Measured on the real REEL_02 export: all four retimed clips
20
+ read 80, and their `srcOut` lands frame for frame on what Premiere wrote for
21
+ the same cuts (42423, 41949, 42178, 42178); the Black Video generator reads
22
+ as a freeze; the tail leader reads as a reverse; nothing is left unknown.
23
+
24
+ ### Measured (filed in api-limitations)
25
+
26
+ - A 19.1.3.7 EXPORT_DRT writes `KeyframesBA` in the protobuf point form, not
27
+ the keyed-dict form its XMEML retime import writes; both decode.
28
+
5
29
  ## What's New in v2.191.0 — E139: a .drt timeline walks into events; two Resolve versions diff
6
30
 
7
31
  ### Added
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [简体中文](README.zh-CN.md)
4
4
 
5
- [![Version](https://img.shields.io/badge/version-2.191.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-2.192.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
6
6
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
7
7
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
8
8
  [![Tools](https://img.shields.io/badge/MCP%20Tools-36%20(353%20full)-blue.svg)](#server-modes)
package/README.zh-CN.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](README.md) | 简体中文
4
4
 
5
- [![Version](https://img.shields.io/badge/version-2.191.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-2.192.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
6
6
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
7
7
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
8
8
  [![Tools](https://img.shields.io/badge/MCP%20Tools-36%20(353%20full)-blue.svg)](#服务器模式)
@@ -12,7 +12,7 @@
12
12
  [![Python](https://img.shields.io/badge/python-3.10+-green.svg)](https://www.python.org/downloads/)
13
13
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
14
14
 
15
- > 本翻译对应 v2.191.0 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
15
+ > 本翻译对应 v2.192.0 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
16
16
 
17
17
  一个 Model Context Protocol (MCP) 服务器,让 AI 助手通过官方脚本 API 控制 DaVinci Resolve Studio(达芬奇)。它提供完整的 API 覆盖,外加带护栏的工作流助手,涵盖剪辑、媒体池整理、渲染设置、审阅标记、调色、Fusion、Fairlight、项目生命周期任务、扩展开发,以及不碰源媒体的媒体分析。
18
18
 
@@ -305,8 +305,8 @@ equivalent, blocking full automation.
305
305
 
306
306
  - **Object:** `Timeline`
307
307
  - **Signature:** `(filePath, EXPORT_DRT) -> bool`
308
- - **Behavior:** Measured on a Studio 19.1.3.7 export of a 229-clip reel (E139). A SeqContainer clip (Sm2TiVideoClip / Sm2TiAudioClip) carries its record window as <Start> and <Duration> (frames, absolute), its SOURCE in-point as <In> (frames) — written EMPTY (<In/>) on every audio clip and on generator tails — <MediaFilePath>, <MediaStartTime> (seconds), <MediaFrameRate> as a 16-hex blob = one little-endian IEEE double + 8 pad bytes (24.0 = 0000000000003840…), and <MediaTimemapBA>: tag byte 0x02 + one double (the media length in seconds) on a 100% clip, a keyed curve opening 00000001… on a retimed clip and on generators. An Sm2TiTransition sits in the same <Items> list as the clips with <Start>/<Duration> (its span), <PrettyType> (Cross Dissolve), <AlignmentType> and <Position>: type 2 centres the span on the cut, type 3 ends it at the cut (11/11 witnessed against the clip edges; the one-sided 8-frame fade-in is type 3 / Position 1). The container carries NO frame rate, start or resolution — they live in the pool folder's embedded Sm2Sequence: <FrameRate> (LE double blob), <MediaExtents> = two LE doubles, record start SECONDS then duration SECONDS (7192.0 → frame 172608 = 01:59:52:00 at 24), <Resolution> = two big-endian uint64, width then height.
309
- - **Workaround / current handling:** Read record timing from Start/Duration, source in from In (null when empty — do not fake 0 silently), fps and start from the pool sequence (frames = round(seconds × fps)); treat a curve timemap as a retime whose speed is not decoded here (speed null) rather than 100%. The parser exposes these and editorial.parse_interchange {format:'drt', content: PATH} walks one timeline into normalized events so two timeline versions diff through turnover_changelist (v19 vs v20 of a real reel: identical, 229 of 229 retained).
308
+ - **Behavior:** Measured on a Studio 19.1.3.7 export of a 229-clip reel (E139). A SeqContainer clip (Sm2TiVideoClip / Sm2TiAudioClip) carries its record window as <Start> and <Duration> (frames, absolute), its SOURCE in-point as <In> (frames) — written EMPTY (<In/>) on every audio clip and on generator tails — <MediaFilePath>, <MediaStartTime> (seconds), <MediaFrameRate> as a 16-hex blob = one little-endian IEEE double + 8 pad bytes (24.0 = 0000000000003840…), and <MediaTimemapBA>: tag byte 0x02 + one double (the media length in seconds) on a 100% clip, a keyed Sm2TimeMap opening 00000001… on a retimed clip and on generators — its KeyframesBA is the protobuf point form (NOT the keyed-dict form a 19.1.3.7 XMEML retime import writes) and decodes with the DRP library's decodeTimemap: the keyframe slope is the speed (0.79999 on all four retimed clips of a real reel = Premiere's 80 for the same cuts, srcOut = In + round(Duration × 0.8) matching Premiere's frame for frame), XMax 60000 with a zero slope is the freeze sentinel (a Black Video generator), a negative slope is a reverse (a reversed tail leader). An Sm2TiTransition sits in the same <Items> list as the clips with <Start>/<Duration> (its span), <PrettyType> (Cross Dissolve), <AlignmentType> and <Position>: type 2 centres the span on the cut, type 3 ends it at the cut (11/11 witnessed against the clip edges; the one-sided 8-frame fade-in is type 3 / Position 1). The container carries NO frame rate, start or resolution — they live in the pool folder's embedded Sm2Sequence: <FrameRate> (LE double blob), <MediaExtents> = two LE doubles, record start SECONDS then duration SECONDS (7192.0 → frame 172608 = 01:59:52:00 at 24), <Resolution> = two big-endian uint64, width then height.
309
+ - **Workaround / current handling:** Read record timing from Start/Duration, source in from In (null when empty — do not fake 0 silently), fps and start from the pool sequence (frames = round(seconds × fps)); decode a keyed timemap to its speed (E140) and report a map the decoder cannot read as speed null rather than 100%. The parser exposes these and editorial.parse_interchange {format:'drt', content: PATH} walks one timeline into normalized events so two timeline versions diff through turnover_changelist (v19 vs v20 of a real reel: identical, 229 of 229 retained).
310
310
  - **Tags:** timeline, export, drt, interchange
311
311
 
312
312
  ### Timeline.Export EXPORT_EDL (video-only, reel AX, clip-name comments)
package/install.py CHANGED
@@ -37,7 +37,7 @@ from src.utils.update_check import (
37
37
 
38
38
  # ─── Version ──────────────────────────────────────────────────────────────────
39
39
 
40
- VERSION = "2.191.0"
40
+ VERSION = "2.192.0"
41
41
  # Only hard floor: mcp[cli] requires Python 3.10+. There is no upper bound —
42
42
  # Resolve's scripting bridge loads into newer interpreters on recent builds
43
43
  # (Python 3.14 verified against Resolve Studio 20.3.2). Older Resolve builds
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "davinci-resolve-mcp",
3
- "version": "2.191.0",
3
+ "version": "2.192.0",
4
4
  "description": "NPM bootstrapper for the DaVinci Resolve MCP Server.",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Gursky <samgursky@gmail.com>",
@@ -622,7 +622,9 @@ export function parseInterchange(format, content, opts = {}) {
622
622
  * <Start>/<Duration>, its source in-point <In> (EMPTY on audio clips and on
623
623
  * generator tails — reported srcInAbsent, never faked to 0 silently), its
624
624
  * media <MediaFilePath>; <MediaTimemapBA> tag 0x02 = linear 100%, a keyed
625
- * curve = a retime this reader does not decode (speed null + retimeUnknown);
625
+ * Sm2TimeMap decodes to the speed (E140: constant 80% on a real reel's four
626
+ * retimes = Premiere's 80; XMax 60000 + zero slope = freeze; negative = reverse;
627
+ * an unreadable map stays speed null + retimeUnknown);
626
628
  * Sm2TiTransition alignment 2 centres on the cut, 3 ends at it. Record
627
629
  * positions are sequence-relative (start frame subtracted), like every other
628
630
  * parser here; `startFrame` is returned beside the events.
@@ -651,16 +653,27 @@ export function drtEventsFromParsed(parsed, opts = {}) {
651
653
  const srcIn = c.in != null ? c.in : 0;
652
654
  const media = c.mediaFilePath || null;
653
655
  const isGen = !media && !c.compound;
656
+ // E140: the decoded Sm2TimeMap gives the speed. A ratio becomes the
657
+ // percent every other parser speaks (0.8 → 80); the source OUT follows
658
+ // the record window at that speed (37 record frames × 0.8 = 30 source
659
+ // frames — the same srcOut Premiere wrote for the same cut); a freeze
660
+ // is the zero-speed in==out event the other parsers emit; a map the
661
+ // decoder could not read stays speed/srcOut null + retimeUnknown.
662
+ const tm = c.timemap && typeof c.timemap === 'object' ? c.timemap : null;
663
+ const kind = tm ? tm.kind : (c.timemap === 'curve' ? 'unknown' : 'linear');
664
+ let speed = 100, srcOut = srcIn + c.duration, unknown = false;
665
+ if (kind === 'freeze') { speed = 0; srcOut = srcIn; }
666
+ else if (kind === 'constant' || kind === 'variable') { speed = Math.round(tm.speed * 10000) / 100; srcOut = srcIn + Math.round(c.duration * tm.speed); }
667
+ else if (kind === 'unknown') { speed = null; srcOut = null; unknown = true; }
654
668
  const ev = {
655
669
  index: index++, track: label, source: media ? base(media, c.name) : (c.name || 'BL'),
656
- // A keyed speed curve makes the source OUT unknowable here — null, never
657
- // srcIn + duration as if it played at 100%.
658
- srcIn, srcOut: c.timemap === 'curve' ? null : srcIn + c.duration, recIn: c.start - startFrame, recOut: c.start - startFrame + c.duration,
659
- speed: c.timemap === 'curve' ? null : 100, reverse: false, transition: null, fps,
670
+ srcIn, srcOut, recIn: c.start - startFrame, recOut: c.start - startFrame + c.duration,
671
+ speed, reverse: Boolean(tm && tm.reverse), transition: null, fps,
660
672
  };
661
673
  if (media) ev.sourcePath = media;
662
674
  if (c.in == null) ev.srcInAbsent = true;
663
- if (c.timemap === 'curve') ev.retimeUnknown = true;
675
+ if (unknown) ev.retimeUnknown = true;
676
+ if (kind === 'variable') { ev.variableSpeed = true; ev.retimeSegments = tm.segments; }
664
677
  if (c.compound) ev.compound = c.compound;
665
678
  if (isGen) ev.generatorName = c.name || null;
666
679
  events.push(ev);
@@ -87,7 +87,7 @@ const markerSchema = z.object({
87
87
  export const editorialTool = {
88
88
  name: 'editorial',
89
89
  description:
90
- 'Editorial integrity (Cluster E) — turnover interchange → normalized events → changelist + conform manifest with TIMING silent-lie guards (flattened retime / dropped J/L-cut audio / framerate-pulldown slip / reverse dropped / transition-handle starvation → flag, skip-not-fake). Report-only (gate: review). Actions: parse_interchange (EDL/OTIO/XMEML natively — incl. Resolve-written OTIO generator clips (a Solid Color is a Clip with a NULL media_reference; it walks as a BL leg with generatorName, and an OTIO GeneratorReference carries its colour) and nested OTIO Stacks (compound clips — Resolve\'s writer nests them with a trim window) FLATTEN into record time with fromCompound on each cut, so Resolve\'s own OTIO exports re-conform (its FCP7 XML writer flattens a compound to ONE media-less clipitem instead — tagged `compound`, which the bridge drops with a reason in unresolvedCompounds unless the sourceMap maps the compound name to a flattened media file), Resolve-written FCP7 -1 junction edges (paired in record order) + Solid Color / Color Matte generators carrying their `fillcolor` (BL legs with `color` → fade-to-white and colour mattes author, E110), XMEML audio-track transitionitems as audio cross-fades on numbered lanes A/A2/…, and CMX FROM/TO CLIP NAME comments over the generic AX reel — + AAF via pyaaf2 (flat sound/picture slots number A/A2/… and V/V2/… in slot order so separate beds keep their lanes; NestedScope layers keep layer numbering; a NESTED SEQUENCE used as a clip — a SourceClip referencing a named CompositionMob — flattens through its reference window with fromCompound, like OTIO Stacks) + PRPROJ via gunzip+XML (real Premiere 2025 files — uuid ObjectUID/ObjectURef graph, TrackGroups, ClipTrackItem→SubClip→VideoClip→MediaSource→Media chain, zeros written as absence — and the legacy ObjectID/VideoTracks shape both walk; measured on a 739-sequence turnover that used to list ZERO; a NESTED SEQUENCE used as a clip — Source = Video/AudioSequenceSource → Sequence — flattens through its in-point window with fromCompound, like OTIO Stacks and AAF nested compositions; 13,711 such events on one real reels project; real transitions live in the track\'s TransitionItems list — read alongside ClipItems, attached with their DisplayName as type, HasOutgoingClip/HasIncomingClip false = fade from/to black or silence; tracks number as lanes V/V2…/A/A2… and a flattened nested sequence\'s inner lanes first-fit above what the parent already stacks — laneShift records the shift; markers are the sequence\'s OWN, read from Premiere\'s DVAMarker JSON) → normalized events incl. span-explicit transitions, BL fade legs, and freezes as zero-speed events (OTIO FreezeFrame, XMEML timeremap 0, PrProj in==out, AAF 0% motion effects); for AAF/PRPROJ/DRT/DRP pass the file PATH as content; DRT/DRP walk ONE timeline (`timeline` = pool name or index; default the first timeline-kind container) into events with sequence-relative record positions + the returned startFrame/startTimecode/fps read from the pool sequence — <In> is the source in-point (EMPTY on real audio clips → srcInAbsent), a keyed MediaTimemapBA curve is a retime this reader does not decode (speed null + retimeUnknown, never faked to 100%), Sm2TiTransition alignment 2 centres on the cut and 3 ends at it — so two Resolve timeline VERSIONS diff through turnover_changelist (E139); AAF also returns per-sequence startTimecode/startFrame — build the timeline at THAT start, not the Resolve 01:00:00:00 default — and per-clip `geometry` for Avid transform effects), list_sequences (ONE offline picker entry point across xml/edl/otio/drt/drp/aaf/prproj → [{id,name,eventCount}], plus startTimecode/startFrame for AAF and nestedIn — an AAF composition another composition uses as a clip is NESTED in it; offer the parent, its cuts arrive flattened), convert_to_interchange (author OTIO/EDL/DRT Resolve CAN import from events or a parsed source; the EDL target writes CMX transition pairs incl. BL fades — the .prproj→Resolve conform bridge, no Premiere needed; editorial timing/transitions survive and per-clip effects/color do not. SPEED/REVERSE survive on the otio (LinearTimeWarp) and edl (M2) targets ONLY — this FLAT drt target flattens every retime to 100% forward and returns `flattened`/`flattenedCount` naming each event that lost one (`flattened` is always present on `drt`, empty when there were none); for a .drt that AUTHORS retimes/dissolves/multi-track/audio, use drt.assemble_from_interchange), turnover_changelist (diff old vs new → a SHAPE verdict first — identical | subset (new keeps some of old\'s cuts unchanged in place and nothing else: a patch/selects reel of the same cut, NOT N deletions; a real Premiere auto-save kept 3 of 335) | superset (the reverse) | edit — with retained/oldCuts/newCuts, `sparse` and the retainedWindows for subset/superset, a transition that vanished or appeared with the cuts it joins counting as a consequence not an edit; then moved/retimed/trimmed/replaced/new/gone PLUS the junction diff: transition_added/transition_dropped/transition_changed with fade in/out or dissolve, outgoing/incoming, span and duration/type/pre-roll deltas — zero-length CMX carrier lines and the BL legs that carry fades fold into the junction diff instead of reading as gone/new sources; events pair by closest record position, consumed once, so a source cut twice at two speeds compares instance to instance; + timing flags incl. transition_dropped and dropped_split_audio on any A-track; a compound seen collapsed in one cut and flattened in the other reports compound_collapsed/compound_expanded once, never replaced+gone), conform_manifest (per-event assert: source resolved/handles/retime/reverse/TC-base; BL-aware — black legs need no source, fades no black-side handles, and a fade-out tail requirement lands on the picture source; a compound clipitem fails source_resolved by NAME with the remedy — map it to a flattened file or turn over as OTIO), marker_roundtrip (markers with provenance tags), verify_roundtrip (input events vs re-export events -> pass/mismatches + fitted per-source TC offsets + marker compare w/ markersNotInExport honesty flag; FADE-AWARE: BL/Solid-Color legs merge out as blackSegments and fade-window boundary reshapes are excused into fadeReshapedBoundaries instead of failing; RETIME-AWARE: speed/reverse compare pairwise — EXPORT_OTIO carries an authored Sm2TimeMap back as LinearTimeWarp (measured), so a flattened/lost retime fails as drift geometry alone cannot catch; AUDIO-AWARE: declared audio events compare (a video-only export such as EXPORT_EDL flags audioNotInExport instead of failing) (channel legs deduped, mismatches tagged trackType audio) while the mirrored-A1 export of a video-only turnover stays informational; COLOUR-AWARE: an input generator leg carrying a fillcolor (fade-to-white, colour matte) must come back on the same track over its span with the same colour — Resolve\'s FCP7 writer emits it — else generator-colour fails (generatorColours reports the compare) — pass exportedFormat: an OTIO/EDL re-export cannot carry colour (measured) and reports generatorColourNotInExport instead of failing; COMPOUND-AWARE: an XML re-export that collapsed a compound to one clipitem over cuts the input flattened from that compound reports compoundsCollapsedInExport instead of count/source drift; the conform QC loop-closer). Offline (AAF needs pyaaf2; live AAF/DRP import is on the Python davinci-resolve MCP).',
90
+ 'Editorial integrity (Cluster E) — turnover interchange → normalized events → changelist + conform manifest with TIMING silent-lie guards (flattened retime / dropped J/L-cut audio / framerate-pulldown slip / reverse dropped / transition-handle starvation → flag, skip-not-fake). Report-only (gate: review). Actions: parse_interchange (EDL/OTIO/XMEML natively — incl. Resolve-written OTIO generator clips (a Solid Color is a Clip with a NULL media_reference; it walks as a BL leg with generatorName, and an OTIO GeneratorReference carries its colour) and nested OTIO Stacks (compound clips — Resolve\'s writer nests them with a trim window) FLATTEN into record time with fromCompound on each cut, so Resolve\'s own OTIO exports re-conform (its FCP7 XML writer flattens a compound to ONE media-less clipitem instead — tagged `compound`, which the bridge drops with a reason in unresolvedCompounds unless the sourceMap maps the compound name to a flattened media file), Resolve-written FCP7 -1 junction edges (paired in record order) + Solid Color / Color Matte generators carrying their `fillcolor` (BL legs with `color` → fade-to-white and colour mattes author, E110), XMEML audio-track transitionitems as audio cross-fades on numbered lanes A/A2/…, and CMX FROM/TO CLIP NAME comments over the generic AX reel — + AAF via pyaaf2 (flat sound/picture slots number A/A2/… and V/V2/… in slot order so separate beds keep their lanes; NestedScope layers keep layer numbering; a NESTED SEQUENCE used as a clip — a SourceClip referencing a named CompositionMob — flattens through its reference window with fromCompound, like OTIO Stacks) + PRPROJ via gunzip+XML (real Premiere 2025 files — uuid ObjectUID/ObjectURef graph, TrackGroups, ClipTrackItem→SubClip→VideoClip→MediaSource→Media chain, zeros written as absence — and the legacy ObjectID/VideoTracks shape both walk; measured on a 739-sequence turnover that used to list ZERO; a NESTED SEQUENCE used as a clip — Source = Video/AudioSequenceSource → Sequence — flattens through its in-point window with fromCompound, like OTIO Stacks and AAF nested compositions; 13,711 such events on one real reels project; real transitions live in the track\'s TransitionItems list — read alongside ClipItems, attached with their DisplayName as type, HasOutgoingClip/HasIncomingClip false = fade from/to black or silence; tracks number as lanes V/V2…/A/A2… and a flattened nested sequence\'s inner lanes first-fit above what the parent already stacks — laneShift records the shift; markers are the sequence\'s OWN, read from Premiere\'s DVAMarker JSON) → normalized events incl. span-explicit transitions, BL fade legs, and freezes as zero-speed events (OTIO FreezeFrame, XMEML timeremap 0, PrProj in==out, AAF 0% motion effects); for AAF/PRPROJ/DRT/DRP pass the file PATH as content; DRT/DRP walk ONE timeline (`timeline` = pool name or index; default the first timeline-kind container) into events with sequence-relative record positions + the returned startFrame/startTimecode/fps read from the pool sequence — <In> is the source in-point (EMPTY on real audio clips → srcInAbsent), a keyed MediaTimemapBA Sm2TimeMap decodes to the speed (E140: the four retimed clips of a real reel read 80 Premiere\'s 80 for the same cuts — with srcOut following the record window at that speed; XMax 60000 + zero slope = a freeze → the zero-speed in==out event; a negative slope = reverse; a map the decoder cannot read stays speed null + retimeUnknown, never faked to 100%), Sm2TiTransition alignment 2 centres on the cut and 3 ends at it — so two Resolve timeline VERSIONS diff through turnover_changelist (E139); AAF also returns per-sequence startTimecode/startFrame — build the timeline at THAT start, not the Resolve 01:00:00:00 default — and per-clip `geometry` for Avid transform effects), list_sequences (ONE offline picker entry point across xml/edl/otio/drt/drp/aaf/prproj → [{id,name,eventCount}], plus startTimecode/startFrame for AAF and nestedIn — an AAF composition another composition uses as a clip is NESTED in it; offer the parent, its cuts arrive flattened), convert_to_interchange (author OTIO/EDL/DRT Resolve CAN import from events or a parsed source; the EDL target writes CMX transition pairs incl. BL fades — the .prproj→Resolve conform bridge, no Premiere needed; editorial timing/transitions survive and per-clip effects/color do not. SPEED/REVERSE survive on the otio (LinearTimeWarp) and edl (M2) targets ONLY — this FLAT drt target flattens every retime to 100% forward and returns `flattened`/`flattenedCount` naming each event that lost one (`flattened` is always present on `drt`, empty when there were none); for a .drt that AUTHORS retimes/dissolves/multi-track/audio, use drt.assemble_from_interchange), turnover_changelist (diff old vs new → a SHAPE verdict first — identical | subset (new keeps some of old\'s cuts unchanged in place and nothing else: a patch/selects reel of the same cut, NOT N deletions; a real Premiere auto-save kept 3 of 335) | superset (the reverse) | edit — with retained/oldCuts/newCuts, `sparse` and the retainedWindows for subset/superset, a transition that vanished or appeared with the cuts it joins counting as a consequence not an edit; then moved/retimed/trimmed/replaced/new/gone PLUS the junction diff: transition_added/transition_dropped/transition_changed with fade in/out or dissolve, outgoing/incoming, span and duration/type/pre-roll deltas — zero-length CMX carrier lines and the BL legs that carry fades fold into the junction diff instead of reading as gone/new sources; events pair by closest record position, consumed once, so a source cut twice at two speeds compares instance to instance; + timing flags incl. transition_dropped and dropped_split_audio on any A-track; a compound seen collapsed in one cut and flattened in the other reports compound_collapsed/compound_expanded once, never replaced+gone), conform_manifest (per-event assert: source resolved/handles/retime/reverse/TC-base; BL-aware — black legs need no source, fades no black-side handles, and a fade-out tail requirement lands on the picture source; a compound clipitem fails source_resolved by NAME with the remedy — map it to a flattened file or turn over as OTIO), marker_roundtrip (markers with provenance tags), verify_roundtrip (input events vs re-export events -> pass/mismatches + fitted per-source TC offsets + marker compare w/ markersNotInExport honesty flag; FADE-AWARE: BL/Solid-Color legs merge out as blackSegments and fade-window boundary reshapes are excused into fadeReshapedBoundaries instead of failing; RETIME-AWARE: speed/reverse compare pairwise — EXPORT_OTIO carries an authored Sm2TimeMap back as LinearTimeWarp (measured), so a flattened/lost retime fails as drift geometry alone cannot catch; AUDIO-AWARE: declared audio events compare (a video-only export such as EXPORT_EDL flags audioNotInExport instead of failing) (channel legs deduped, mismatches tagged trackType audio) while the mirrored-A1 export of a video-only turnover stays informational; COLOUR-AWARE: an input generator leg carrying a fillcolor (fade-to-white, colour matte) must come back on the same track over its span with the same colour — Resolve\'s FCP7 writer emits it — else generator-colour fails (generatorColours reports the compare) — pass exportedFormat: an OTIO/EDL re-export cannot carry colour (measured) and reports generatorColourNotInExport instead of failing; COMPOUND-AWARE: an XML re-export that collapsed a compound to one clipitem over cuts the input flattened from that compound reports compoundsCollapsedInExport instead of count/source drift; the conform QC loop-closer). Offline (AAF needs pyaaf2; live AAF/DRP import is on the Python davinci-resolve MCP).',
91
91
  async handler({ action, args }) {
92
92
  if (action === 'parse_interchange') {
93
93
  const p = parseSchema.parse(args);
@@ -56,17 +56,39 @@ function beUint64(hex, offset = 0) {
56
56
  const v = Number(Buffer.from(h.slice(offset, offset + 16), 'hex').readBigUInt64BE(0));
57
57
  return Number.isFinite(v) ? v : null;
58
58
  }
59
- // <MediaTimemapBA>: tag byte 0x02 + one double = a LINEAR (100%) clip whose
60
- // double is the media length in seconds; a blob opening 00000001… is a keyed
61
- // speed CURVE (retime) whose speed this parser does not decode it is
62
- // reported as 'curve' so a consumer never fakes 100%.
63
- function timemapKind(hex) {
59
+ // <MediaTimemapBA> (E139/E140): tag byte 0x02 + one double = a LINEAR (100%)
60
+ // clip whose double is the media length in seconds; a keyed Sm2TimeMap
61
+ // (00000001…) is a speed map. E140 decodes it through the DRP library's
62
+ // decodeTimemap (the same reader the .drp side uses): the keyframe slope is
63
+ // the speed ratio (0.8 on all four retimed clips of a real reel — Premiere's
64
+ // 80 for the same cuts), XMax 60000 with a zero slope is the FREEZE sentinel,
65
+ // a negative slope is a reverse. A map the decoder cannot read is 'unknown',
66
+ // never a faked 100%.
67
+ const FREEZE_XMAX_SENTINEL = 60000;
68
+ function decodeTimemapField(hex) {
64
69
  const h = String(hex || '').replace(/[^0-9a-fA-F]/g, '').toLowerCase();
65
70
  if (!h) return null;
66
- if (h.startsWith('02') && h.length === 18) return 'linear';
67
- if (h.startsWith('02')) return 'linear-multi';
68
- if (h.startsWith('00000001')) return 'curve';
69
- return 'unknown';
71
+ if (h.startsWith('02')) {
72
+ return { form: 'identity', kind: h.length === 18 ? 'linear' : 'linear-multi', speed: 1, reverse: false };
73
+ }
74
+ let d;
75
+ try {
76
+ d = require('../drp-format/media-timemap').decodeTimemap(h);
77
+ } catch {
78
+ return { form: 'retimed', kind: 'unknown', speed: null, reverse: false };
79
+ }
80
+ if (!d || d.form !== 'retimed') return { form: 'retimed', kind: 'unknown', speed: null, reverse: false };
81
+ const slope = d.segments && d.segments.length ? d.segments[0].speed : null;
82
+ const base = { form: 'retimed', recordDurationSec: d.recordDurationSec ?? null, sourceDurationSec: d.sourceDurationSec ?? null };
83
+ if (d.recordDurationSec === FREEZE_XMAX_SENTINEL && slope === 0) return { ...base, kind: 'freeze', speed: 0, reverse: false };
84
+ if (!Number.isFinite(slope) || slope === 0 || Math.abs(slope) > 100) return { ...base, kind: 'unknown', speed: null, reverse: false };
85
+ return {
86
+ ...base,
87
+ kind: d.variable ? 'variable' : 'constant',
88
+ speed: Math.abs(slope),
89
+ reverse: slope < 0,
90
+ ...(d.variable ? { segments: d.segments } : {}),
91
+ };
70
92
  }
71
93
  // Sm2TiTransition alignment (E139, witnessed against the cut points of 11
72
94
  // real dissolves): 2 = centred on the cut, 3 = ends at the cut (the
@@ -124,7 +146,7 @@ function extractClipsFromTrackXml(trackXml, trackType) {
124
146
  in: inRaw === null || inRaw === '' ? null : (Number.isFinite(Number.parseInt(inRaw, 10)) ? Number.parseInt(inRaw, 10) : null),
125
147
  mediaStartTime: mst === null || mst === '' ? null : (Number.isFinite(Number(mst)) ? Number(mst) : null),
126
148
  mediaFrameRate: leDouble(extractScalar(inner, 'MediaFrameRate')),
127
- timemap: timemapKind(extractScalar(inner, 'MediaTimemapBA')),
149
+ timemap: decodeTimemapField(extractScalar(inner, 'MediaTimemapBA')),
128
150
  prettyType: extractScalar(inner, 'PrettyType') || null,
129
151
  });
130
152
  }
@@ -87,7 +87,7 @@ if not logging.getLogger().handlers:
87
87
  handlers=[logging.StreamHandler()],
88
88
  )
89
89
 
90
- VERSION = "2.191.0"
90
+ VERSION = "2.192.0"
91
91
  logger = logging.getLogger("davinci-resolve-mcp")
92
92
  logger.info(f"Starting DaVinci Resolve MCP Server v{VERSION}")
93
93
  logger.info(f"Detected platform: {get_platform()}")
package/src/server.py CHANGED
@@ -11,7 +11,7 @@ Usage:
11
11
  python src/server.py --full # Start the 353-tool granular server instead
12
12
  """
13
13
 
14
- VERSION = "2.191.0"
14
+ VERSION = "2.192.0"
15
15
 
16
16
  import base64
17
17
  import os
@@ -2743,8 +2743,17 @@ API_TRUTH: List[Dict[str, Any]] = [
2743
2743
  "little-endian IEEE double + 8 pad bytes (24.0 = "
2744
2744
  "0000000000003840…), and <MediaTimemapBA>: tag byte 0x02 + "
2745
2745
  "one double (the media length in seconds) on a 100% clip, a "
2746
- "keyed curve opening 00000001… on a retimed clip and on "
2747
- "generators. An Sm2TiTransition sits in the same <Items> "
2746
+ "keyed Sm2TimeMap opening 00000001… on a retimed clip and on "
2747
+ "generators its KeyframesBA is the protobuf point form "
2748
+ "(NOT the keyed-dict form a 19.1.3.7 XMEML retime import "
2749
+ "writes) and decodes with the DRP library's decodeTimemap: "
2750
+ "the keyframe slope is the speed (0.79999 on all four "
2751
+ "retimed clips of a real reel = Premiere's 80 for the same "
2752
+ "cuts, srcOut = In + round(Duration × 0.8) matching "
2753
+ "Premiere's frame for frame), XMax 60000 with a zero slope "
2754
+ "is the freeze sentinel (a Black Video generator), a "
2755
+ "negative slope is a reverse (a reversed tail leader). An "
2756
+ "Sm2TiTransition sits in the same <Items> "
2748
2757
  "list as the clips with <Start>/<Duration> (its span), "
2749
2758
  "<PrettyType> (Cross Dissolve), <AlignmentType> and "
2750
2759
  "<Position>: type 2 centres the span on the cut, type 3 ends "
@@ -2759,8 +2768,9 @@ API_TRUTH: List[Dict[str, Any]] = [
2759
2768
  "recommended": "Read record timing from Start/Duration, source in from "
2760
2769
  "In (null when empty — do not fake 0 silently), fps and "
2761
2770
  "start from the pool sequence (frames = round(seconds × "
2762
- "fps)); treat a curve timemap as a retime whose speed is "
2763
- "not decoded here (speed null) rather than 100%. The "
2771
+ "fps)); decode a keyed timemap to its speed (E140) and "
2772
+ "report a map the decoder cannot read as speed null "
2773
+ "rather than 100%. The "
2764
2774
  "parser exposes these and editorial.parse_interchange "
2765
2775
  "{format:'drt', content: PATH} walks one timeline into "
2766
2776
  "normalized events so two timeline versions diff through "