@zenaigc/zenmcp 0.1.9 → 0.1.11
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/INSTALL.md +114 -102
- package/dist/src/assets/index.js +1 -1
- package/dist/src/assets/model-library.js +157 -16
- package/dist/src/core/schema.js +1 -0
- package/dist/src/doctor.js +0 -0
- package/dist/src/effects/index.js +54 -13
- package/dist/src/engine/card.js +5 -2
- package/dist/src/engine/direct.js +2 -0
- package/dist/src/engine/generate.js +15 -2
- package/dist/src/engine/steps.js +84 -9
- package/dist/src/inspect/index.js +51 -12
- package/dist/src/mcp/guidance.js +1 -1
- package/dist/src/mcp/server.js +247 -19
- package/dist/src/timeline/conform.js +19 -5
- package/dist/src/timeline/cuts.js +13 -13
- package/dist/src/timeline/diff.js +25 -7
- package/dist/src/timeline/index.js +2 -2
- package/dist/templates/pop-title/render.js +28 -8
- package/package.json +1 -1
- package/skills/zenmcp/SKILL.md +77 -46
- package/skills/zenmcp/references/00-model-card.md +165 -0
- package/skills/zenmcp/references/01-dissect-and-checkpoints.md +68 -0
- package/skills/zenmcp/references/02-character-and-tryon.md +63 -0
- package/skills/zenmcp/references/03-wan3-camera-and-audio.md +43 -0
- package/skills/zenmcp/references/04-hyperframes-effects.md +61 -0
- package/skills/zenmcp/references/05-interaction-and-media.md +203 -0
- package/skills/zenmcp/references/06-work-delivery.md +29 -0
- package/skills/zenmcp/scripts/build-contact-sheet.mjs +179 -0
- package/skills/zenmcp/scripts/build-dissect-report.mjs +1233 -0
- package/skills/zenmcp/scripts/build-height-ruler.mjs +49 -0
- package/skills/zenmcp/scripts/build-side-by-side.mjs +56 -0
- package/skills/zenmcp/widgets/fixtures/zenmcp-budget-confirm.readonly.json +31 -0
- package/skills/zenmcp/widgets/zenmcp-account/template.json +1 -1
- package/skills/zenmcp/widgets/zenmcp-account/widget.html +8 -10
- package/skills/zenmcp/widgets/zenmcp-budget-confirm/template.json +5 -2
- package/skills/zenmcp/widgets/zenmcp-budget-confirm/widget.html +50 -13
- package/skills/zenmcp/widgets/zenmcp-install-checklist/template.json +1 -1
- package/skills/zenmcp/widgets/zenmcp-install-checklist/widget.html +18 -12
- package/skills/zenmcp/widgets/zenmcp-spend-confirm/template.json +13 -83
- package/skills/zenmcp/widgets/zenmcp-spend-confirm/widget.html +88 -65
- package/dist/src/setup/targets.js +0 -314
- package/skills/zenmcp/widgets/fixtures/zenmcp-asset-roles.json +0 -24
- package/skills/zenmcp/widgets/fixtures/zenmcp-model-picker.json +0 -25
- package/skills/zenmcp/widgets/fixtures/zenmcp-trim-range.json +0 -19
- package/skills/zenmcp/widgets/zenmcp-asset-roles/template.json +0 -54
- package/skills/zenmcp/widgets/zenmcp-asset-roles/widget.html +0 -73
- package/skills/zenmcp/widgets/zenmcp-model-picker/template.json +0 -31
- package/skills/zenmcp/widgets/zenmcp-model-picker/widget.html +0 -28
- package/skills/zenmcp/widgets/zenmcp-trim-range/template.json +0 -53
- package/skills/zenmcp/widgets/zenmcp-trim-range/widget.html +0 -52
|
@@ -0,0 +1,1233 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ZenAIGC standalone HTML video dissection & remix plan report builder.
|
|
4
|
+
* Pure Node.js + ffmpeg/ffprobe, zero external dependencies, zero network requests.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* node skills/zenmcp/scripts/build-dissect-report.mjs --project <project-dir> [--out <report.html>]
|
|
8
|
+
* node skills/zenmcp/scripts/build-dissect-report.mjs --analysis <analysis.json> --video <video.mp4> [--project-json <project.json>] [--out <report.html>]
|
|
9
|
+
*/
|
|
10
|
+
import { execFile } from 'node:child_process';
|
|
11
|
+
import { access, mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
12
|
+
import { tmpdir } from 'node:os';
|
|
13
|
+
import { basename, dirname, join, resolve } from 'node:path';
|
|
14
|
+
import { promisify } from 'node:util';
|
|
15
|
+
|
|
16
|
+
const execFileAsync = promisify(execFile);
|
|
17
|
+
|
|
18
|
+
const args = process.argv.slice(2);
|
|
19
|
+
let projectDir = '';
|
|
20
|
+
let analysisPath = '';
|
|
21
|
+
let projectJsonPath = '';
|
|
22
|
+
let videoPath = '';
|
|
23
|
+
let outPath = '';
|
|
24
|
+
let thumbWidth = 360;
|
|
25
|
+
|
|
26
|
+
for (let i = 0; i < args.length; i++) {
|
|
27
|
+
const a = args[i];
|
|
28
|
+
if (a === '--project' && args[i + 1]) projectDir = resolve(args[++i]);
|
|
29
|
+
else if (a === '--analysis' && args[i + 1]) analysisPath = resolve(args[++i]);
|
|
30
|
+
else if (a === '--project-json' && args[i + 1]) projectJsonPath = resolve(args[++i]);
|
|
31
|
+
else if (a === '--video' && args[i + 1]) videoPath = resolve(args[++i]);
|
|
32
|
+
else if (a === '--out' && args[i + 1]) outPath = resolve(args[++i]);
|
|
33
|
+
else if (a === '--thumb-w' && args[i + 1]) thumbWidth = Number(args[++i]);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async function exists(p) {
|
|
37
|
+
if (!p) return false;
|
|
38
|
+
try {
|
|
39
|
+
await access(p);
|
|
40
|
+
return true;
|
|
41
|
+
} catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async function readJsonSafe(p) {
|
|
47
|
+
if (!(await exists(p))) return null;
|
|
48
|
+
return JSON.parse(await readFile(p, 'utf8'));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function esc(value) {
|
|
52
|
+
return String(value ?? '')
|
|
53
|
+
.replace(/&/g, '&')
|
|
54
|
+
.replace(/</g, '<')
|
|
55
|
+
.replace(/>/g, '>')
|
|
56
|
+
.replace(/"/g, '"')
|
|
57
|
+
.replace(/'/g, ''');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function scaleLabel(raw) {
|
|
61
|
+
const s = String(raw ?? '').trim();
|
|
62
|
+
const map = {
|
|
63
|
+
full: '全身远景',
|
|
64
|
+
medium: '中景 / 膝上七分身',
|
|
65
|
+
close: '近景 / 半身',
|
|
66
|
+
ecu: '特写',
|
|
67
|
+
cu: '近景特写',
|
|
68
|
+
mcu: '中近景',
|
|
69
|
+
ms: '中景',
|
|
70
|
+
fs: '全身景',
|
|
71
|
+
ls: '远景',
|
|
72
|
+
};
|
|
73
|
+
return map[s.toLowerCase()] ?? (s || '待确认景别');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function gcd(a, b) {
|
|
77
|
+
return b ? gcd(b, a % b) : a;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function formatSec(sec) {
|
|
81
|
+
if (!Number.isFinite(sec)) return '0.00s';
|
|
82
|
+
return `${sec.toFixed(2)}s`;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function detectActionProps(text) {
|
|
86
|
+
const s = String(text ?? '');
|
|
87
|
+
const keywords = ['杂志', '书', '墨镜', '眼镜', '咖啡', '杯', '饮料', '伞', '手机', '相机', '花', '帽', '包', '手包', '小包', '拎包', '提包'];
|
|
88
|
+
return keywords.filter(k => s.includes(k));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function highlightCaptionHtml(text) {
|
|
92
|
+
const raw = String(text ?? '').trim();
|
|
93
|
+
if (!raw) return '';
|
|
94
|
+
if (raw.includes('{') && raw.includes('}')) {
|
|
95
|
+
return esc(raw).replace(/\{([^}]+)\}/g, '<mark class="hf-hl">$1</mark>');
|
|
96
|
+
}
|
|
97
|
+
const m = raw.match(/^(.*?越)(.{1,4})$/);
|
|
98
|
+
if (m) {
|
|
99
|
+
return `${esc(m[1])}<mark class="hf-hl">${esc(m[2])}</mark>`;
|
|
100
|
+
}
|
|
101
|
+
return esc(raw);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
async function resolveInputs() {
|
|
105
|
+
if (projectDir) {
|
|
106
|
+
if (!analysisPath) analysisPath = join(projectDir, '01-reference', 'analysis.json');
|
|
107
|
+
if (!projectJsonPath) projectJsonPath = join(projectDir, 'project.json');
|
|
108
|
+
if (!outPath) outPath = join(projectDir, '01-reference', 'report.html');
|
|
109
|
+
}
|
|
110
|
+
if (!analysisPath || !(await exists(analysisPath))) {
|
|
111
|
+
throw new Error(`找不到拆解文件 analysis.json:${analysisPath || '(未指定)'}`);
|
|
112
|
+
}
|
|
113
|
+
const baseDir = projectDir || dirname(dirname(analysisPath));
|
|
114
|
+
const refDir = dirname(analysisPath);
|
|
115
|
+
const analysis = await readJsonSafe(analysisPath);
|
|
116
|
+
const project = await readJsonSafe(projectJsonPath);
|
|
117
|
+
|
|
118
|
+
if (!videoPath) {
|
|
119
|
+
const candidates = [
|
|
120
|
+
typeof analysis.source === 'string' ? join(refDir, analysis.source) : '',
|
|
121
|
+
typeof analysis.source === 'string' ? join(baseDir, analysis.source) : '',
|
|
122
|
+
analysis.source?.motion_ref_file ? join(baseDir, analysis.source.motion_ref_file) : '',
|
|
123
|
+
analysis.source?.raw_file ? join(baseDir, analysis.source.raw_file) : '',
|
|
124
|
+
analysis.source?.file ? join(baseDir, analysis.source.file) : '',
|
|
125
|
+
analysis.source?.path ? resolve(baseDir, analysis.source.path) : '',
|
|
126
|
+
typeof analysis.source_video === 'string' ? join(baseDir, analysis.source_video) : '',
|
|
127
|
+
typeof project?.source === 'string' ? join(baseDir, project.source) : '',
|
|
128
|
+
join(refDir, 'motion-clean.mp4'),
|
|
129
|
+
join(refDir, 'video.mp4'),
|
|
130
|
+
join(refDir, 'ref.mp4'),
|
|
131
|
+
join(refDir, 'fetch', 'video.mp4'),
|
|
132
|
+
join(refDir, 'raw-post', 'video.mp4'),
|
|
133
|
+
].filter(Boolean);
|
|
134
|
+
for (const c of candidates) {
|
|
135
|
+
if (await exists(c)) {
|
|
136
|
+
videoPath = c;
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (!outPath) outPath = join(refDir, 'report.html');
|
|
142
|
+
return { baseDir, refDir, analysis, project, videoPath, outPath };
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
async function probeVideoFallback(vPath) {
|
|
146
|
+
if (!vPath || !(await exists(vPath))) return null;
|
|
147
|
+
try {
|
|
148
|
+
const { stdout } = await execFileAsync('ffprobe', [
|
|
149
|
+
'-v', 'error',
|
|
150
|
+
'-select_streams', 'v:0',
|
|
151
|
+
'-show_entries', 'stream=width,height,r_frame_rate,nb_frames,duration',
|
|
152
|
+
'-of', 'json',
|
|
153
|
+
vPath,
|
|
154
|
+
]);
|
|
155
|
+
const s = JSON.parse(stdout).streams?.[0];
|
|
156
|
+
if (!s) return null;
|
|
157
|
+
const [num, den] = String(s.r_frame_rate || '30/1').split('/').map(Number);
|
|
158
|
+
const fps = den ? num / den : 30;
|
|
159
|
+
const frames = Number(s.nb_frames) || Math.round(Number(s.duration || 0) * fps);
|
|
160
|
+
return {
|
|
161
|
+
width: Number(s.width) || 1080,
|
|
162
|
+
height: Number(s.height) || 1920,
|
|
163
|
+
fps,
|
|
164
|
+
frames,
|
|
165
|
+
duration: Number(s.duration) || (frames / fps),
|
|
166
|
+
};
|
|
167
|
+
} catch {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
async function extractShotThumbDataUri(vPath, timestampSec, tmpDir, index, width) {
|
|
173
|
+
if (!vPath || !(await exists(vPath))) return '';
|
|
174
|
+
const jpg = join(tmpDir, `shot-${String(index).padStart(3, '0')}.jpg`);
|
|
175
|
+
try {
|
|
176
|
+
await execFileAsync('ffmpeg', [
|
|
177
|
+
'-y',
|
|
178
|
+
'-v', 'error',
|
|
179
|
+
'-ss', Math.max(0, timestampSec).toFixed(3),
|
|
180
|
+
'-i', vPath,
|
|
181
|
+
'-frames:v', '1',
|
|
182
|
+
'-vf', `scale=${width}:-2:flags=lanczos`,
|
|
183
|
+
'-q:v', '5',
|
|
184
|
+
jpg,
|
|
185
|
+
]);
|
|
186
|
+
const buf = await readFile(jpg);
|
|
187
|
+
return `data:image/jpeg;base64,${buf.toString('base64')}`;
|
|
188
|
+
} catch {
|
|
189
|
+
return '';
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function normalizeModel(analysis, project, probed, vPath) {
|
|
194
|
+
const srcObj = typeof analysis.source === 'object' && analysis.source ? analysis.source : (analysis.media ?? {});
|
|
195
|
+
const width = Number(analysis.width ?? srcObj.width ?? probed?.width ?? 1080);
|
|
196
|
+
const height = Number(analysis.height ?? srcObj.height ?? probed?.height ?? 1920);
|
|
197
|
+
const fpsRaw = analysis.fps ?? srcObj.fps ?? probed?.fps ?? 30;
|
|
198
|
+
const fps = typeof fpsRaw === 'object' && fpsRaw ? (Number(fpsRaw.num) / Number(fpsRaw.den || 1)) : Number(fpsRaw || 30);
|
|
199
|
+
const totalFrames = Number(
|
|
200
|
+
srcObj.clean_frames ?? analysis.frames ?? srcObj.frames ?? srcObj.raw_frames ?? probed?.frames ?? 0,
|
|
201
|
+
);
|
|
202
|
+
const durationSec = Number(
|
|
203
|
+
srcObj.clean_duration_seconds ?? analysis.duration_seconds ?? srcObj.duration_seconds ?? probed?.duration ?? (totalFrames / fps),
|
|
204
|
+
);
|
|
205
|
+
const d = gcd(width, height);
|
|
206
|
+
const ratio = srcObj.ratio ?? `${width / d}:${height / d}`;
|
|
207
|
+
|
|
208
|
+
// Offset when videoPath is raw un-trimmed video but segments are indexed on motion-clean
|
|
209
|
+
const flashRange = Array.isArray(srcObj.flash_cover_frames) ? srcObj.flash_cover_frames : null;
|
|
210
|
+
const rawFlashOffset = (flashRange && vPath && vPath.endsWith('video.mp4') && !vPath.includes('motion-clean'))
|
|
211
|
+
? Number(flashRange[1] || 0)
|
|
212
|
+
: 0;
|
|
213
|
+
|
|
214
|
+
const rawShots = Array.isArray(analysis.shots) ? analysis.shots : (Array.isArray(analysis.segments) ? analysis.segments : []);
|
|
215
|
+
const shots = rawShots.map((s, idx) => {
|
|
216
|
+
const startFrame = Number(s.start_frame ?? 0);
|
|
217
|
+
const endFrame = Number(s.end_frame ?? startFrame + 30);
|
|
218
|
+
const startSec = startFrame / fps;
|
|
219
|
+
const endSec = endFrame / fps;
|
|
220
|
+
const dur = Number(s.duration_seconds ?? ((endFrame - startFrame) / fps));
|
|
221
|
+
const topMargin = s.top_margin_estimate ?? '';
|
|
222
|
+
const bottomCut = s.bottom_framing ?? '';
|
|
223
|
+
const framingText = s.subject_framing
|
|
224
|
+
? String(s.subject_framing)
|
|
225
|
+
: [topMargin ? `头顶留白 ${topMargin}` : '', bottomCut ? `下沿至${bottomCut}` : ''].filter(Boolean).join(' · ') || '见关键帧构图';
|
|
226
|
+
const action = s.action ?? s.person_action ?? '自然展示';
|
|
227
|
+
const handObjects = s.hand_objects ? String(s.hand_objects) : '';
|
|
228
|
+
const detectedProps = detectActionProps(`${action} ${handObjects}`);
|
|
229
|
+
return {
|
|
230
|
+
index: idx + 1,
|
|
231
|
+
id: s.id ?? `s${idx + 1}`,
|
|
232
|
+
slot: Number(s.outfit_slot ?? 1),
|
|
233
|
+
startFrame,
|
|
234
|
+
endFrame,
|
|
235
|
+
startSec,
|
|
236
|
+
endSec,
|
|
237
|
+
dur,
|
|
238
|
+
midSec: ((startFrame + endFrame) / 2 + rawFlashOffset) / fps,
|
|
239
|
+
scale: scaleLabel(s.shot_scale),
|
|
240
|
+
camera: s.camera_motion ?? '固定机位',
|
|
241
|
+
framing: framingText,
|
|
242
|
+
action,
|
|
243
|
+
handObjects,
|
|
244
|
+
detectedProps,
|
|
245
|
+
speech: s.original_speech ?? '',
|
|
246
|
+
speechMs: Array.isArray(s.speech_ms) ? s.speech_ms : null,
|
|
247
|
+
caption: s.original_caption ?? '',
|
|
248
|
+
};
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
const maxSlotFromShots = shots.reduce((m, s) => Math.max(m, s.slot || 0), 0);
|
|
252
|
+
const outfitCount = Number(
|
|
253
|
+
analysis.outfit_count ?? analysis.cinematography_summary?.outfit_count ?? project?.outfit_count ?? maxSlotFromShots ?? 1,
|
|
254
|
+
);
|
|
255
|
+
|
|
256
|
+
const withinBaseline = analysis.admission_notes?.within_verified_baseline !== false;
|
|
257
|
+
const catObj = analysis.video_category ?? project?.video_category ?? {};
|
|
258
|
+
const primaryCat = catObj.primary ?? (withinBaseline ? '穿搭展示' : '跨场景 / 运镜展示');
|
|
259
|
+
const spaceCat = catObj.space ?? (withinBaseline ? '固定机位同场景' : '跨场景转场 / 手持运镜');
|
|
260
|
+
|
|
261
|
+
let speechMode = catObj.speech ?? '';
|
|
262
|
+
if (!speechMode) {
|
|
263
|
+
const vm = analysis.audio_profile?.voice_mode;
|
|
264
|
+
if (vm === 'voiceover_non_lipsync') speechMode = '画外音口播(非对口型)+ BGM';
|
|
265
|
+
else if (vm === 'none_bgm_only') speechMode = '纯 BGM 卡点(无口播)';
|
|
266
|
+
else speechMode = shots.some(s => s.speech) ? '含口播台词' : 'BGM / 环境音';
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
let speechShort = '环境音 / BGM';
|
|
270
|
+
if (speechMode.includes('画外音')) speechShort = '画外音口播';
|
|
271
|
+
else if (speechMode.includes('对口型') && !speechMode.includes('未见') && !speechMode.includes('非对口型')) speechShort = '入画对口型';
|
|
272
|
+
else if (speechMode.includes('无口播') && !speechMode.includes('不作')) speechShort = '纯 BGM 卡点';
|
|
273
|
+
else if (speechMode.includes('尚未核听') || speechMode.includes('待确认')) speechShort = '音轨待核听';
|
|
274
|
+
else if (shots.some(s => s.speech)) speechShort = '含口播台词';
|
|
275
|
+
let flashSummary = '无异常片头闪帧';
|
|
276
|
+
if (flashRange && flashRange[1] > 0) {
|
|
277
|
+
flashSummary = `片头 0–${flashRange[1]} 帧闪帧封面(已标记剥离)`;
|
|
278
|
+
} else if (analysis.tail_inspection && String(analysis.tail_inspection).includes('黑帧')) {
|
|
279
|
+
flashSummary = `${analysis.head_inspection ? '片头干净 · ' : ''}${analysis.tail_inspection}`;
|
|
280
|
+
} else if (typeof analysis.flash_cover_frames === 'number' && analysis.flash_cover_frames > 0) {
|
|
281
|
+
flashSummary = `片头 ${analysis.flash_cover_frames} 帧闪帧封面`;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const title = project?.title
|
|
285
|
+
?? analysis.title
|
|
286
|
+
?? analysis.case_id
|
|
287
|
+
?? (vPath ? basename(vPath) : '参考视频拆解报告');
|
|
288
|
+
|
|
289
|
+
const summaryDesc = analysis.cinematography_summary?.shot_pattern
|
|
290
|
+
?? (withinBaseline
|
|
291
|
+
? `共 ${shots.length} 个镜头、覆盖 ${outfitCount} 套穿搭槽位,采用${spaceCat}结构,可直接走 ZenMCP 第一类高一致二创闭环。`
|
|
292
|
+
: (analysis.admission_notes?.risks?.join(';') || '存在跨场景或大幅运镜特征,建议截取单场景片段或调整方案。'));
|
|
293
|
+
|
|
294
|
+
const sceneSetup = analysis.cinematography_summary?.camera_setup ?? spaceCat;
|
|
295
|
+
|
|
296
|
+
// Aggregate slots
|
|
297
|
+
const outfitDescs = Array.isArray(analysis.outfits) ? analysis.outfits : [];
|
|
298
|
+
const projectGarments = Array.isArray(project?.assets?.garments) ? project.assets.garments : [];
|
|
299
|
+
const slots = [];
|
|
300
|
+
for (let k = 1; k <= outfitCount; k++) {
|
|
301
|
+
const slotShots = shots.filter(s => s.slot === k);
|
|
302
|
+
const totalDur = slotShots.reduce((acc, s) => acc + s.dur, 0);
|
|
303
|
+
const gMatch = projectGarments.find(g => Number(g.slot) === k);
|
|
304
|
+
const desc = outfitDescs[k - 1]
|
|
305
|
+
?? gMatch?.description
|
|
306
|
+
?? `第 ${k} 套待替换服装槽位`;
|
|
307
|
+
slots.push({
|
|
308
|
+
slot: k,
|
|
309
|
+
shotIds: slotShots.map(s => `#${String(s.index).padStart(2, '0')}`),
|
|
310
|
+
shotCount: slotShots.length,
|
|
311
|
+
duration: totalDur,
|
|
312
|
+
sharePct: durationSec > 0 ? Math.min(100, Math.round((totalDur / durationSec) * 100)) : 0,
|
|
313
|
+
desc,
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// Props & risks
|
|
318
|
+
const propItems = shots
|
|
319
|
+
.filter(s => s.handObjects || s.detectedProps.length > 0)
|
|
320
|
+
.map(s => ({
|
|
321
|
+
shotLabel: `#${String(s.index).padStart(2, '0')} (${formatSec(s.startSec)}–${formatSec(s.endSec)})`,
|
|
322
|
+
action: s.action,
|
|
323
|
+
props: s.handObjects || s.detectedProps.join('、'),
|
|
324
|
+
}));
|
|
325
|
+
|
|
326
|
+
const risks = Array.isArray(analysis.admission_notes?.risks) ? analysis.admission_notes.risks : [];
|
|
327
|
+
const wan3Combined = Math.ceil(durationSec) * 2;
|
|
328
|
+
const durationAdvice = durationSec > 15
|
|
329
|
+
? `原片净长 ${formatSec(durationSec)}(超过 Wan 3.0 单次 15 秒上限,且参考+输出需 ≤30 秒),建议在闸门 1 截取前 12–13 秒精华段或分两批生成。`
|
|
330
|
+
: `净片时长 ${formatSec(durationSec)}(参考+输出约 ${wan3Combined}s ≤ 30s),符合 Wan 3.0 整片一次多槽位直出最佳区间。`;
|
|
331
|
+
|
|
332
|
+
// Captions / Effects timeline
|
|
333
|
+
const effectRows = [];
|
|
334
|
+
if (Array.isArray(analysis.on_screen_effects)) {
|
|
335
|
+
for (const ef of analysis.on_screen_effects) {
|
|
336
|
+
effectRows.push({
|
|
337
|
+
time: ef.time_range ?? '片头主题区',
|
|
338
|
+
shotLabel: ef.segments ? ef.segments.join(', ') : '跨镜头',
|
|
339
|
+
speech: '—',
|
|
340
|
+
caption: Array.isArray(ef.lines) ? ef.lines.join(' / ') : String(ef.text ?? ''),
|
|
341
|
+
preset: ef.kind === 'pop-title' ? 'hero-title(开场主题花字)' : 'top-tag(顶部卖点标签)',
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
for (const s of shots) {
|
|
346
|
+
if (s.speech || s.caption) {
|
|
347
|
+
const msLabel = s.speechMs ? `${(s.speechMs[0] / 1000).toFixed(2)}–${(s.speechMs[1] / 1000).toFixed(2)}s` : `${formatSec(s.startSec)}–${formatSec(s.endSec)}`;
|
|
348
|
+
effectRows.push({
|
|
349
|
+
time: msLabel,
|
|
350
|
+
shotLabel: `#${String(s.index).padStart(2, '0')}`,
|
|
351
|
+
speech: s.speech || '—',
|
|
352
|
+
caption: s.caption || s.speech || '',
|
|
353
|
+
preset: (s.caption || '').length <= 8 ? 'top-tag(顶部双色高亮)' : 'voice-caption(底部字幕条)',
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
const persistentText = catObj.text && !effectRows.length ? String(catObj.text) : '';
|
|
358
|
+
|
|
359
|
+
return {
|
|
360
|
+
title,
|
|
361
|
+
withinBaseline,
|
|
362
|
+
primaryCat,
|
|
363
|
+
spaceCat,
|
|
364
|
+
speechMode,
|
|
365
|
+
speechShort,
|
|
366
|
+
flashSummary,
|
|
367
|
+
width,
|
|
368
|
+
height,
|
|
369
|
+
ratio,
|
|
370
|
+
fps: Math.round(fps * 100) / 100,
|
|
371
|
+
totalFrames,
|
|
372
|
+
durationSec,
|
|
373
|
+
outfitCount,
|
|
374
|
+
summaryDesc,
|
|
375
|
+
sceneSetup,
|
|
376
|
+
shots,
|
|
377
|
+
slots,
|
|
378
|
+
propItems,
|
|
379
|
+
risks,
|
|
380
|
+
durationAdvice,
|
|
381
|
+
proposedEdit: analysis.proposed_edit ?? '',
|
|
382
|
+
rhythmPattern: analysis.audio_profile?.rhythm_pattern ?? '',
|
|
383
|
+
effectRows,
|
|
384
|
+
persistentText,
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
function renderHtml(m) {
|
|
389
|
+
const generatedAt = new Date().toISOString().slice(0, 16).replace('T', ' ');
|
|
390
|
+
const badgeClass = m.withinBaseline ? 'badge-ok' : 'badge-warn';
|
|
391
|
+
const badgeText = m.withinBaseline
|
|
392
|
+
? `第一类准入 · ${m.primaryCat}(${m.spaceCat})`
|
|
393
|
+
: `非第一类边界提示 · ${m.primaryCat}`;
|
|
394
|
+
|
|
395
|
+
const slotCardsHtml = m.slots.map(sl => `
|
|
396
|
+
<div class="slot-card">
|
|
397
|
+
<div class="slot-head">
|
|
398
|
+
<span class="slot-pill">第 ${sl.slot} 套服装槽</span>
|
|
399
|
+
<span class="slot-meta">${sl.shotCount} 镜 · ${formatSec(sl.duration)} (${sl.sharePct}%)</span>
|
|
400
|
+
</div>
|
|
401
|
+
<div class="slot-desc">${esc(sl.desc)}</div>
|
|
402
|
+
<div class="slot-bar"><span style="width:${Math.max(6, sl.sharePct)}%"></span></div>
|
|
403
|
+
<div class="slot-shots">对应分镜:${esc(sl.shotIds.join(' 、 ') || '待映射')}</div>
|
|
404
|
+
</div>
|
|
405
|
+
`).join('');
|
|
406
|
+
|
|
407
|
+
const propAlertHtml = m.propItems.length > 0 ? `
|
|
408
|
+
<div class="notice-box notice-iris">
|
|
409
|
+
<div class="notice-title">动作依赖物与配饰核对提醒(共 ${m.propItems.length} 处手部交互)</div>
|
|
410
|
+
<p class="notice-sub">以下镜头存在手部持物或佩戴动作。移除动作依赖物会导致人物手部悬空失真,默认随动作保留;如需替换请在准备闸门一并确认:</p>
|
|
411
|
+
<ul class="prop-list">
|
|
412
|
+
${m.propItems.map(p => `<li><strong>${esc(p.shotLabel)}</strong>:${esc(p.action)} <span class="prop-tag">识别物:${esc(p.props)}</span></li>`).join('')}
|
|
413
|
+
</ul>
|
|
414
|
+
</div>
|
|
415
|
+
` : '';
|
|
416
|
+
|
|
417
|
+
const riskAlertHtml = m.risks.length > 0 ? `
|
|
418
|
+
<div class="notice-box notice-warn">
|
|
419
|
+
<div class="notice-title">非第一类视频可行性边界提示</div>
|
|
420
|
+
<ul class="prop-list">
|
|
421
|
+
${m.risks.map(r => `<li>${esc(r)}</li>`).join('')}
|
|
422
|
+
</ul>
|
|
423
|
+
</div>
|
|
424
|
+
` : '';
|
|
425
|
+
|
|
426
|
+
const shotCardsHtml = m.shots.map(s => `
|
|
427
|
+
<article class="shot-card">
|
|
428
|
+
<div class="shot-media">
|
|
429
|
+
${s.thumb
|
|
430
|
+
? `<img src="${s.thumb}" alt="镜头 ${s.index}" loading="lazy" />`
|
|
431
|
+
: `<div class="shot-placeholder">Frame ${s.startFrame}–${s.endFrame}</div>`}
|
|
432
|
+
<span class="shot-num">#${String(s.index).padStart(2, '0')} · ${formatSec(s.startSec)}–${formatSec(s.endSec)}</span>
|
|
433
|
+
<span class="shot-slot">第 ${s.slot} 套</span>
|
|
434
|
+
</div>
|
|
435
|
+
<div class="shot-body">
|
|
436
|
+
<div class="shot-scale-row">
|
|
437
|
+
<span class="scale-tag">${esc(s.scale)}</span>
|
|
438
|
+
<span class="frame-range">f${s.startFrame}–${s.endFrame} (${formatSec(s.dur)})</span>
|
|
439
|
+
</div>
|
|
440
|
+
<div class="shot-kv"><span>构图上下沿</span><p>${esc(s.framing)}</p></div>
|
|
441
|
+
<div class="shot-kv"><span>动作与机位</span><p>${esc(s.action)}(${esc(s.camera)})</p></div>
|
|
442
|
+
${(s.speech || s.caption) ? `
|
|
443
|
+
<div class="shot-caption-box">
|
|
444
|
+
${s.speech ? `<div class="sc-line"><em>口播</em> ${esc(s.speech)}</div>` : ''}
|
|
445
|
+
${s.caption ? `<div class="sc-line"><em>花字</em> ${highlightCaptionHtml(s.caption)}</div>` : ''}
|
|
446
|
+
</div>
|
|
447
|
+
` : ''}
|
|
448
|
+
</div>
|
|
449
|
+
</article>
|
|
450
|
+
`).join('');
|
|
451
|
+
|
|
452
|
+
const effectsSectionHtml = (m.effectRows.length > 0 || m.persistentText) ? `
|
|
453
|
+
<section class="sec">
|
|
454
|
+
<div class="sec-head">
|
|
455
|
+
<div>
|
|
456
|
+
<span class="sec-kicker">03 · AUDIO & HYPERFRAMES PACKAGING</span>
|
|
457
|
+
<h2>口播节奏与 HyperFrames 花字排布方案</h2>
|
|
458
|
+
</div>
|
|
459
|
+
<span class="sec-note">本地确定性矢量渲染 · 改字 / 调色 / 挪位置均为 0 积分秒改</span>
|
|
460
|
+
</div>
|
|
461
|
+
${m.rhythmPattern ? `<p class="rhythm-banner"><strong>音画卡点规律:</strong>${esc(m.rhythmPattern)}</p>` : ''}
|
|
462
|
+
${m.persistentText ? `<p class="rhythm-banner"><strong>原片屏幕文字观测:</strong>${esc(m.persistentText)}(二创生成时原片文字不会残留,可按需用 HyperFrames 叠加新标题)</p>` : ''}
|
|
463
|
+
${m.effectRows.length > 0 ? `
|
|
464
|
+
<div class="table-wrap">
|
|
465
|
+
<table class="zen-table">
|
|
466
|
+
<thead>
|
|
467
|
+
<tr>
|
|
468
|
+
<th>时间窗</th>
|
|
469
|
+
<th>对应分镜</th>
|
|
470
|
+
<th>原片口播台词</th>
|
|
471
|
+
<th>屏幕花字双色高亮预览</th>
|
|
472
|
+
<th>HyperFrames 推荐预设</th>
|
|
473
|
+
</tr>
|
|
474
|
+
</thead>
|
|
475
|
+
<tbody>
|
|
476
|
+
${m.effectRows.map(r => `
|
|
477
|
+
<tr>
|
|
478
|
+
<td class="mono">${esc(r.time)}</td>
|
|
479
|
+
<td class="mono">${esc(r.shotLabel)}</td>
|
|
480
|
+
<td>${esc(r.speech)}</td>
|
|
481
|
+
<td><span class="hf-preview">${highlightCaptionHtml(r.caption)}</span></td>
|
|
482
|
+
<td><span class="preset-chip">${esc(r.preset)}</span></td>
|
|
483
|
+
</tr>
|
|
484
|
+
`).join('')}
|
|
485
|
+
</tbody>
|
|
486
|
+
</table>
|
|
487
|
+
</div>
|
|
488
|
+
` : ''}
|
|
489
|
+
</section>
|
|
490
|
+
` : '';
|
|
491
|
+
|
|
492
|
+
return `<!doctype html>
|
|
493
|
+
<html lang="zh-CN">
|
|
494
|
+
<head>
|
|
495
|
+
<meta charset="utf-8" />
|
|
496
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
497
|
+
<title>${esc(m.title)} · ZenAIGC 视频拆解报告</title>
|
|
498
|
+
<style>
|
|
499
|
+
:root {
|
|
500
|
+
--bg: #F6F5F0;
|
|
501
|
+
--surface: #FFFFFF;
|
|
502
|
+
--surface-subtle: #ECE9E1;
|
|
503
|
+
--ink: #191724;
|
|
504
|
+
--ink-secondary: #575366;
|
|
505
|
+
--ink-muted: #858096;
|
|
506
|
+
--line: rgba(25, 23, 36, 0.10);
|
|
507
|
+
--line-strong: rgba(25, 23, 36, 0.18);
|
|
508
|
+
--iris: #5B43E6;
|
|
509
|
+
--iris-soft: rgba(91, 67, 230, 0.10);
|
|
510
|
+
--iris-text: #4A32D4;
|
|
511
|
+
--ok-bg: rgba(22, 131, 88, 0.10);
|
|
512
|
+
--ok-text: #136F4A;
|
|
513
|
+
--warn-bg: rgba(196, 108, 21, 0.12);
|
|
514
|
+
--warn-text: #9A4E08;
|
|
515
|
+
--wing-ink: #191724;
|
|
516
|
+
--wing-iris: #5B43E6;
|
|
517
|
+
--hl-bg: #191724;
|
|
518
|
+
--hl-ink: #FFE14D;
|
|
519
|
+
--shadow-card: 0 1px 2px rgba(25, 23, 36, 0.04), 0 8px 24px rgba(25, 23, 36, 0.04);
|
|
520
|
+
}
|
|
521
|
+
html[data-theme="dark"] {
|
|
522
|
+
--bg: #13121B;
|
|
523
|
+
--surface: #1B1A26;
|
|
524
|
+
--surface-subtle: #242233;
|
|
525
|
+
--ink: #F4F3F8;
|
|
526
|
+
--ink-secondary: #B5B1C6;
|
|
527
|
+
--ink-muted: #7F7A94;
|
|
528
|
+
--line: rgba(244, 243, 248, 0.10);
|
|
529
|
+
--line-strong: rgba(244, 243, 248, 0.20);
|
|
530
|
+
--iris: #8E77FF;
|
|
531
|
+
--iris-soft: rgba(142, 119, 255, 0.16);
|
|
532
|
+
--iris-text: #B8A8FF;
|
|
533
|
+
--ok-bg: rgba(46, 184, 126, 0.16);
|
|
534
|
+
--ok-text: #6EE7B7;
|
|
535
|
+
--warn-bg: rgba(245, 158, 11, 0.16);
|
|
536
|
+
--warn-text: #FCD34D;
|
|
537
|
+
--wing-ink: #F4F3F8;
|
|
538
|
+
--wing-iris: #8E77FF;
|
|
539
|
+
--hl-bg: #2B2840;
|
|
540
|
+
--hl-ink: #FFE14D;
|
|
541
|
+
--shadow-card: 0 2px 12px rgba(0, 0, 0, 0.28);
|
|
542
|
+
}
|
|
543
|
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
544
|
+
body {
|
|
545
|
+
background: var(--bg);
|
|
546
|
+
color: var(--ink);
|
|
547
|
+
font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
|
|
548
|
+
line-height: 1.6;
|
|
549
|
+
-webkit-font-smoothing: antialiased;
|
|
550
|
+
transition: background-color 0.2s ease, color 0.2s ease;
|
|
551
|
+
}
|
|
552
|
+
.wrap {
|
|
553
|
+
max-width: 1220px;
|
|
554
|
+
margin: 0 auto;
|
|
555
|
+
padding: 0 28px 64px;
|
|
556
|
+
}
|
|
557
|
+
.topbar {
|
|
558
|
+
position: sticky;
|
|
559
|
+
top: 0;
|
|
560
|
+
z-index: 20;
|
|
561
|
+
background: color-mix(in srgb, var(--bg) 88%, transparent);
|
|
562
|
+
backdrop-filter: blur(12px);
|
|
563
|
+
border-bottom: 1px solid var(--line);
|
|
564
|
+
margin-bottom: 32px;
|
|
565
|
+
}
|
|
566
|
+
.topbar-in {
|
|
567
|
+
max-width: 1220px;
|
|
568
|
+
margin: 0 auto;
|
|
569
|
+
padding: 14px 28px;
|
|
570
|
+
display: flex;
|
|
571
|
+
align-items: center;
|
|
572
|
+
justify-content: space-between;
|
|
573
|
+
gap: 16px;
|
|
574
|
+
}
|
|
575
|
+
.brand {
|
|
576
|
+
display: inline-flex;
|
|
577
|
+
align-items: center;
|
|
578
|
+
gap: 10px;
|
|
579
|
+
text-decoration: none;
|
|
580
|
+
color: var(--ink);
|
|
581
|
+
}
|
|
582
|
+
.zm-logo { width: 28px; height: 28px; flex-shrink: 0; }
|
|
583
|
+
.zm-wing-ink { fill: var(--wing-ink); transition: fill 0.2s ease; }
|
|
584
|
+
.zm-wing-iris { fill: var(--wing-iris); transition: fill 0.2s ease; }
|
|
585
|
+
.brand-word {
|
|
586
|
+
font-size: 17px;
|
|
587
|
+
font-weight: 700;
|
|
588
|
+
letter-spacing: -0.02em;
|
|
589
|
+
}
|
|
590
|
+
.brand-sep {
|
|
591
|
+
width: 1px;
|
|
592
|
+
height: 16px;
|
|
593
|
+
background: var(--line-strong);
|
|
594
|
+
margin: 0 2px;
|
|
595
|
+
}
|
|
596
|
+
.brand-sub {
|
|
597
|
+
font-size: 13px;
|
|
598
|
+
color: var(--ink-secondary);
|
|
599
|
+
font-weight: 500;
|
|
600
|
+
}
|
|
601
|
+
.top-actions {
|
|
602
|
+
display: flex;
|
|
603
|
+
align-items: center;
|
|
604
|
+
gap: 10px;
|
|
605
|
+
}
|
|
606
|
+
.theme-btn {
|
|
607
|
+
appearance: none;
|
|
608
|
+
border: 1px solid var(--line-strong);
|
|
609
|
+
background: var(--surface);
|
|
610
|
+
color: var(--ink);
|
|
611
|
+
font-size: 12.5px;
|
|
612
|
+
font-weight: 500;
|
|
613
|
+
padding: 6px 12px;
|
|
614
|
+
border-radius: 999px;
|
|
615
|
+
cursor: pointer;
|
|
616
|
+
display: inline-flex;
|
|
617
|
+
align-items: center;
|
|
618
|
+
gap: 6px;
|
|
619
|
+
}
|
|
620
|
+
.theme-btn:hover { border-color: var(--iris); color: var(--iris-text); }
|
|
621
|
+
|
|
622
|
+
.hero {
|
|
623
|
+
background: var(--surface);
|
|
624
|
+
border: 1px solid var(--line);
|
|
625
|
+
border-radius: 16px;
|
|
626
|
+
padding: 28px 30px;
|
|
627
|
+
box-shadow: var(--shadow-card);
|
|
628
|
+
margin-bottom: 28px;
|
|
629
|
+
}
|
|
630
|
+
.hero-badges {
|
|
631
|
+
display: flex;
|
|
632
|
+
flex-wrap: wrap;
|
|
633
|
+
align-items: center;
|
|
634
|
+
gap: 8px;
|
|
635
|
+
margin-bottom: 12px;
|
|
636
|
+
}
|
|
637
|
+
.badge {
|
|
638
|
+
display: inline-flex;
|
|
639
|
+
align-items: center;
|
|
640
|
+
padding: 4px 11px;
|
|
641
|
+
border-radius: 999px;
|
|
642
|
+
font-size: 12px;
|
|
643
|
+
font-weight: 600;
|
|
644
|
+
letter-spacing: 0.01em;
|
|
645
|
+
}
|
|
646
|
+
.badge-ok { background: var(--ok-bg); color: var(--ok-text); }
|
|
647
|
+
.badge-warn { background: var(--warn-bg); color: var(--warn-text); }
|
|
648
|
+
.badge-neutral { background: var(--surface-subtle); color: var(--ink-secondary); }
|
|
649
|
+
.hero h1 {
|
|
650
|
+
font-size: 24px;
|
|
651
|
+
font-weight: 700;
|
|
652
|
+
letter-spacing: -0.02em;
|
|
653
|
+
margin-bottom: 8px;
|
|
654
|
+
}
|
|
655
|
+
.hero-desc {
|
|
656
|
+
color: var(--ink-secondary);
|
|
657
|
+
font-size: 14.5px;
|
|
658
|
+
max-width: 960px;
|
|
659
|
+
margin-bottom: 22px;
|
|
660
|
+
}
|
|
661
|
+
.overview-ledger {
|
|
662
|
+
display: grid;
|
|
663
|
+
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
664
|
+
border-top: 1px solid var(--line);
|
|
665
|
+
padding-top: 18px;
|
|
666
|
+
gap: 16px;
|
|
667
|
+
}
|
|
668
|
+
.ledger-item {
|
|
669
|
+
border-right: 1px solid var(--line);
|
|
670
|
+
padding-right: 12px;
|
|
671
|
+
}
|
|
672
|
+
.ledger-item:last-child { border-right: none; padding-right: 0; }
|
|
673
|
+
.ledger-label {
|
|
674
|
+
font-size: 11.5px;
|
|
675
|
+
color: var(--ink-muted);
|
|
676
|
+
margin-bottom: 4px;
|
|
677
|
+
}
|
|
678
|
+
.ledger-val {
|
|
679
|
+
font-size: 15px;
|
|
680
|
+
font-weight: 650;
|
|
681
|
+
color: var(--ink);
|
|
682
|
+
font-variant-numeric: tabular-nums;
|
|
683
|
+
}
|
|
684
|
+
.ledger-sub {
|
|
685
|
+
font-size: 11.5px;
|
|
686
|
+
color: var(--ink-secondary);
|
|
687
|
+
margin-top: 2px;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.sec {
|
|
691
|
+
margin-top: 34px;
|
|
692
|
+
}
|
|
693
|
+
.sec-head {
|
|
694
|
+
display: flex;
|
|
695
|
+
align-items: flex-end;
|
|
696
|
+
justify-content: space-between;
|
|
697
|
+
flex-wrap: wrap;
|
|
698
|
+
gap: 12px;
|
|
699
|
+
margin-bottom: 16px;
|
|
700
|
+
padding-bottom: 10px;
|
|
701
|
+
border-bottom: 1px solid var(--line);
|
|
702
|
+
}
|
|
703
|
+
.sec-kicker {
|
|
704
|
+
display: block;
|
|
705
|
+
font-size: 11px;
|
|
706
|
+
font-weight: 700;
|
|
707
|
+
letter-spacing: 0.08em;
|
|
708
|
+
color: var(--iris-text);
|
|
709
|
+
margin-bottom: 2px;
|
|
710
|
+
}
|
|
711
|
+
.sec-head h2 {
|
|
712
|
+
font-size: 18px;
|
|
713
|
+
font-weight: 700;
|
|
714
|
+
letter-spacing: -0.01em;
|
|
715
|
+
}
|
|
716
|
+
.sec-note {
|
|
717
|
+
font-size: 12.5px;
|
|
718
|
+
color: var(--ink-muted);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.plan-grid {
|
|
722
|
+
display: grid;
|
|
723
|
+
grid-template-columns: 1.35fr 1fr;
|
|
724
|
+
gap: 16px;
|
|
725
|
+
margin-bottom: 16px;
|
|
726
|
+
}
|
|
727
|
+
.panel {
|
|
728
|
+
background: var(--surface);
|
|
729
|
+
border: 1px solid var(--line);
|
|
730
|
+
border-radius: 14px;
|
|
731
|
+
padding: 20px 22px;
|
|
732
|
+
box-shadow: var(--shadow-card);
|
|
733
|
+
}
|
|
734
|
+
.panel h3 {
|
|
735
|
+
font-size: 14.5px;
|
|
736
|
+
font-weight: 650;
|
|
737
|
+
margin-bottom: 12px;
|
|
738
|
+
}
|
|
739
|
+
.slots-grid {
|
|
740
|
+
display: grid;
|
|
741
|
+
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
|
742
|
+
gap: 10px;
|
|
743
|
+
}
|
|
744
|
+
.slot-card {
|
|
745
|
+
background: var(--bg);
|
|
746
|
+
border: 1px solid var(--line);
|
|
747
|
+
border-radius: 10px;
|
|
748
|
+
padding: 12px 14px;
|
|
749
|
+
}
|
|
750
|
+
.slot-head {
|
|
751
|
+
display: flex;
|
|
752
|
+
justify-content: space-between;
|
|
753
|
+
align-items: center;
|
|
754
|
+
gap: 6px;
|
|
755
|
+
margin-bottom: 6px;
|
|
756
|
+
}
|
|
757
|
+
.slot-pill {
|
|
758
|
+
font-size: 11.5px;
|
|
759
|
+
font-weight: 650;
|
|
760
|
+
color: var(--iris-text);
|
|
761
|
+
background: var(--iris-soft);
|
|
762
|
+
padding: 2px 8px;
|
|
763
|
+
border-radius: 999px;
|
|
764
|
+
}
|
|
765
|
+
.slot-meta {
|
|
766
|
+
font-size: 11.5px;
|
|
767
|
+
color: var(--ink-muted);
|
|
768
|
+
font-variant-numeric: tabular-nums;
|
|
769
|
+
}
|
|
770
|
+
.slot-desc {
|
|
771
|
+
font-size: 13px;
|
|
772
|
+
font-weight: 600;
|
|
773
|
+
margin-bottom: 8px;
|
|
774
|
+
}
|
|
775
|
+
.slot-bar {
|
|
776
|
+
height: 4px;
|
|
777
|
+
border-radius: 99px;
|
|
778
|
+
background: var(--line);
|
|
779
|
+
overflow: hidden;
|
|
780
|
+
margin-bottom: 6px;
|
|
781
|
+
}
|
|
782
|
+
.slot-bar span {
|
|
783
|
+
display: block;
|
|
784
|
+
height: 100%;
|
|
785
|
+
background: var(--iris);
|
|
786
|
+
border-radius: 99px;
|
|
787
|
+
}
|
|
788
|
+
.slot-shots {
|
|
789
|
+
font-size: 11.5px;
|
|
790
|
+
color: var(--ink-secondary);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.guide-list {
|
|
794
|
+
list-style: none;
|
|
795
|
+
display: flex;
|
|
796
|
+
flex-direction: column;
|
|
797
|
+
gap: 10px;
|
|
798
|
+
font-size: 13px;
|
|
799
|
+
color: var(--ink-secondary);
|
|
800
|
+
}
|
|
801
|
+
.guide-list li {
|
|
802
|
+
padding-left: 14px;
|
|
803
|
+
position: relative;
|
|
804
|
+
}
|
|
805
|
+
.guide-list li::before {
|
|
806
|
+
content: "";
|
|
807
|
+
width: 5px;
|
|
808
|
+
height: 5px;
|
|
809
|
+
border-radius: 50%;
|
|
810
|
+
background: var(--iris);
|
|
811
|
+
position: absolute;
|
|
812
|
+
left: 0;
|
|
813
|
+
top: 8px;
|
|
814
|
+
}
|
|
815
|
+
.guide-list strong { color: var(--ink); }
|
|
816
|
+
|
|
817
|
+
.notice-box {
|
|
818
|
+
border-radius: 12px;
|
|
819
|
+
padding: 15px 18px;
|
|
820
|
+
margin-top: 12px;
|
|
821
|
+
border: 1px solid var(--line);
|
|
822
|
+
}
|
|
823
|
+
.notice-iris {
|
|
824
|
+
background: var(--iris-soft);
|
|
825
|
+
border-color: color-mix(in srgb, var(--iris) 28%, transparent);
|
|
826
|
+
}
|
|
827
|
+
.notice-warn {
|
|
828
|
+
background: var(--warn-bg);
|
|
829
|
+
border-color: color-mix(in srgb, var(--warn-text) 28%, transparent);
|
|
830
|
+
}
|
|
831
|
+
.notice-title {
|
|
832
|
+
font-size: 13.5px;
|
|
833
|
+
font-weight: 700;
|
|
834
|
+
color: var(--ink);
|
|
835
|
+
margin-bottom: 4px;
|
|
836
|
+
}
|
|
837
|
+
.notice-sub {
|
|
838
|
+
font-size: 12.5px;
|
|
839
|
+
color: var(--ink-secondary);
|
|
840
|
+
margin-bottom: 8px;
|
|
841
|
+
}
|
|
842
|
+
.prop-list {
|
|
843
|
+
padding-left: 18px;
|
|
844
|
+
font-size: 12.5px;
|
|
845
|
+
color: var(--ink);
|
|
846
|
+
display: flex;
|
|
847
|
+
flex-direction: column;
|
|
848
|
+
gap: 4px;
|
|
849
|
+
}
|
|
850
|
+
.prop-tag {
|
|
851
|
+
display: inline-block;
|
|
852
|
+
margin-left: 6px;
|
|
853
|
+
padding: 1px 7px;
|
|
854
|
+
border-radius: 6px;
|
|
855
|
+
background: var(--surface);
|
|
856
|
+
color: var(--iris-text);
|
|
857
|
+
font-size: 11.5px;
|
|
858
|
+
font-weight: 600;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
.shots-grid {
|
|
862
|
+
display: grid;
|
|
863
|
+
grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
|
|
864
|
+
gap: 14px;
|
|
865
|
+
}
|
|
866
|
+
.shot-card {
|
|
867
|
+
background: var(--surface);
|
|
868
|
+
border: 1px solid var(--line);
|
|
869
|
+
border-radius: 14px;
|
|
870
|
+
overflow: hidden;
|
|
871
|
+
box-shadow: var(--shadow-card);
|
|
872
|
+
display: flex;
|
|
873
|
+
flex-direction: column;
|
|
874
|
+
}
|
|
875
|
+
.shot-media {
|
|
876
|
+
position: relative;
|
|
877
|
+
background: #0E0D14;
|
|
878
|
+
aspect-ratio: ${m.width > m.height ? '16 / 9' : '9 / 16'};
|
|
879
|
+
max-height: 320px;
|
|
880
|
+
overflow: hidden;
|
|
881
|
+
}
|
|
882
|
+
.shot-media img {
|
|
883
|
+
width: 100%;
|
|
884
|
+
height: 100%;
|
|
885
|
+
object-fit: cover;
|
|
886
|
+
display: block;
|
|
887
|
+
}
|
|
888
|
+
.shot-placeholder {
|
|
889
|
+
width: 100%;
|
|
890
|
+
height: 100%;
|
|
891
|
+
display: flex;
|
|
892
|
+
align-items: center;
|
|
893
|
+
justify-content: center;
|
|
894
|
+
color: #8E8A9E;
|
|
895
|
+
font-size: 12px;
|
|
896
|
+
}
|
|
897
|
+
.shot-num {
|
|
898
|
+
position: absolute;
|
|
899
|
+
left: 8px;
|
|
900
|
+
top: 8px;
|
|
901
|
+
background: rgba(19, 18, 27, 0.78);
|
|
902
|
+
color: #FFFFFF;
|
|
903
|
+
font-size: 11px;
|
|
904
|
+
font-weight: 650;
|
|
905
|
+
padding: 3px 8px;
|
|
906
|
+
border-radius: 6px;
|
|
907
|
+
font-variant-numeric: tabular-nums;
|
|
908
|
+
backdrop-filter: blur(4px);
|
|
909
|
+
}
|
|
910
|
+
.shot-slot {
|
|
911
|
+
position: absolute;
|
|
912
|
+
right: 8px;
|
|
913
|
+
top: 8px;
|
|
914
|
+
background: rgba(91, 67, 230, 0.90);
|
|
915
|
+
color: #FFFFFF;
|
|
916
|
+
font-size: 11px;
|
|
917
|
+
font-weight: 650;
|
|
918
|
+
padding: 3px 8px;
|
|
919
|
+
border-radius: 6px;
|
|
920
|
+
}
|
|
921
|
+
.shot-body {
|
|
922
|
+
padding: 12px 14px 14px;
|
|
923
|
+
display: flex;
|
|
924
|
+
flex-direction: column;
|
|
925
|
+
gap: 8px;
|
|
926
|
+
flex: 1;
|
|
927
|
+
}
|
|
928
|
+
.shot-scale-row {
|
|
929
|
+
display: flex;
|
|
930
|
+
align-items: center;
|
|
931
|
+
justify-content: space-between;
|
|
932
|
+
gap: 6px;
|
|
933
|
+
}
|
|
934
|
+
.scale-tag {
|
|
935
|
+
font-size: 12px;
|
|
936
|
+
font-weight: 650;
|
|
937
|
+
color: var(--ink);
|
|
938
|
+
background: var(--surface-subtle);
|
|
939
|
+
padding: 2px 8px;
|
|
940
|
+
border-radius: 6px;
|
|
941
|
+
}
|
|
942
|
+
.frame-range {
|
|
943
|
+
font-size: 11px;
|
|
944
|
+
color: var(--ink-muted);
|
|
945
|
+
font-variant-numeric: tabular-nums;
|
|
946
|
+
}
|
|
947
|
+
.shot-kv span {
|
|
948
|
+
display: block;
|
|
949
|
+
font-size: 10.5px;
|
|
950
|
+
font-weight: 600;
|
|
951
|
+
color: var(--ink-muted);
|
|
952
|
+
text-transform: uppercase;
|
|
953
|
+
letter-spacing: 0.03em;
|
|
954
|
+
}
|
|
955
|
+
.shot-kv p {
|
|
956
|
+
font-size: 12.5px;
|
|
957
|
+
color: var(--ink-secondary);
|
|
958
|
+
line-height: 1.45;
|
|
959
|
+
}
|
|
960
|
+
.shot-caption-box {
|
|
961
|
+
margin-top: auto;
|
|
962
|
+
padding-top: 8px;
|
|
963
|
+
border-top: 1px dashed var(--line);
|
|
964
|
+
font-size: 12px;
|
|
965
|
+
display: flex;
|
|
966
|
+
flex-direction: column;
|
|
967
|
+
gap: 3px;
|
|
968
|
+
}
|
|
969
|
+
.sc-line em {
|
|
970
|
+
font-style: normal;
|
|
971
|
+
font-size: 10.5px;
|
|
972
|
+
font-weight: 650;
|
|
973
|
+
color: var(--iris-text);
|
|
974
|
+
margin-right: 4px;
|
|
975
|
+
}
|
|
976
|
+
.sc-line .hf-hl {
|
|
977
|
+
background: var(--hl-bg);
|
|
978
|
+
color: var(--hl-ink);
|
|
979
|
+
padding: 1px 5px;
|
|
980
|
+
border-radius: 4px;
|
|
981
|
+
margin-left: 1px;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
.rhythm-banner {
|
|
985
|
+
background: var(--surface);
|
|
986
|
+
border: 1px solid var(--line);
|
|
987
|
+
border-radius: 10px;
|
|
988
|
+
padding: 11px 15px;
|
|
989
|
+
font-size: 13px;
|
|
990
|
+
color: var(--ink-secondary);
|
|
991
|
+
margin-bottom: 12px;
|
|
992
|
+
}
|
|
993
|
+
.rhythm-banner strong { color: var(--ink); }
|
|
994
|
+
.table-wrap {
|
|
995
|
+
background: var(--surface);
|
|
996
|
+
border: 1px solid var(--line);
|
|
997
|
+
border-radius: 14px;
|
|
998
|
+
overflow-x: auto;
|
|
999
|
+
box-shadow: var(--shadow-card);
|
|
1000
|
+
}
|
|
1001
|
+
.zen-table {
|
|
1002
|
+
width: 100%;
|
|
1003
|
+
border-collapse: collapse;
|
|
1004
|
+
font-size: 13px;
|
|
1005
|
+
}
|
|
1006
|
+
.zen-table th {
|
|
1007
|
+
text-align: left;
|
|
1008
|
+
font-size: 11.5px;
|
|
1009
|
+
font-weight: 650;
|
|
1010
|
+
color: var(--ink-muted);
|
|
1011
|
+
padding: 12px 16px;
|
|
1012
|
+
border-bottom: 1px solid var(--line);
|
|
1013
|
+
background: var(--surface-subtle);
|
|
1014
|
+
}
|
|
1015
|
+
.zen-table td {
|
|
1016
|
+
padding: 11px 16px;
|
|
1017
|
+
border-bottom: 1px solid var(--line);
|
|
1018
|
+
color: var(--ink);
|
|
1019
|
+
}
|
|
1020
|
+
.zen-table tr:last-child td { border-bottom: none; }
|
|
1021
|
+
.mono { font-variant-numeric: tabular-nums; color: var(--ink-secondary); font-size: 12px; }
|
|
1022
|
+
.hf-preview {
|
|
1023
|
+
display: inline-block;
|
|
1024
|
+
background: var(--hl-bg);
|
|
1025
|
+
color: #FFFFFF;
|
|
1026
|
+
padding: 3px 10px;
|
|
1027
|
+
border-radius: 6px;
|
|
1028
|
+
font-weight: 650;
|
|
1029
|
+
font-size: 12.5px;
|
|
1030
|
+
}
|
|
1031
|
+
.hf-hl {
|
|
1032
|
+
background: transparent;
|
|
1033
|
+
color: var(--hl-ink);
|
|
1034
|
+
font-weight: 700;
|
|
1035
|
+
}
|
|
1036
|
+
.preset-chip {
|
|
1037
|
+
font-size: 11.5px;
|
|
1038
|
+
color: var(--iris-text);
|
|
1039
|
+
background: var(--iris-soft);
|
|
1040
|
+
padding: 3px 9px;
|
|
1041
|
+
border-radius: 999px;
|
|
1042
|
+
font-weight: 500;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.footer {
|
|
1046
|
+
margin-top: 48px;
|
|
1047
|
+
padding-top: 20px;
|
|
1048
|
+
border-top: 1px solid var(--line);
|
|
1049
|
+
display: flex;
|
|
1050
|
+
align-items: center;
|
|
1051
|
+
justify-content: space-between;
|
|
1052
|
+
flex-wrap: wrap;
|
|
1053
|
+
gap: 12px;
|
|
1054
|
+
font-size: 12px;
|
|
1055
|
+
color: var(--ink-muted);
|
|
1056
|
+
}
|
|
1057
|
+
.footer-brand {
|
|
1058
|
+
display: inline-flex;
|
|
1059
|
+
align-items: center;
|
|
1060
|
+
gap: 8px;
|
|
1061
|
+
font-weight: 600;
|
|
1062
|
+
color: var(--ink-secondary);
|
|
1063
|
+
}
|
|
1064
|
+
@media (max-width: 920px) {
|
|
1065
|
+
.overview-ledger { grid-template-columns: repeat(2, 1fr); }
|
|
1066
|
+
.ledger-item { border-right: none; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
|
|
1067
|
+
.plan-grid { grid-template-columns: 1fr; }
|
|
1068
|
+
}
|
|
1069
|
+
</style>
|
|
1070
|
+
</head>
|
|
1071
|
+
<body>
|
|
1072
|
+
<header class="topbar">
|
|
1073
|
+
<div class="topbar-in">
|
|
1074
|
+
<div class="brand">
|
|
1075
|
+
<svg class="zm-logo" viewBox="0 0 28 28" aria-hidden="true">
|
|
1076
|
+
<path class="zm-wing-ink" d="M5 7.5A2.5 2.5 0 0 1 7.5 5H20.4L16.6 8.8H8.8V16.6L5 20.4Z"></path>
|
|
1077
|
+
<path class="zm-wing-iris" d="M23 20.5A2.5 2.5 0 0 1 20.5 23H7.6L11.4 19.2H19.2V11.4L23 7.6Z"></path>
|
|
1078
|
+
</svg>
|
|
1079
|
+
<span class="brand-word">ZenAIGC</span>
|
|
1080
|
+
<span class="brand-sep"></span>
|
|
1081
|
+
<span class="brand-sub">视频结构拆解与二创方案报告</span>
|
|
1082
|
+
</div>
|
|
1083
|
+
<div class="top-actions">
|
|
1084
|
+
<button class="theme-btn" id="theme-toggle" type="button">切换深色舞台</button>
|
|
1085
|
+
</div>
|
|
1086
|
+
</div>
|
|
1087
|
+
</header>
|
|
1088
|
+
|
|
1089
|
+
<main class="wrap">
|
|
1090
|
+
<section class="hero">
|
|
1091
|
+
<div class="hero-badges">
|
|
1092
|
+
<span class="badge ${badgeClass}">${esc(badgeText)}</span>
|
|
1093
|
+
<span class="badge badge-neutral">本地确定性拆解 · 0 积分消耗</span>
|
|
1094
|
+
</div>
|
|
1095
|
+
<h1>${esc(m.title)}</h1>
|
|
1096
|
+
<p class="hero-desc">${esc(m.summaryDesc)}</p>
|
|
1097
|
+
|
|
1098
|
+
<div class="overview-ledger">
|
|
1099
|
+
<div class="ledger-item">
|
|
1100
|
+
<div class="ledger-label">净片时长</div>
|
|
1101
|
+
<div class="ledger-val">${formatSec(m.durationSec)}</div>
|
|
1102
|
+
<div class="ledger-sub">共 ${m.totalFrames} 帧 @ ${m.fps}fps</div>
|
|
1103
|
+
</div>
|
|
1104
|
+
<div class="ledger-item">
|
|
1105
|
+
<div class="ledger-label">画幅与分辨率</div>
|
|
1106
|
+
<div class="ledger-val">${esc(m.ratio)}</div>
|
|
1107
|
+
<div class="ledger-sub">${m.width} × ${m.height}</div>
|
|
1108
|
+
</div>
|
|
1109
|
+
<div class="ledger-item">
|
|
1110
|
+
<div class="ledger-label">切点镜头数</div>
|
|
1111
|
+
<div class="ledger-val">${m.shots.length} 镜</div>
|
|
1112
|
+
<div class="ledger-sub">均镜 ${formatSec(m.shots.length ? m.durationSec / m.shots.length : 0)}</div>
|
|
1113
|
+
</div>
|
|
1114
|
+
<div class="ledger-item">
|
|
1115
|
+
<div class="ledger-label">服装/商品槽位</div>
|
|
1116
|
+
<div class="ledger-val">${m.outfitCount} 套</div>
|
|
1117
|
+
<div class="ledger-sub">按槽位一一绑定定妆图</div>
|
|
1118
|
+
</div>
|
|
1119
|
+
<div class="ledger-item">
|
|
1120
|
+
<div class="ledger-label">音频与口播形态</div>
|
|
1121
|
+
<div class="ledger-val">${esc(m.speechShort)}</div>
|
|
1122
|
+
<div class="ledger-sub">${esc(m.speechMode)}</div>
|
|
1123
|
+
</div>
|
|
1124
|
+
<div class="ledger-item">
|
|
1125
|
+
<div class="ledger-label">首尾闪帧与场景</div>
|
|
1126
|
+
<div class="ledger-val">${m.flashSummary.includes('无异常') ? '干净可用' : '已标记边界'}</div>
|
|
1127
|
+
<div class="ledger-sub">${esc(m.flashSummary)}</div>
|
|
1128
|
+
</div>
|
|
1129
|
+
</div>
|
|
1130
|
+
</section>
|
|
1131
|
+
|
|
1132
|
+
<section class="sec">
|
|
1133
|
+
<div class="sec-head">
|
|
1134
|
+
<div>
|
|
1135
|
+
<span class="sec-kicker">01 · PRODUCTION SLOTS & EXECUTION PLAN</span>
|
|
1136
|
+
<h2>服装槽位清单与二创执行指引</h2>
|
|
1137
|
+
</div>
|
|
1138
|
+
<span class="sec-note">场景机位:${esc(m.sceneSetup)}</span>
|
|
1139
|
+
</div>
|
|
1140
|
+
|
|
1141
|
+
<div class="plan-grid">
|
|
1142
|
+
<div class="panel">
|
|
1143
|
+
<h3>需准备的 ${m.outfitCount} 套服装槽位分配</h3>
|
|
1144
|
+
<div class="slots-grid">
|
|
1145
|
+
${slotCardsHtml}
|
|
1146
|
+
</div>
|
|
1147
|
+
</div>
|
|
1148
|
+
<div class="panel">
|
|
1149
|
+
<h3>ZenMCP 二创闭环执行要点</h3>
|
|
1150
|
+
<ul class="guide-list">
|
|
1151
|
+
<li><strong>人物模卡复用:</strong>支持直接点名本机持久模卡库(<code>2+3</code> 五图角色资产包,0 积分调取),或上传单张新模特照仅本次使用。</li>
|
|
1152
|
+
<li><strong>定妆防切脸与面料质检:</strong>锚定全片最远全身帧一步自适应换装,生成后自动输出双绿线身高标尺(偏差 < 1.5%)与 1:1 面料领口放大对比。</li>
|
|
1153
|
+
<li><strong>时长与生成路线:</strong>${esc(m.durationAdvice)}</li>
|
|
1154
|
+
${m.proposedEdit ? `<li><strong>选段建议:</strong>${esc(m.proposedEdit)}</li>` : ''}
|
|
1155
|
+
<li><strong>成片三档无损修改:</strong>花字文案/颜色/字号与混音音量支持本地 HyperFrames <strong>0 积分秒改</strong>;仅换配音词几积分重混音,无需重跑视频。</li>
|
|
1156
|
+
</ul>
|
|
1157
|
+
</div>
|
|
1158
|
+
</div>
|
|
1159
|
+
|
|
1160
|
+
${riskAlertHtml}
|
|
1161
|
+
${propAlertHtml}
|
|
1162
|
+
</section>
|
|
1163
|
+
|
|
1164
|
+
<section class="sec">
|
|
1165
|
+
<div class="sec-head">
|
|
1166
|
+
<div>
|
|
1167
|
+
<span class="sec-kicker">02 · SHOT-BY-SHOT STORYBOARD & FRAMING</span>
|
|
1168
|
+
<h2>逐镜视觉故事板与上下沿构图标尺(共 ${m.shots.length} 镜)</h2>
|
|
1169
|
+
</div>
|
|
1170
|
+
<span class="sec-note">每镜明确标注头顶留白与下沿裁切位置,防止近景切脸或全身切鞋</span>
|
|
1171
|
+
</div>
|
|
1172
|
+
<div class="shots-grid">
|
|
1173
|
+
${shotCardsHtml}
|
|
1174
|
+
</div>
|
|
1175
|
+
</section>
|
|
1176
|
+
|
|
1177
|
+
${effectsSectionHtml}
|
|
1178
|
+
|
|
1179
|
+
<footer class="footer">
|
|
1180
|
+
<div class="footer-brand">
|
|
1181
|
+
<svg width="18" height="18" viewBox="0 0 28 28" aria-hidden="true">
|
|
1182
|
+
<path class="zm-wing-ink" d="M5 7.5A2.5 2.5 0 0 1 7.5 5H20.4L16.6 8.8H8.8V16.6L5 20.4Z"></path>
|
|
1183
|
+
<path class="zm-wing-iris" d="M23 20.5A2.5 2.5 0 0 1 20.5 23H7.6L11.4 19.2H19.2V11.4L23 7.6Z"></path>
|
|
1184
|
+
</svg>
|
|
1185
|
+
<span>ZenAIGC · 人人都能用的 AI 短视频创作智能体</span>
|
|
1186
|
+
</div>
|
|
1187
|
+
<div>生成时间:${esc(generatedAt)} · 本地离线分析报告(零外链请求)</div>
|
|
1188
|
+
</footer>
|
|
1189
|
+
</main>
|
|
1190
|
+
|
|
1191
|
+
<script>
|
|
1192
|
+
(function () {
|
|
1193
|
+
var root = document.documentElement;
|
|
1194
|
+
var btn = document.getElementById('theme-toggle');
|
|
1195
|
+
var params = new URLSearchParams(window.location.search);
|
|
1196
|
+
if (params.get('theme') === 'dark') root.setAttribute('data-theme', 'dark');
|
|
1197
|
+
function syncLabel() {
|
|
1198
|
+
var isDark = root.getAttribute('data-theme') === 'dark';
|
|
1199
|
+
if (btn) btn.textContent = isDark ? '切换浅纸画廊' : '切换深色舞台';
|
|
1200
|
+
}
|
|
1201
|
+
syncLabel();
|
|
1202
|
+
if (btn) {
|
|
1203
|
+
btn.addEventListener('click', function () {
|
|
1204
|
+
var next = root.getAttribute('data-theme') === 'dark' ? 'light' : 'dark';
|
|
1205
|
+
if (next === 'dark') root.setAttribute('data-theme', 'dark');
|
|
1206
|
+
else root.removeAttribute('data-theme');
|
|
1207
|
+
syncLabel();
|
|
1208
|
+
});
|
|
1209
|
+
}
|
|
1210
|
+
})();
|
|
1211
|
+
</script>
|
|
1212
|
+
</body>
|
|
1213
|
+
</html>
|
|
1214
|
+
`;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
const resolved = await resolveInputs();
|
|
1218
|
+
const probed = await probeVideoFallback(resolved.videoPath);
|
|
1219
|
+
const model = normalizeModel(resolved.analysis, resolved.project, probed, resolved.videoPath);
|
|
1220
|
+
|
|
1221
|
+
const tmpDir = await mkdtemp(join(tmpdir(), 'zenmcp-dissect-report-'));
|
|
1222
|
+
try {
|
|
1223
|
+
await Promise.all(
|
|
1224
|
+
model.shots.map(async (s) => {
|
|
1225
|
+
s.thumb = await extractShotThumbDataUri(resolved.videoPath, s.midSec, tmpDir, s.index, thumbWidth);
|
|
1226
|
+
}),
|
|
1227
|
+
);
|
|
1228
|
+
await mkdir(dirname(resolved.outPath), { recursive: true });
|
|
1229
|
+
await writeFile(resolved.outPath, renderHtml(model), 'utf8');
|
|
1230
|
+
console.log(resolved.outPath);
|
|
1231
|
+
} finally {
|
|
1232
|
+
await rm(tmpDir, { recursive: true, force: true });
|
|
1233
|
+
}
|