davinci-resolve-mcp 2.175.0 → 2.177.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 +35 -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/author-interchange.mjs +21 -3
- package/resolve-advanced/server/lineage-db.mjs +6 -3
- package/resolve-advanced/server/qc-frame.mjs +18 -3
- package/resolve-advanced/server/tools/conform.mjs +1 -1
- package/resolve-advanced/server/tools/editorial.mjs +1 -1
- package/resolve-advanced/vendor/conform-qc/parse/xmeml-geometry.js +5 -0
- package/src/granular/common.py +1 -1
- package/src/server.py +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,41 @@
|
|
|
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.177.0 — E123: round-trip QC is compound-aware; flattening keeps the junctions
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **`verify_roundtrip` understands the two writers' compound forms.**
|
|
10
|
+
Resolve's OTIO writer flattens a compound's inner cuts (E120) while its
|
|
11
|
+
FCP7 writer collapses the compound to one media-less clipitem (E121), so
|
|
12
|
+
verifying flattened input cuts against an XML re-export read as count and
|
|
13
|
+
source drift. An exported compound whose span covers input cuts flattened
|
|
14
|
+
FROM that same compound now leaves the pairwise compare and is reported
|
|
15
|
+
in `compoundsCollapsedInExport` (name, track, span, inner cut count). A
|
|
16
|
+
collapsed compound over cuts that did not come from it stays drift.
|
|
17
|
+
|
|
18
|
+
### Verified
|
|
19
|
+
|
|
20
|
+
- Flattening keeps the junctions: an inner dissolve inside a nested Stack
|
|
21
|
+
and a transition INTO the compound both author at their flattened
|
|
22
|
+
positions — the bridge places both and drops none.
|
|
23
|
+
|
|
24
|
+
## What's New in v2.176.0 — E122: frame QC never scores a compound clip as a false red
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **A flattened compound cut read as a conform error in frame QC.** The
|
|
29
|
+
lineage ingest of Resolve's FCP7 export read a compound's media-less
|
|
30
|
+
clipitem as a source named after the compound with an oracle frame of 0;
|
|
31
|
+
the sampler would then look for a source that does not exist and score
|
|
32
|
+
the cut WRONG. The geometry parser now flags a clipitem whose `<file>`
|
|
33
|
+
carries an explicitly empty `<pathurl>` as a compound, the lineage store
|
|
34
|
+
keeps `is_compound` (pre-E122 sidecars migrate in place), and `qc` never
|
|
35
|
+
samples such a cut: it reports `UNREADABLE` / review with a note naming
|
|
36
|
+
the compound and pointing at the OTIO export, where compounds keep their
|
|
37
|
+
inner content and flatten (E120). Picture cuts around it are judged as
|
|
38
|
+
before.
|
|
39
|
+
|
|
5
40
|
## What's New in v2.175.0 — E121: a flattened XML compound is a named hole, not a refusal
|
|
6
41
|
|
|
7
42
|
### Fixed
|
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.177.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.177.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
|
@@ -925,7 +925,7 @@ export function verifyRoundtrip(inputEvents, exportedEvents, opts = {}) {
|
|
|
925
925
|
if (!v.length) return [];
|
|
926
926
|
const off = anchorOfSide(evts);
|
|
927
927
|
return v
|
|
928
|
-
.map((e) => ({ track: canonTrack(e.track), source: mapSource(canonSource(e.source)), recIn: e.recIn - off, recOut: e.recOut - off, srcIn: e.srcIn ?? 0, speed: e.speed ?? 100, reverse: Boolean(e.reverse), color: e.color && typeof e.color === 'object' ? { r: Number(e.color.r) || 0, g: Number(e.color.g) || 0, b: Number(e.color.b) || 0 } : null }))
|
|
928
|
+
.map((e) => ({ track: canonTrack(e.track), source: mapSource(canonSource(e.source)), recIn: e.recIn - off, recOut: e.recOut - off, srcIn: e.srcIn ?? 0, speed: e.speed ?? 100, reverse: Boolean(e.reverse), color: e.color && typeof e.color === 'object' ? { r: Number(e.color.r) || 0, g: Number(e.color.g) || 0, b: Number(e.color.b) || 0 } : null, compound: e.compound || null, fromCompound: e.fromCompound || null }))
|
|
929
929
|
.sort((a, b) => a.track.localeCompare(b.track) || a.recIn - b.recIn);
|
|
930
930
|
};
|
|
931
931
|
// FADES (E94): BL legs on the input side and the Solid Color generators a
|
|
@@ -1029,8 +1029,25 @@ export function verifyRoundtrip(inputEvents, exportedEvents, opts = {}) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
|
-
|
|
1033
|
-
|
|
1032
|
+
// COMPOUNDS COLLAPSED BY THE EXPORT (E123): Resolve's FCP7 writer flattens
|
|
1033
|
+
// a compound to one media-less clipitem (E121) while an OTIO turnover
|
|
1034
|
+
// flattens the compound's inner cuts (E120). An exported compound whose
|
|
1035
|
+
// span covers input cuts flattened FROM that same compound is not drift —
|
|
1036
|
+
// the export simply cannot show the inside. Those cuts and the collapsed
|
|
1037
|
+
// item leave the pairwise compare and the result names the compound.
|
|
1038
|
+
const compoundsCollapsedInExport = [];
|
|
1039
|
+
const collapsedIn = new Set();
|
|
1040
|
+
const collapsedEx = new Set();
|
|
1041
|
+
for (const ex of b0) {
|
|
1042
|
+
if (!ex.compound) continue;
|
|
1043
|
+
const inner = a0.filter((e) => e.fromCompound && canonSource(e.fromCompound) === canonSource(ex.compound) && e.track === ex.track && e.recIn < ex.recOut && e.recOut > ex.recIn);
|
|
1044
|
+
if (!inner.length) continue;
|
|
1045
|
+
compoundsCollapsedInExport.push({ name: ex.compound, track: ex.track, record: [ex.recIn, ex.recOut], innerCuts: inner.length });
|
|
1046
|
+
for (const e of inner) collapsedIn.add(e);
|
|
1047
|
+
collapsedEx.add(ex);
|
|
1048
|
+
}
|
|
1049
|
+
const a = a0.filter((e) => !isBlackSeg(e) && !collapsedIn.has(e));
|
|
1050
|
+
const b = b0.filter((e) => !isBlackSeg(e) && !collapsedEx.has(e));
|
|
1034
1051
|
const blackSegments = { input: a0.length - a.length, exported: b0.length - b.length };
|
|
1035
1052
|
const n = comparePairs(a, b, junctionsFor(/^V\d*$/), 'video');
|
|
1036
1053
|
|
|
@@ -1101,6 +1118,7 @@ export function verifyRoundtrip(inputEvents, exportedEvents, opts = {}) {
|
|
|
1101
1118
|
pass: mismatches.length === 0, pairs: n, srcOffsets, mismatches, markers,
|
|
1102
1119
|
...(generatorColours.compared ? { generatorColours } : {}),
|
|
1103
1120
|
...(generatorColourNotInExport ? { generatorColourNotInExport } : {}),
|
|
1121
|
+
...(compoundsCollapsedInExport.length ? { compoundsCollapsedInExport } : {}),
|
|
1104
1122
|
...(markersNotInExport ? { markersNotInExport } : {}),
|
|
1105
1123
|
...(blackSegments.input || blackSegments.exported ? { blackSegments } : {}),
|
|
1106
1124
|
...(fadeReshapedBoundaries.length ? { fadeReshapedBoundaries } : {}),
|
|
@@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS cuts (snapshot_id TEXT, cut_index INTEGER, record_sta
|
|
|
34
34
|
source_basename TEXT, source_path TEXT, xml_in INTEGER, xml_out INTEGER,
|
|
35
35
|
ppro_ticks_in INTEGER, oracle_source_frame INTEGER, is_subclip INTEGER,
|
|
36
36
|
subclip_startoffset INTEGER, subclip_endoffset INTEGER, reverse INTEGER,
|
|
37
|
-
scale_corrected REAL, pan_h REAL, pan_v REAL, rotation REAL, transition TEXT, speed REAL,
|
|
37
|
+
scale_corrected REAL, pan_h REAL, pan_v REAL, rotation REAL, transition TEXT, speed REAL, is_compound INTEGER,
|
|
38
38
|
cut_hash TEXT, PRIMARY KEY (snapshot_id, cut_index));
|
|
39
39
|
CREATE TABLE IF NOT EXISTS qc_verdicts (snapshot_id TEXT, cut_index INTEGER, reference_ref TEXT, reference_frame INTEGER,
|
|
40
40
|
verdict TEXT, category TEXT, structure REAL, psnr REAL, dx INTEGER, dy INTEGER,
|
|
@@ -52,6 +52,7 @@ export function openStore(dbPath) {
|
|
|
52
52
|
// cannot add a column, so migrate in place (idempotent).
|
|
53
53
|
const cols = db.prepare('PRAGMA table_info(cuts)').all().map((c) => c.name);
|
|
54
54
|
if (!cols.includes('speed')) db.exec('ALTER TABLE cuts ADD COLUMN speed REAL');
|
|
55
|
+
if (!cols.includes('is_compound')) db.exec('ALTER TABLE cuts ADD COLUMN is_compound INTEGER');
|
|
55
56
|
return db;
|
|
56
57
|
}
|
|
57
58
|
|
|
@@ -138,6 +139,7 @@ function buildCuts(xml, mediaFrames) {
|
|
|
138
139
|
? JSON.stringify({ in: c.transition_in || null, out: c.transition_out || null })
|
|
139
140
|
: null,
|
|
140
141
|
speed: c.speed ?? null,
|
|
142
|
+
is_compound: c.is_compound ? 1 : 0,
|
|
141
143
|
};
|
|
142
144
|
if (c.edges_resolved) resolvedEdges += 1;
|
|
143
145
|
if (c.edges_unresolved) unresolvedEdges.push({ cut_index: i, source_basename: cut.source_basename });
|
|
@@ -160,8 +162,8 @@ function writeSnapshot(dbPath, cuts, meta) {
|
|
|
160
162
|
(snapshot_id, reel, kind, source_ref, label, parent_id, content_hash, seq_w, seq_h, fps, cut_count, created_at, provenance)
|
|
161
163
|
VALUES (@snapshot_id,@reel,@kind,@source_ref,@label,@parent_id,@content_hash,@seq_w,@seq_h,@fps,@cut_count,@created_at,@provenance)`);
|
|
162
164
|
const insertCut = db.prepare(`INSERT INTO cuts
|
|
163
|
-
(snapshot_id, cut_index, record_start, record_end, source_basename, source_path, xml_in, xml_out, ppro_ticks_in, oracle_source_frame, is_subclip, subclip_startoffset, subclip_endoffset, reverse, scale_corrected, pan_h, pan_v, rotation, transition, speed, cut_hash)
|
|
164
|
-
VALUES (@snapshot_id,@cut_index,@record_start,@record_end,@source_basename,@source_path,@xml_in,@xml_out,@ppro_ticks_in,@oracle_source_frame,@is_subclip,@subclip_startoffset,@subclip_endoffset,@reverse,@scale_corrected,@pan_h,@pan_v,@rotation,@transition,@speed,@cut_hash)`);
|
|
165
|
+
(snapshot_id, cut_index, record_start, record_end, source_basename, source_path, xml_in, xml_out, ppro_ticks_in, oracle_source_frame, is_subclip, subclip_startoffset, subclip_endoffset, reverse, scale_corrected, pan_h, pan_v, rotation, transition, speed, is_compound, cut_hash)
|
|
166
|
+
VALUES (@snapshot_id,@cut_index,@record_start,@record_end,@source_basename,@source_path,@xml_in,@xml_out,@ppro_ticks_in,@oracle_source_frame,@is_subclip,@subclip_startoffset,@subclip_endoffset,@reverse,@scale_corrected,@pan_h,@pan_v,@rotation,@transition,@speed,@is_compound,@cut_hash)`);
|
|
165
167
|
db.transaction(() => {
|
|
166
168
|
insertSnap.run({
|
|
167
169
|
snapshot_id: snapshotId,
|
|
@@ -295,6 +297,7 @@ export async function ingestLiveTimeline(dbPath, opts = {}) {
|
|
|
295
297
|
rotation: t.rotation ?? null,
|
|
296
298
|
transition: null,
|
|
297
299
|
speed: null,
|
|
300
|
+
is_compound: 0,
|
|
298
301
|
};
|
|
299
302
|
cut.cut_hash = cutHash(cut);
|
|
300
303
|
return cut;
|
|
@@ -177,11 +177,26 @@ export async function qcSnapshot(dbPath, snapshotId, opts = {}) {
|
|
|
177
177
|
// read qc_record_frame / qc_source_frame when present.
|
|
178
178
|
const pick = pickQcFrame(cut);
|
|
179
179
|
const cutForSample = { ...cut, qc_record_frame: pick.recordFrame, qc_source_frame: pick.sourceFrame };
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
// A flattened COMPOUND cut (E122) has no flat source to sample: the XML
|
|
181
|
+
// writer left only its name. Judging it against the reference could only
|
|
182
|
+
// ever read WRONG — a false red — so it is review, with the reason.
|
|
183
|
+
const isCompoundCut = !!cut.is_compound;
|
|
184
|
+
const conform = isCompoundCut ? null : await opts.sampleConform(cutForSample);
|
|
185
|
+
const reference = isCompoundCut ? null : await opts.sampleReference(cutForSample);
|
|
182
186
|
const refFrame = pick.recordFrame ?? cut.record_start;
|
|
183
187
|
let v;
|
|
184
|
-
if (
|
|
188
|
+
if (isCompoundCut) {
|
|
189
|
+
v = {
|
|
190
|
+
snapshot_id: snapshotId,
|
|
191
|
+
cut_index: cut.cut_index,
|
|
192
|
+
reference_ref: ref,
|
|
193
|
+
reference_frame: refFrame,
|
|
194
|
+
verdict: 'UNREADABLE',
|
|
195
|
+
category: 'review',
|
|
196
|
+
ran_at: opts.now ?? null,
|
|
197
|
+
};
|
|
198
|
+
pick.note = `compound clip "${cut.source_basename || ''}" — no flat source to sample; QC its inner cuts from an OTIO export (nested Stacks flatten)`;
|
|
199
|
+
} else if (!reference) {
|
|
185
200
|
// can't sample the reference → can't verify → human review
|
|
186
201
|
v = {
|
|
187
202
|
snapshot_id: snapshotId,
|
|
@@ -90,7 +90,7 @@ const reportSchema = z.object({ meta: z.object({}).passthrough().optional(), cut
|
|
|
90
90
|
export const conformTool = {
|
|
91
91
|
name: 'conform',
|
|
92
92
|
description:
|
|
93
|
-
'Conform/relink QC engine (offline core). Actions: parse_geometry, oracle_derive, list_targets, repair_ladder, build_manifest, analyze_media (ffprobe target media → res/aspect/codec/bitdepth/fps + quality rank), relink_scalefix (surgical: repoint proxy→highres pathurls + fix the scale double-count per clip, preserving retimes/tracks/audio byte-for-byte; index MULTIPLE footage roots via footageDirs, PROXY excluded; returns warnings.leftOnProxyOrTest + unresolvedSources so a source stuck on its proxy cannot slip through), report; verify (gated on optional sharp); fix_reverse_clip (LIVE DB patch — restore a reversed clip dropped on import: copy a generic reverse MediaTimemapBA blob + set the mirrored "In"; SQLite or PostgreSQL; project must be CLOSED; locate→probe→calibrate K→apply); snapshot (sequence LINEAGE store — ingest_xml/ingest_live an editorial-or-conform XML or a live timeline into one content-hashed schema, then list/diff/show/rollback_plan; the diff is the incremental frame-QC worklist; ingest_xml reads Resolve\'s OWN FCP7 export: `-1` clip edges resolve to the adjacent transition\'s junction in record order, each cut records the transition windows its edges sit in, and a missing pproTicksIn (Resolve writes none — measured) falls back to `<in>` for the oracle frame instead of losing it, reported as resolvedEdges/unresolvedEdges/ticksAbsent); qc (comprehensive per-cut frame diff vs the reference render → MATCH/OFFSET/WRONG/REF_OFFLINE/UNREADABLE cached per snapshot; each cut is compared at the first frame CLEAR of its transition windows — inside a window the reference is a blend, or black for a fade — with the source frame advanced at the cut\'s speed, and the result says where it sampled (sample_note); a flat/untextured frame is UNREADABLE (review), never a fake MATCH; conform frame is sampled at the oracle source frame AND scale-corrected to the edit framing before diffing, so reversed/scaled clips compare apples-to-apples; REF_OFFLINE = the reference is black/flat at that record position because the shot was offline upstream in editorial — inconclusive, NOT a conform error; op run [ffmpeg+sharp] / markers [red conform / yellow turnover / blue ref-offline / cyan review marker plan] / propagate [carry unchanged verdicts to a new snapshot]). Frame-math is the truth, not filename matches.',
|
|
93
|
+
'Conform/relink QC engine (offline core). Actions: parse_geometry, oracle_derive, list_targets, repair_ladder, build_manifest, analyze_media (ffprobe target media → res/aspect/codec/bitdepth/fps + quality rank), relink_scalefix (surgical: repoint proxy→highres pathurls + fix the scale double-count per clip, preserving retimes/tracks/audio byte-for-byte; index MULTIPLE footage roots via footageDirs, PROXY excluded; returns warnings.leftOnProxyOrTest + unresolvedSources so a source stuck on its proxy cannot slip through), report; verify (gated on optional sharp); fix_reverse_clip (LIVE DB patch — restore a reversed clip dropped on import: copy a generic reverse MediaTimemapBA blob + set the mirrored "In"; SQLite or PostgreSQL; project must be CLOSED; locate→probe→calibrate K→apply); snapshot (sequence LINEAGE store — ingest_xml/ingest_live an editorial-or-conform XML or a live timeline into one content-hashed schema, then list/diff/show/rollback_plan; the diff is the incremental frame-QC worklist; ingest_xml reads Resolve\'s OWN FCP7 export: `-1` clip edges resolve to the adjacent transition\'s junction in record order, each cut records the transition windows its edges sit in, and a missing pproTicksIn (Resolve writes none — measured) falls back to `<in>` for the oracle frame instead of losing it, reported as resolvedEdges/unresolvedEdges/ticksAbsent); qc (comprehensive per-cut frame diff vs the reference render → MATCH/OFFSET/WRONG/REF_OFFLINE/UNREADABLE cached per snapshot; each cut is compared at the first frame CLEAR of its transition windows — inside a window the reference is a blend, or black for a fade — with the source frame advanced at the cut\'s speed, and the result says where it sampled (sample_note); a flat/untextured frame is UNREADABLE (review), never a fake MATCH; a cut that is a FLATTENED COMPOUND (Resolve\'s XML writer leaves a media-less clipitem named after the compound — ingest tags is_compound) is never sampled: review with a note pointing at the OTIO export, never a false WRONG; conform frame is sampled at the oracle source frame AND scale-corrected to the edit framing before diffing, so reversed/scaled clips compare apples-to-apples; REF_OFFLINE = the reference is black/flat at that record position because the shot was offline upstream in editorial — inconclusive, NOT a conform error; op run [ffmpeg+sharp] / markers [red conform / yellow turnover / blue ref-offline / cyan review marker plan] / propagate [carry unchanged verdicts to a new snapshot]). Frame-math is the truth, not filename matches.',
|
|
94
94
|
async handler({ action, args }) {
|
|
95
95
|
if (action === 'parse_geometry') {
|
|
96
96
|
const p = parseSchema.parse(args);
|
|
@@ -86,7 +86,7 @@ const markerSchema = z.object({
|
|
|
86
86
|
export const editorialTool = {
|
|
87
87
|
name: 'editorial',
|
|
88
88
|
description:
|
|
89
|
-
'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) + PRPROJ via gunzip+XML → 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 pass the file PATH as content; 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), 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 → 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), 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), 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; the conform QC loop-closer). Offline (AAF needs pyaaf2; live AAF/DRP import is on the Python davinci-resolve MCP).',
|
|
89
|
+
'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) + PRPROJ via gunzip+XML → 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 pass the file PATH as content; 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), 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 → 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), 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), 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
90
|
async handler({ action, args }) {
|
|
91
91
|
if (action === 'parse_interchange') {
|
|
92
92
|
const p = parseSchema.parse(args);
|
|
@@ -254,6 +254,10 @@ function parseGeometry(xml) {
|
|
|
254
254
|
const fileNode = ci.file;
|
|
255
255
|
const fileId = fileNode && fileNode['@_id'] != null ? String(fileNode['@_id']) : null;
|
|
256
256
|
const def = fileId ? fileDefs[fileId] : null;
|
|
257
|
+
// Resolve's FCP7 writer flattens a COMPOUND CLIP to a clipitem whose
|
|
258
|
+
// <file> carries an explicitly EMPTY <pathurl> and no inner content
|
|
259
|
+
// (measured E120/E121). It has no flat source to sample.
|
|
260
|
+
const isCompound = !!(fileNode && typeof fileNode.pathurl === 'string' && fileNode.pathurl.trim() === '');
|
|
257
261
|
const sub = ci.subclipinfo;
|
|
258
262
|
const startoffset = sub ? num(sub.startoffset) : null;
|
|
259
263
|
const endoffset = sub ? num(sub.endoffset) : null;
|
|
@@ -311,6 +315,7 @@ function parseGeometry(xml) {
|
|
|
311
315
|
srcH: def ? def.srcH : null,
|
|
312
316
|
edges_resolved: edgesResolved,
|
|
313
317
|
edges_unresolved: unresolved,
|
|
318
|
+
is_compound: isCompound,
|
|
314
319
|
transition_in: win(inWin),
|
|
315
320
|
transition_out: win(outWin),
|
|
316
321
|
});
|
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.177.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()}")
|