davinci-resolve-mcp 2.151.0 → 2.152.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 +24 -0
- package/README.md +1 -1
- package/README.zh-CN.md +2 -2
- package/install.py +1 -1
- package/package.json +1 -1
- package/resolve-advanced/server/aaf_probe.py +29 -0
- package/resolve-advanced/server/author-interchange.mjs +23 -0
- package/resolve-advanced/server/tools/drt.mjs +1 -1
- package/src/granular/common.py +1 -1
- package/src/server.py +1 -1
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.152.0 — AAF dissolves conform at last, and AAF fades join the family
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **No AAF dissolve could ever conform through `assemble_from_interchange`**:
|
|
10
|
+
an AAF Transition consumes record time, so the walker (correctly) emits the
|
|
11
|
+
incoming clip overlapping the outgoing — and the bridge's overlap gate
|
|
12
|
+
threw on exactly that shape. A reconciliation pre-pass now trims the
|
|
13
|
+
outgoing's tail to the overlap start; the boundary shift then re-extends it
|
|
14
|
+
to the cut point, which is the AAF notional-cut (`CutPoint`) semantics
|
|
15
|
+
exactly. Render-verified: the dissolve blends through the 181.8 midpoint
|
|
16
|
+
fingerprint.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **AAF fades**: the walker synthesizes BL pseudo-events at filler-adjacent
|
|
21
|
+
and sequence-edge Transitions, completing fade parity across all four
|
|
22
|
+
formats (EDL v2.150, OTIO/XMEML v2.151, AAF now). The head-transition
|
|
23
|
+
"clamp" case is reinterpreted as what it is — a fade-in from black.
|
|
24
|
+
Full triple render-verified: fade-in 18→123, dissolve-to-white through the
|
|
25
|
+
midpoint, fade-out 230→21.
|
|
26
|
+
- A pyaaf2-authored AAF fixture test exercises the real walker end to end
|
|
27
|
+
(no stubs), skipped only where pyaaf2 is unavailable.
|
|
28
|
+
|
|
5
29
|
## What's New in v2.151.0 — fade parity: OTIO and XMEML fades author too
|
|
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
|
-
[](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
|
|
6
6
|
[](https://www.npmjs.com/package/davinci-resolve-mcp)
|
|
7
7
|
[](docs/reference/api-coverage.md)
|
|
8
8
|
[-blue.svg)](#server-modes)
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 简体中文
|
|
4
4
|
|
|
5
|
-
[](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
|
|
6
6
|
[](https://www.npmjs.com/package/davinci-resolve-mcp)
|
|
7
7
|
[](docs/reference/api-coverage.md)
|
|
8
8
|
[-blue.svg)](#服务器模式)
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[](https://www.python.org/downloads/)
|
|
13
13
|
[](https://opensource.org/licenses/MIT)
|
|
14
14
|
|
|
15
|
-
> 本翻译对应 v2.
|
|
15
|
+
> 本翻译对应 v2.152.0 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
|
|
16
16
|
|
|
17
17
|
一个 Model Context Protocol (MCP) 服务器,让 AI 助手通过官方脚本 API 控制 DaVinci Resolve Studio(达芬奇)。它提供完整的 API 覆盖,外加带护栏的工作流助手,涵盖剪辑、媒体池整理、渲染设置、审阅标记、调色、Fusion、Fairlight、项目生命周期任务、扩展开发,以及不碰源媒体的媒体分析。
|
|
18
18
|
|
package/install.py
CHANGED
|
@@ -37,7 +37,7 @@ from src.utils.update_check import (
|
|
|
37
37
|
|
|
38
38
|
# ─── Version ──────────────────────────────────────────────────────────────────
|
|
39
39
|
|
|
40
|
-
VERSION = "2.
|
|
40
|
+
VERSION = "2.152.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
|
@@ -1161,6 +1161,21 @@ def _walk_components(sequence, *, track, fps, rec, state, depth, transition=None
|
|
|
1161
1161
|
"""
|
|
1162
1162
|
start = rec
|
|
1163
1163
|
pending_transition = transition
|
|
1164
|
+
# Sequence start counts as black: a Transition with Filler (or nothing)
|
|
1165
|
+
# on one side is a FADE. Synthesize zero-length BL pseudo-events so the
|
|
1166
|
+
# bridge's black machinery (E91-E93) authors a real clip-to-generator
|
|
1167
|
+
# dissolve — Resolve renders empty track as black, and the bridge grows
|
|
1168
|
+
# the BL leg to cover its side of the overlap.
|
|
1169
|
+
at_black = True
|
|
1170
|
+
|
|
1171
|
+
def _emit_bl(rec_pos, trans):
|
|
1172
|
+
state["events"].append({
|
|
1173
|
+
"index": state["idx"], "track": track, "source": "BL",
|
|
1174
|
+
"srcIn": 0, "srcOut": 0, "recIn": rec_pos, "recOut": rec_pos,
|
|
1175
|
+
"speed": 100, "reverse": False, "transition": trans, "fps": fps,
|
|
1176
|
+
})
|
|
1177
|
+
state["idx"] += 1
|
|
1178
|
+
|
|
1164
1179
|
components = getattr(sequence, "components", None)
|
|
1165
1180
|
if components is None:
|
|
1166
1181
|
components = [sequence]
|
|
@@ -1190,15 +1205,29 @@ def _walk_components(sequence, *, track, fps, rec, state, depth, transition=None
|
|
|
1190
1205
|
# be a worse lie than the malformed AAF that produced it.
|
|
1191
1206
|
rec = max(start, rec - duration)
|
|
1192
1207
|
continue
|
|
1208
|
+
if pending_transition is not None and cls in ("Filler", "ScopeReference"):
|
|
1209
|
+
# Transition then Filler = fade-OUT into black: the fade
|
|
1210
|
+
# attaches to a synthetic BL leg at the overlap start.
|
|
1211
|
+
_emit_bl(rec, pending_transition)
|
|
1212
|
+
pending_transition = None
|
|
1213
|
+
elif pending_transition is not None and at_black:
|
|
1214
|
+
# Filler (or sequence start) then Transition then clip =
|
|
1215
|
+
# fade-IN from black: zero-length BL predecessor at the
|
|
1216
|
+
# overlap start; the bridge's boundary shift grows it.
|
|
1217
|
+
_emit_bl(rec, None)
|
|
1193
1218
|
rec += _walk_segment(
|
|
1194
1219
|
comp, track=track, fps=fps, rec=rec, state=state, depth=depth, transition=pending_transition
|
|
1195
1220
|
)
|
|
1196
1221
|
pending_transition = None
|
|
1222
|
+
at_black = cls in ("Filler", "ScopeReference")
|
|
1197
1223
|
except Exception:
|
|
1198
1224
|
# Never let one bad component abort the whole sequence — but say so.
|
|
1199
1225
|
_note_unhandled(state, cls)
|
|
1200
1226
|
pending_transition = None
|
|
1201
1227
|
continue
|
|
1228
|
+
if pending_transition is not None:
|
|
1229
|
+
# Transition as the LAST component = fade-out to the sequence end.
|
|
1230
|
+
_emit_bl(rec, pending_transition)
|
|
1202
1231
|
return rec - start
|
|
1203
1232
|
|
|
1204
1233
|
|
|
@@ -443,6 +443,29 @@ export function eventsToAssembleSpec(events, opts = {}) {
|
|
|
443
443
|
if (!perSource.has(e.source)) perSource.set(e.source, []);
|
|
444
444
|
perSource.get(e.source).push(cut);
|
|
445
445
|
}
|
|
446
|
+
// AAF overlap reconciliation (E93): an AAF Transition CONSUMES record time
|
|
447
|
+
// — the incoming component starts `duration` frames before the outgoing
|
|
448
|
+
// ends, so the walker legitimately emits OVERLAPPING events with the
|
|
449
|
+
// transition on the incoming (alignment 'start' at the overlap start).
|
|
450
|
+
// Trim the outgoing's tail to the overlap start before the overlap gates:
|
|
451
|
+
// the boundary-shift below then re-extends it to the cut point, which is
|
|
452
|
+
// exactly the AAF notional-cut semantics (CutPoint, centered by default).
|
|
453
|
+
// Without this the overlap gate threw and NO AAF dissolve could conform.
|
|
454
|
+
const reconcileAafOverlap = (cands, pls) => {
|
|
455
|
+
for (const c of cands) {
|
|
456
|
+
if (!c.explicitSpan || c.pre !== 0) continue;
|
|
457
|
+
const prev = pls.find((pl) => pl.track === c.track && pl.start < c.atFrame && pl.end > c.atFrame && pl.end - c.atFrame <= c.durationFrames);
|
|
458
|
+
if (!prev) continue;
|
|
459
|
+
const o = prev.end - c.atFrame;
|
|
460
|
+
if (prev.durationFrames <= o) continue; // degenerate: leave for the drop paths
|
|
461
|
+
prev.end -= o;
|
|
462
|
+
prev.durationFrames -= o;
|
|
463
|
+
prev.cutRef.durationFrames -= o;
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
reconcileAafOverlap(transitionCandidates, placements);
|
|
467
|
+
reconcileAafOverlap(audioTransCandidates, audioPlacements);
|
|
468
|
+
|
|
446
469
|
audioPlacements.sort((a, b) => a.start - b.start);
|
|
447
470
|
const audByTrack = new Map();
|
|
448
471
|
for (const pl of audioPlacements) {
|
|
@@ -153,7 +153,7 @@ function requirePathArg(args, key, action) {
|
|
|
153
153
|
export const drtTool = {
|
|
154
154
|
name: 'drt',
|
|
155
155
|
description:
|
|
156
|
-
'DaVinci Resolve Timeline (.drt) operations — offline, no Resolve required. Actions: assemble_from_interchange (EDL/OTIO/XML/AAF + sourceMap → IMPORTABLE RENDERING native .drt in one call; retimes AUTHOR — constant speed fwd/rev AND zero-speed freezes (EDL M2 000.0; render-proven frozen); cross-dissolves are AUTHORED when the cut abuts with handles both sides (render-verified on 19), else dropped with reason; fades AUTHOR across formats (EDL BL legs, OTIO gap-adjacent Transitions, XMEML edge transitionitems) — BL legs become Solid Color generators and the fade a real clip-to-generator dissolve, luma-ramp render-verified, while Resolve\'s OWN EDL importer drops BL dissolves silently; ledger in `conform`), assemble (spec → IMPORTABLE native-schema .drt via template-spliced real structures; pass targetAppVersion e.g. \'19.1\' for pre-21 hosts), parse, list_sequences (enumerate the timelines inside a .drp/.drt → [{id,name,eventCount,index}] to drive a "which sequence?" picker), author, validate, inject_into_drp, extract_from_drp (pull one SeqContainer out as a .drt — feed the .drt to the Python davinci-resolve MCP timeline.import_timeline_checked, or use timeline.import_from_drp to do both), downgrade (stamp <ProjectVersion> down so an OLDER Resolve will import a .drt/.drp from a newer one — pass targetAppVersion like "19.1.3" or targetProjectVersion).',
|
|
156
|
+
'DaVinci Resolve Timeline (.drt) operations — offline, no Resolve required. Actions: assemble_from_interchange (EDL/OTIO/XML/AAF + sourceMap → IMPORTABLE RENDERING native .drt in one call; retimes AUTHOR — constant speed fwd/rev AND zero-speed freezes (EDL M2 000.0; render-proven frozen); cross-dissolves are AUTHORED when the cut abuts with handles both sides (render-verified on 19), else dropped with reason; fades AUTHOR across ALL FOUR formats (EDL BL legs, OTIO gap-adjacent Transitions, XMEML edge transitionitems, AAF filler-adjacent Transitions) and AAF overlap-consuming dissolves reconcile+author (CutPoint honored; before E93 they threw at the overlap gate) — BL legs become Solid Color generators and the fade a real clip-to-generator dissolve, luma-ramp render-verified, while Resolve\'s OWN EDL importer drops BL dissolves silently; ledger in `conform`), assemble (spec → IMPORTABLE native-schema .drt via template-spliced real structures; pass targetAppVersion e.g. \'19.1\' for pre-21 hosts), parse, list_sequences (enumerate the timelines inside a .drp/.drt → [{id,name,eventCount,index}] to drive a "which sequence?" picker), author, validate, inject_into_drp, extract_from_drp (pull one SeqContainer out as a .drt — feed the .drt to the Python davinci-resolve MCP timeline.import_timeline_checked, or use timeline.import_from_drp to do both), downgrade (stamp <ProjectVersion> down so an OLDER Resolve will import a .drt/.drp from a newer one — pass targetAppVersion like "19.1.3" or targetProjectVersion).',
|
|
157
157
|
async handler({ action, args }) {
|
|
158
158
|
if (action === 'parse') {
|
|
159
159
|
const p = parseSchema.parse(requirePathArg(args, 'drtPath', 'parse'));
|
package/src/granular/common.py
CHANGED
|
@@ -87,7 +87,7 @@ if not logging.getLogger().handlers:
|
|
|
87
87
|
handlers=[logging.StreamHandler()],
|
|
88
88
|
)
|
|
89
89
|
|
|
90
|
-
VERSION = "2.
|
|
90
|
+
VERSION = "2.152.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()}")
|