davinci-resolve-mcp 2.175.0 → 2.176.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 +16 -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/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/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,22 @@
|
|
|
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.176.0 — E122: frame QC never scores a compound clip as a false red
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **A flattened compound cut read as a conform error in frame QC.** The
|
|
10
|
+
lineage ingest of Resolve's FCP7 export read a compound's media-less
|
|
11
|
+
clipitem as a source named after the compound with an oracle frame of 0;
|
|
12
|
+
the sampler would then look for a source that does not exist and score
|
|
13
|
+
the cut WRONG. The geometry parser now flags a clipitem whose `<file>`
|
|
14
|
+
carries an explicitly empty `<pathurl>` as a compound, the lineage store
|
|
15
|
+
keeps `is_compound` (pre-E122 sidecars migrate in place), and `qc` never
|
|
16
|
+
samples such a cut: it reports `UNREADABLE` / review with a note naming
|
|
17
|
+
the compound and pointing at the OTIO export, where compounds keep their
|
|
18
|
+
inner content and flatten (E120). Picture cuts around it are judged as
|
|
19
|
+
before.
|
|
20
|
+
|
|
5
21
|
## What's New in v2.175.0 — E121: a flattened XML compound is a named hole, not a refusal
|
|
6
22
|
|
|
7
23
|
### 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.176.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.176.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
|
@@ -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);
|
|
@@ -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.176.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()}")
|