@pixerate/editor 0.269.2 → 0.271.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/README.md +5 -2
- package/dist/agent/index.cjs +30 -30
- package/dist/agent/index.js +3 -3
- package/dist/animation-editor/index.cjs +62 -62
- package/dist/animation-editor/index.js +4 -4
- package/dist/canvas/editorDocument.d.cts +3 -1
- package/dist/canvas/editorDocument.d.ts +3 -1
- package/dist/canvas/index.cjs +53 -27
- package/dist/canvas/index.js +34 -8
- package/dist/chart/index.cjs +21 -21
- package/dist/chart/index.js +2 -2
- package/dist/{chunk-GBEF2D4P.js → chunk-23YL2EAB.js} +1 -1
- package/dist/{chunk-QGVTOCNB.js → chunk-6ZSFRRJI.js} +1 -1
- package/dist/{chunk-4YSPQGZW.js → chunk-B5W677L7.js} +1 -1
- package/dist/{chunk-4NMPUJUK.cjs → chunk-DDL3ZBHK.cjs} +86 -86
- package/dist/{chunk-T4JPGBW3.cjs → chunk-DGITFN73.cjs} +8 -8
- package/dist/{chunk-PY4GWSE2.cjs → chunk-EBFPMSJO.cjs} +27 -5
- package/dist/{chunk-NS62CQ2B.js → chunk-GAZPHCTV.js} +23 -2
- package/dist/{chunk-YYBW6DF2.cjs → chunk-GSLOH2IN.cjs} +2 -2
- package/dist/{chunk-56RHCIJV.cjs → chunk-JJ2H25JG.cjs} +237 -170
- package/dist/{chunk-CBVNCWJM.cjs → chunk-LBDC5434.cjs} +2 -2
- package/dist/{chunk-BENSE3VX.cjs → chunk-M2ZVPU7L.cjs} +23 -23
- package/dist/{chunk-MQ6MGIQM.js → chunk-NMZQMPFZ.js} +1 -1
- package/dist/{chunk-AI4F33IV.cjs → chunk-NQUKTRKN.cjs} +45 -45
- package/dist/{chunk-4CPOKP27.js → chunk-QYXUE37Q.js} +1 -1
- package/dist/{chunk-MWUZCEFT.js → chunk-S2XPXA47.js} +1 -1
- package/dist/{chunk-EHLOCVWB.js → chunk-T2URHAJX.js} +27 -5
- package/dist/{chunk-FUDP5QBB.js → chunk-TNHDCP4R.js} +70 -3
- package/dist/{chunk-VBRHE4AM.cjs → chunk-U2ASNGO6.cjs} +35 -35
- package/dist/{chunk-WKPXOGZZ.cjs → chunk-WPLGZBNE.cjs} +23 -2
- package/dist/{chunk-N3UMQVKX.js → chunk-X4FTNFIA.js} +1 -1
- package/dist/{chunk-2OQGPEHH.cjs → chunk-XUDMRMXQ.cjs} +2 -2
- package/dist/{chunk-THBJHPUL.js → chunk-YNFSH72F.js} +1 -1
- package/dist/diagram/index.cjs +2 -2
- package/dist/diagram/index.js +1 -1
- package/dist/effects/index.cjs +8 -5
- package/dist/effects/index.js +6 -3
- package/dist/effects/pool.d.cts +9 -0
- package/dist/effects/pool.d.ts +9 -0
- package/dist/effects/types.d.cts +2 -0
- package/dist/effects/types.d.ts +2 -0
- package/dist/extensions/index.cjs +5 -5
- package/dist/extensions/index.js +4 -4
- package/dist/gradient/index.cjs +2 -2
- package/dist/gradient/index.js +1 -1
- package/dist/history/HistoryManager.d.cts +9 -0
- package/dist/history/HistoryManager.d.ts +9 -0
- package/dist/history/index.cjs +2 -2
- package/dist/history/index.js +1 -1
- package/dist/history/types.d.cts +5 -2
- package/dist/history/types.d.ts +5 -2
- package/dist/image-editor/index.cjs +784 -784
- package/dist/image-editor/index.js +4 -4
- package/dist/index.cjs +10 -10
- package/dist/index.js +4 -4
- package/dist/paint-editor/controller.d.cts +75 -4
- package/dist/paint-editor/controller.d.ts +75 -4
- package/dist/paint-editor/effect-paint.d.cts +33 -8
- package/dist/paint-editor/effect-paint.d.ts +33 -8
- package/dist/paint-editor/effects.d.cts +4 -0
- package/dist/paint-editor/effects.d.ts +4 -0
- package/dist/paint-editor/index.cjs +692 -398
- package/dist/paint-editor/index.js +362 -68
- package/dist/paint-editor/stroke.d.cts +13 -5
- package/dist/paint-editor/stroke.d.ts +13 -5
- package/dist/parameters/index.cjs +2 -2
- package/dist/parameters/index.js +1 -1
- package/dist/vector/index.cjs +998 -998
- package/dist/vector/index.js +4 -4
- package/dist/video-editor/index.cjs +321 -321
- package/dist/video-editor/index.js +4 -4
- package/package.json +1 -1
- package/skills/pixerate-paint-editor/SKILL.md +2 -2
- package/skills/pixerate-paint-editor/references/effect-paint.md +28 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkXUDMRMXQcjs = require('../chunk-XUDMRMXQ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -149,7 +149,7 @@ var _chunk2OQGPEHHcjs = require('../chunk-2OQGPEHH.cjs');
|
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
var
|
|
152
|
+
var _chunkLBDC5434cjs = require('../chunk-LBDC5434.cjs');
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
var _chunkDGWOGQJ5cjs = require('../chunk-DGWOGQJ5.cjs');
|
|
@@ -160,7 +160,7 @@ var _chunkDGWOGQJ5cjs = require('../chunk-DGWOGQJ5.cjs');
|
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
var _chunk557BDWKOcjs = require('../chunk-557BDWKO.cjs');
|
|
163
|
-
require('../chunk-
|
|
163
|
+
require('../chunk-EBFPMSJO.cjs');
|
|
164
164
|
|
|
165
165
|
|
|
166
166
|
|
|
@@ -179,7 +179,7 @@ var _chunkSJ2CPTQCcjs = require('../chunk-SJ2CPTQC.cjs');
|
|
|
179
179
|
require('../chunk-2BSBFBOA.cjs');
|
|
180
180
|
|
|
181
181
|
|
|
182
|
-
var
|
|
182
|
+
var _chunkWPLGZBNEcjs = require('../chunk-WPLGZBNE.cjs');
|
|
183
183
|
|
|
184
184
|
|
|
185
185
|
var _chunkM5GLQQWGcjs = require('../chunk-M5GLQQWG.cjs');
|
|
@@ -232,7 +232,7 @@ function parseVideoEase(v, path) {
|
|
|
232
232
|
if (v[0] < 0 || v[0] > 1 || v[2] < 0 || v[2] > 1) fail(path, "must have x1 and x2 between 0 and 1");
|
|
233
233
|
return [v[0], v[1], v[2], v[3]];
|
|
234
234
|
}
|
|
235
|
-
return oneOf(v,
|
|
235
|
+
return oneOf(v, _chunkLBDC5434cjs.VIDEO_EASE_NAMES, path);
|
|
236
236
|
}
|
|
237
237
|
function parseVideoKeyframes(v, path, { min, max } = {}) {
|
|
238
238
|
if (!isObject(v)) return fail(path, "must be a number or keyframes { keys: [{ t, v, ease }] }");
|
|
@@ -274,7 +274,7 @@ function parseVideoTimeRemap(v, speed, path) {
|
|
|
274
274
|
if (speed !== void 0 && speed !== 1) fail(path, 'cannot be used with a speed; a ramp sets the speed itself (remove "speed")');
|
|
275
275
|
for (let i = 1; i < remap.keys.length; i++) if (remap.keys[i].t === remap.keys[i - 1].t) fail(`${path}.keys[${i}].t`, `must be later than the key before (${remap.keys[i - 1].t} ms); a speed ramp has one key per time`);
|
|
276
276
|
try {
|
|
277
|
-
|
|
277
|
+
_chunkLBDC5434cjs.checkVideoTimeRemap.call(void 0, remap, path);
|
|
278
278
|
} catch (e) {
|
|
279
279
|
throw new Error(e.message.replace(/\.?$/, "."));
|
|
280
280
|
}
|
|
@@ -284,17 +284,17 @@ function parseVideoClipAnimation(v, path) {
|
|
|
284
284
|
if (v === void 0) return void 0;
|
|
285
285
|
if (!isObject(v)) return fail(path, "must be an object { effect, duration }");
|
|
286
286
|
return compact({
|
|
287
|
-
effect: oneOf(v.effect,
|
|
287
|
+
effect: oneOf(v.effect, _chunkLBDC5434cjs.VIDEO_CLIP_ANIMATION_EFFECTS, `${path}.effect`, false),
|
|
288
288
|
duration: num(v.duration, `${path}.duration`, { optional: true, positive: true })
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
291
|
function parseVideoGrade(v, path) {
|
|
292
292
|
if (v === void 0) return void 0;
|
|
293
293
|
if (!isObject(v)) return fail(path, "must be an object such as { exposure, contrast, saturation }");
|
|
294
|
-
const known = /* @__PURE__ */ new Set([...
|
|
294
|
+
const known = /* @__PURE__ */ new Set([..._chunkLBDC5434cjs.VIDEO_GRADE_CONTROLS.map((c) => c.key), "lut"]);
|
|
295
295
|
const unknown = Object.keys(v).find((k) => !known.has(k));
|
|
296
296
|
if (unknown) fail(`${path}.${unknown}`, `is not a grade setting; use ${[...known].join(", ")}`);
|
|
297
|
-
return compact({ ...Object.fromEntries(
|
|
297
|
+
return compact({ ...Object.fromEntries(_chunkLBDC5434cjs.VIDEO_GRADE_CONTROLS.map((c) => [c.key, num(v[c.key], `${path}.${c.key}`, { optional: true, min: c.min, max: c.max })])), lut: parseVideoGradeLut(v.lut, `${path}.lut`) });
|
|
298
298
|
}
|
|
299
299
|
function parseVideoGradeLut(v, path) {
|
|
300
300
|
if (v === void 0) return void 0;
|
|
@@ -309,7 +309,7 @@ function parseVideoClipMask(v, path) {
|
|
|
309
309
|
if (!isObject(v)) return fail(path, 'must be an object such as { shape: "ellipse", x: 0.5, y: 0.5, width: 0.4, height: 0.6, feather: 20 }');
|
|
310
310
|
const unknown = Object.keys(v).find((k) => !MASK_KEYS.includes(k));
|
|
311
311
|
if (unknown) fail(`${path}.${unknown}`, `is not a mask setting; use ${MASK_KEYS.join(", ")}`);
|
|
312
|
-
const shape = oneOf(v.shape,
|
|
312
|
+
const shape = oneOf(v.shape, _chunkLBDC5434cjs.VIDEO_MASK_SHAPES, `${path}.shape`, false);
|
|
313
313
|
let points;
|
|
314
314
|
if (v.points !== void 0) {
|
|
315
315
|
if (shape !== "polygon") fail(`${path}.points`, "is only for polygon masks");
|
|
@@ -335,15 +335,15 @@ function parseVideoClipMask(v, path) {
|
|
|
335
335
|
function parseVideoTransition(v, path) {
|
|
336
336
|
if (v === void 0) return void 0;
|
|
337
337
|
if (!isObject(v)) return fail(path, "must be an object { type, duration }");
|
|
338
|
-
const type = oneOf(v.type,
|
|
338
|
+
const type = oneOf(v.type, _chunkLBDC5434cjs.VIDEO_TRANSITION_TYPES, `${path}.type`, false);
|
|
339
339
|
if (type === "effect" && v.effect === void 0) fail(`${path}.effect`, 'is required for an effect transition: { effect: "<effect id>", values }');
|
|
340
340
|
if (type !== "effect" && v.effect !== void 0) fail(`${path}.effect`, 'is only for transitions of type "effect"');
|
|
341
341
|
return compact({
|
|
342
342
|
type,
|
|
343
343
|
duration: num(v.duration, `${path}.duration`, { positive: true }),
|
|
344
344
|
color: str(v.color, `${path}.color`, true),
|
|
345
|
-
direction: oneOf(v.direction,
|
|
346
|
-
audioCurve: oneOf(v.audioCurve,
|
|
345
|
+
direction: oneOf(v.direction, _chunkLBDC5434cjs.VIDEO_WIPE_DIRECTIONS, `${path}.direction`),
|
|
346
|
+
audioCurve: oneOf(v.audioCurve, _chunkLBDC5434cjs.VIDEO_FADE_CURVES, `${path}.audioCurve`),
|
|
347
347
|
effect: v.effect === void 0 ? void 0 : parseVideoEffectRef(v.effect, `${path}.effect`, false)
|
|
348
348
|
});
|
|
349
349
|
}
|
|
@@ -472,7 +472,7 @@ function parseVideoClipCamera(v, path) {
|
|
|
472
472
|
}
|
|
473
473
|
function parseVideoClip(v, path = "clip") {
|
|
474
474
|
if (!isObject(v)) return fail(path, "must be an object");
|
|
475
|
-
const type = oneOf(_nullishCoalesce(v.type, () => ( "media")),
|
|
475
|
+
const type = oneOf(_nullishCoalesce(v.type, () => ( "media")), _chunkLBDC5434cjs.VIDEO_CLIP_TYPES, `${path}.type`, false);
|
|
476
476
|
const base = {
|
|
477
477
|
id: str(v.id, `${path}.id`),
|
|
478
478
|
name: str(v.name, `${path}.name`, true),
|
|
@@ -480,8 +480,8 @@ function parseVideoClip(v, path = "clip") {
|
|
|
480
480
|
duration: num(v.duration, `${path}.duration`, { positive: true }),
|
|
481
481
|
opacity: parseVideoAnimatable(v.opacity, `${path}.opacity`, { optional: true, min: 0, max: 1 }),
|
|
482
482
|
transform: parseVideoTransform(v.transform, `${path}.transform`),
|
|
483
|
-
fit: oneOf(v.fit,
|
|
484
|
-
blend: oneOf(v.blend,
|
|
483
|
+
fit: oneOf(v.fit, _chunkLBDC5434cjs.VIDEO_FITS, `${path}.fit`),
|
|
484
|
+
blend: oneOf(v.blend, _chunkLBDC5434cjs.VIDEO_BLEND_MODES, `${path}.blend`),
|
|
485
485
|
grade: parseVideoGrade(v.grade, `${path}.grade`),
|
|
486
486
|
animateIn: parseVideoClipAnimation(v.animateIn, `${path}.animateIn`),
|
|
487
487
|
animateOut: parseVideoClipAnimation(v.animateOut, `${path}.animateOut`),
|
|
@@ -502,8 +502,8 @@ function parseVideoClip(v, path = "clip") {
|
|
|
502
502
|
volume: parseVideoAnimatable(v.volume, `${path}.volume`, { optional: true, min: 0, max: 4 }),
|
|
503
503
|
muted: bool(v.muted, `${path}.muted`),
|
|
504
504
|
timeRemap: parseVideoTimeRemap(v.timeRemap, v.speed, `${path}.timeRemap`),
|
|
505
|
-
fadeInCurve: oneOf(v.fadeInCurve,
|
|
506
|
-
fadeOutCurve: oneOf(v.fadeOutCurve,
|
|
505
|
+
fadeInCurve: oneOf(v.fadeInCurve, _chunkLBDC5434cjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
|
|
506
|
+
fadeOutCurve: oneOf(v.fadeOutCurve, _chunkLBDC5434cjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
|
|
507
507
|
});
|
|
508
508
|
if (type === "sequence") {
|
|
509
509
|
for (const key of ["speed", "timeRemap"])
|
|
@@ -515,8 +515,8 @@ function parseVideoClip(v, path = "clip") {
|
|
|
515
515
|
in: num(v.in, `${path}.in`, { optional: true, min: 0 }),
|
|
516
516
|
volume: parseVideoAnimatable(v.volume, `${path}.volume`, { optional: true, min: 0, max: 4 }),
|
|
517
517
|
muted: bool(v.muted, `${path}.muted`),
|
|
518
|
-
fadeInCurve: oneOf(v.fadeInCurve,
|
|
519
|
-
fadeOutCurve: oneOf(v.fadeOutCurve,
|
|
518
|
+
fadeInCurve: oneOf(v.fadeInCurve, _chunkLBDC5434cjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
|
|
519
|
+
fadeOutCurve: oneOf(v.fadeOutCurve, _chunkLBDC5434cjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
|
|
520
520
|
});
|
|
521
521
|
}
|
|
522
522
|
if (type === "text")
|
|
@@ -531,7 +531,7 @@ function parseVideoClip(v, path = "clip") {
|
|
|
531
531
|
background: str(v.background, `${path}.background`, true)
|
|
532
532
|
});
|
|
533
533
|
if (type === "adjustment") {
|
|
534
|
-
const scope = oneOf(v.scope,
|
|
534
|
+
const scope = oneOf(v.scope, _chunkLBDC5434cjs.VIDEO_ADJUSTMENT_SCOPES, `${path}.scope`);
|
|
535
535
|
const targetTrack = str(v.targetTrack, `${path}.targetTrack`, true);
|
|
536
536
|
if (scope === "track" && !targetTrack) fail(`${path}.targetTrack`, 'is required when scope is "track": the id of the track whose pictures the adjustment changes');
|
|
537
537
|
if (targetTrack !== void 0 && scope !== "track") fail(`${path}.targetTrack`, 'is only for scope "track"');
|
|
@@ -634,9 +634,9 @@ function createVideoProject(options = {}) {
|
|
|
634
634
|
// src/video-editor/check.ts
|
|
635
635
|
function videoClipKeyframes(clip) {
|
|
636
636
|
const out = [
|
|
637
|
-
{ property: "opacity", keys:
|
|
638
|
-
{ property: "volume", keys: clip.type === "media" || clip.type === "sequence" ?
|
|
639
|
-
...
|
|
637
|
+
{ property: "opacity", keys: _chunkLBDC5434cjs.videoKeysOf.call(void 0, clip.opacity) },
|
|
638
|
+
{ property: "volume", keys: clip.type === "media" || clip.type === "sequence" ? _chunkLBDC5434cjs.videoKeysOf.call(void 0, clip.volume) : [] },
|
|
639
|
+
..._chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => ({ property: p, keys: _chunkLBDC5434cjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _2 => _2.transform, 'optionalAccess', _3 => _3[p]])) }))
|
|
640
640
|
];
|
|
641
641
|
return out.filter((o) => o.keys.length);
|
|
642
642
|
}
|
|
@@ -665,8 +665,8 @@ var VIDEO_ISSUE_CODES = [
|
|
|
665
665
|
var videoIssueKey = (i) => [i.code, _nullishCoalesce(i.sequence, () => ( "")), _nullishCoalesce(i.track, () => ( "")), _nullishCoalesce(i.clip, () => ( "")), _nullishCoalesce(i.asset, () => ( "")), _nullishCoalesce(i.marker, () => ( ""))].join("|");
|
|
666
666
|
function checkVideoProject(project) {
|
|
667
667
|
const issues = [];
|
|
668
|
-
const assets =
|
|
669
|
-
const sequences =
|
|
668
|
+
const assets = _chunkLBDC5434cjs.videoAssetMap.call(void 0, project);
|
|
669
|
+
const sequences = _chunkLBDC5434cjs.videoSequenceMap.call(void 0, project);
|
|
670
670
|
const used = /* @__PURE__ */ new Set();
|
|
671
671
|
const usedSequences = /* @__PURE__ */ new Set();
|
|
672
672
|
const cycles = /* @__PURE__ */ new Map();
|
|
@@ -674,7 +674,7 @@ function checkVideoProject(project) {
|
|
|
674
674
|
if ((asset.kind === "video" || asset.kind === "audio") && asset.duration === void 0)
|
|
675
675
|
issues.push({ code: "unknown-duration", severity: "warning", asset: asset.id, message: `Asset "${asset.id}" has no duration, so clips of it cannot be checked against its length; set "duration" in ms.` });
|
|
676
676
|
const checkTrack = (track, sequence) => {
|
|
677
|
-
const clips =
|
|
677
|
+
const clips = _chunkLBDC5434cjs.sortedVideoClips.call(void 0, track);
|
|
678
678
|
const where = sequence ? ` in sequence "${sequence}"` : "";
|
|
679
679
|
for (let i = 0; i < clips.length; i++) {
|
|
680
680
|
const clip = clips[i];
|
|
@@ -684,13 +684,13 @@ function checkVideoProject(project) {
|
|
|
684
684
|
const seq = sequences.get(clip.sequence);
|
|
685
685
|
if (!seq) issues.push({ code: "missing-sequence", severity: "error", ...at, message: `Compound clip "${clip.id}" plays sequence "${clip.sequence}", which is not in the project; add the sequence or delete the clip.` });
|
|
686
686
|
else {
|
|
687
|
-
if (!cycles.has(seq.id)) cycles.set(seq.id,
|
|
687
|
+
if (!cycles.has(seq.id)) cycles.set(seq.id, _chunkLBDC5434cjs.findVideoSequenceCycle.call(void 0, project, seq.id));
|
|
688
688
|
const cycle = cycles.get(seq.id);
|
|
689
689
|
if (cycle) issues.push({ code: "sequence-cycle", severity: "error", ...at, message: `Compound clip "${clip.id}" plays sequence "${seq.id}", which contains itself (${cycle.join(" \u2192 ")}), so it is left out of the picture and sound; remove the compound clip that closes the loop.` });
|
|
690
|
-
const length =
|
|
691
|
-
const range =
|
|
692
|
-
if (range.out > length +
|
|
693
|
-
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Compound clip "${clip.id}" plays to ${
|
|
690
|
+
const length = _chunkLBDC5434cjs.videoSequenceDuration.call(void 0, seq);
|
|
691
|
+
const range = _chunkLBDC5434cjs.videoClipSourceRange.call(void 0, clip);
|
|
692
|
+
if (range.out > length + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON)
|
|
693
|
+
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Compound clip "${clip.id}" plays to ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, range.out)} of sequence "${seq.id}", which is only ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, length)} long; shorten the clip or move its in point.` });
|
|
694
694
|
}
|
|
695
695
|
} else if (clip.type === "media") {
|
|
696
696
|
used.add(clip.asset);
|
|
@@ -699,32 +699,32 @@ function checkVideoProject(project) {
|
|
|
699
699
|
else {
|
|
700
700
|
if (track.kind === "audio" && asset.kind === "image") issues.push({ code: "wrong-track", severity: "error", ...at, message: `Clip "${clip.id}" is an image on audio track "${track.id}"; move it to a video track.` });
|
|
701
701
|
if (track.kind === "video" && asset.kind === "audio") issues.push({ code: "wrong-track", severity: "error", ...at, message: `Clip "${clip.id}" is audio on video track "${track.id}"; move it to an audio track.` });
|
|
702
|
-
const range =
|
|
703
|
-
if (asset.duration !== void 0 && range.out > asset.duration +
|
|
704
|
-
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Clip "${clip.id}" plays to ${
|
|
702
|
+
const range = _chunkLBDC5434cjs.videoClipSourceRange.call(void 0, clip);
|
|
703
|
+
if (asset.duration !== void 0 && range.out > asset.duration + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON)
|
|
704
|
+
issues.push({ code: "source-overrun", severity: "error", ...at, message: `Clip "${clip.id}" plays to ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, range.out)} of "${asset.id}", which is only ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, asset.duration)} long; shorten the clip or move its in point.` });
|
|
705
705
|
}
|
|
706
706
|
} else if (track.kind === "audio") issues.push({ code: "wrong-track", severity: "error", ...at, message: `Clip "${clip.id}" is a ${clip.type} clip on audio track "${track.id}"; move it to a video track.` });
|
|
707
707
|
if (clip.type === "adjustment" && (_nullishCoalesce(clip.scope, () => ( "underneath"))) === "track" && !(sequence ? _nullishCoalesce(_optionalChain([sequences, 'access', _4 => _4.get, 'call', _5 => _5(sequence), 'optionalAccess', _6 => _6.tracks]), () => ( [])) : project.tracks).some((t) => t.id === clip.targetTrack))
|
|
708
708
|
issues.push({ code: "missing-target-track", severity: "warning", ...at, message: `Adjustment clip "${clip.id}" changes track "${clip.targetTrack}", which is not ${sequence ? `in sequence "${sequence}"` : "in the project"}, so it changes nothing; set its targetTrack to a track beside it or change its scope.` });
|
|
709
709
|
const next = clips[i + 1];
|
|
710
|
-
if (next && next.start <
|
|
711
|
-
issues.push({ code: "overlap", severity: "error", ...at, message: `Clips "${clip.id}" and "${next.id}" overlap on track "${track.id}"${where} from ${
|
|
712
|
-
if ((_nullishCoalesce(clip.fadeIn, () => ( 0))) + (_nullishCoalesce(clip.fadeOut, () => ( 0))) > clip.duration +
|
|
710
|
+
if (next && next.start < _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip) - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON)
|
|
711
|
+
issues.push({ code: "overlap", severity: "error", ...at, message: `Clips "${clip.id}" and "${next.id}" overlap on track "${track.id}"${where} from ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, next.start)}; move one of them.` });
|
|
712
|
+
if ((_nullishCoalesce(clip.fadeIn, () => ( 0))) + (_nullishCoalesce(clip.fadeOut, () => ( 0))) > clip.duration + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON)
|
|
713
713
|
issues.push({ code: "fades-too-long", severity: "warning", ...at, message: `Clip "${clip.id}"'s fades (${_nullishCoalesce(clip.fadeIn, () => ( 0))} + ${_nullishCoalesce(clip.fadeOut, () => ( 0))} ms) are longer than the clip (${clip.duration} ms); shorten them.` });
|
|
714
|
-
const anim = (clip.animateIn ? _nullishCoalesce(clip.animateIn.duration, () => (
|
|
715
|
-
if (anim > clip.duration +
|
|
714
|
+
const anim = (clip.animateIn ? _nullishCoalesce(clip.animateIn.duration, () => ( _chunkLBDC5434cjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0) + (clip.animateOut ? _nullishCoalesce(clip.animateOut.duration, () => ( _chunkLBDC5434cjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0);
|
|
715
|
+
if (anim > clip.duration + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON)
|
|
716
716
|
issues.push({ code: "animations-too-long", severity: "warning", ...at, message: `Clip "${clip.id}"'s entrance and exit (${anim} ms together) are longer than the clip (${clip.duration} ms), so both are shortened; give them shorter durations.` });
|
|
717
717
|
for (const which of ["animateIn", "animateOut"]) {
|
|
718
718
|
const a = clip[which];
|
|
719
719
|
if (!a) continue;
|
|
720
|
-
const keyed =
|
|
720
|
+
const keyed = _chunkLBDC5434cjs.videoClipAnimationProperties.call(void 0, a).filter((p) => _chunkLBDC5434cjs.videoKeysOf.call(void 0, p === "opacity" ? clip.opacity : _optionalChain([clip, 'access', _7 => _7.transform, 'optionalAccess', _8 => _8[p]])).length);
|
|
721
721
|
if (keyed.length)
|
|
722
722
|
issues.push({ code: "animation-keyed", severity: "note", ...at, message: `Clip "${clip.id}"'s ${a.effect} ${which === "animateIn" ? "entrance" : "exit"} leaves ${keyed.join(", ")} alone, because the clip keys ${keyed.length > 1 ? "them" : "it"} itself; remove those keyframes or the animation.` });
|
|
723
723
|
}
|
|
724
724
|
if (clip.camera) {
|
|
725
|
-
const last = Math.max(0, ...
|
|
725
|
+
const last = Math.max(0, ..._chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => _chunkLBDC5434cjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _9 => _9.transform, 'optionalAccess', _10 => _10[p]])).map((k) => k.t)));
|
|
726
726
|
const frame = 1e3 / (project.fps || 30);
|
|
727
|
-
if (last > 0 && Math.abs(last - clip.duration) > frame +
|
|
727
|
+
if (last > 0 && Math.abs(last - clip.duration) > frame + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON)
|
|
728
728
|
issues.push({
|
|
729
729
|
code: "camera-stale",
|
|
730
730
|
severity: "warning",
|
|
@@ -733,7 +733,7 @@ function checkVideoProject(project) {
|
|
|
733
733
|
});
|
|
734
734
|
}
|
|
735
735
|
for (const { property, keys } of videoClipKeyframes(clip)) {
|
|
736
|
-
const outside = keys.filter((k) => k.t < -
|
|
736
|
+
const outside = keys.filter((k) => k.t < -_chunkLBDC5434cjs.VIDEO_TIME_EPSILON || k.t > clip.duration + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON);
|
|
737
737
|
if (outside.length)
|
|
738
738
|
issues.push({
|
|
739
739
|
code: "keyframes-outside-clip",
|
|
@@ -744,20 +744,20 @@ function checkVideoProject(project) {
|
|
|
744
744
|
}
|
|
745
745
|
if (clip.transition) {
|
|
746
746
|
const d = clip.transition.duration;
|
|
747
|
-
const before =
|
|
747
|
+
const before = _chunkLBDC5434cjs.videoClipBefore.call(void 0, track, clip);
|
|
748
748
|
if (!before) {
|
|
749
749
|
issues.push({ code: "transition-without-cut", severity: "warning", ...at, message: `Clip "${clip.id}" has a transition but no clip ends where it starts on track "${track.id}", so it plays as nothing; butt a clip up against it or remove the transition.` });
|
|
750
750
|
continue;
|
|
751
751
|
}
|
|
752
|
-
if (d > clip.duration +
|
|
752
|
+
if (d > clip.duration + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON || d > before.duration + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) {
|
|
753
753
|
issues.push({ code: "transition-too-long", severity: "error", ...at, message: `The ${d} ms transition into "${clip.id}" is longer than "${clip.id}" (${clip.duration} ms) or "${before.id}" (${before.duration} ms); make it at most ${Math.min(clip.duration, before.duration)} ms.` });
|
|
754
754
|
continue;
|
|
755
755
|
}
|
|
756
756
|
if (clip.transition.type === "dip") continue;
|
|
757
|
-
const outgoing =
|
|
758
|
-
const incoming =
|
|
757
|
+
const outgoing = _chunkLBDC5434cjs.videoClipHandles.call(void 0, before, assets, sequences).after;
|
|
758
|
+
const incoming = _chunkLBDC5434cjs.videoClipHandles.call(void 0, clip, assets, sequences).before;
|
|
759
759
|
const half = d / 2;
|
|
760
|
-
if (outgoing < half -
|
|
760
|
+
if (outgoing < half - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON || incoming < half - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) {
|
|
761
761
|
const fits = 2 * Math.min(outgoing, incoming);
|
|
762
762
|
issues.push({
|
|
763
763
|
code: "transition-handles",
|
|
@@ -774,9 +774,9 @@ function checkVideoProject(project) {
|
|
|
774
774
|
for (const sequence of _nullishCoalesce(project.sequences, () => ( [])))
|
|
775
775
|
if (!usedSequences.has(sequence.id)) issues.push({ code: "unused-sequence", severity: "note", sequence: sequence.id, message: `Sequence "${sequence.id}" is not played by any compound clip.` });
|
|
776
776
|
for (const asset of project.assets) if (!used.has(asset.id)) issues.push({ code: "unused-asset", severity: "note", asset: asset.id, message: `Asset "${asset.id}" is not used by any clip.` });
|
|
777
|
-
const end =
|
|
777
|
+
const end = _chunkLBDC5434cjs.videoProjectDuration.call(void 0, project);
|
|
778
778
|
for (const marker of _nullishCoalesce(project.markers, () => ( [])))
|
|
779
|
-
if (marker.time > end +
|
|
779
|
+
if (marker.time > end + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) issues.push({ code: "marker-past-end", severity: "note", marker: marker.id, message: `Marker "${marker.id}" at ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, marker.time)} is past the end (${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, end)}).` });
|
|
780
780
|
if (!project.tracks.some((t) => t.clips.length)) issues.push({ code: "empty", severity: "note", message: "The project has no clips yet; add assets and then clips." });
|
|
781
781
|
const rank = { error: 0, warning: 1, note: 2 };
|
|
782
782
|
return issues.sort((a, b) => rank[a.severity] - rank[b.severity]);
|
|
@@ -830,7 +830,7 @@ function mergeSpans(spans) {
|
|
|
830
830
|
const out = [];
|
|
831
831
|
for (const [from, to] of [...spans].sort((a, b) => a[0] - b[0])) {
|
|
832
832
|
const last = out[out.length - 1];
|
|
833
|
-
if (last && from <= last[1] +
|
|
833
|
+
if (last && from <= last[1] + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) last[1] = Math.max(last[1], to);
|
|
834
834
|
else out.push([from, to]);
|
|
835
835
|
}
|
|
836
836
|
return out;
|
|
@@ -844,13 +844,13 @@ function clipAnimatables(clip) {
|
|
|
844
844
|
// A speed ramp is keys in clip time too, so trims and splits keep it on the same frames of source.
|
|
845
845
|
{ get: () => c.timeRemap, set: (v) => c.timeRemap = v }
|
|
846
846
|
];
|
|
847
|
-
for (const p of
|
|
847
|
+
for (const p of _chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES) out.push({ get: () => _optionalChain([c, 'access', _11 => _11.transform, 'optionalAccess', _12 => _12[p]]), set: (v) => c.transform && (c.transform[p] = v) });
|
|
848
848
|
return out;
|
|
849
849
|
}
|
|
850
850
|
function retimeClipKeys(clip, fn) {
|
|
851
851
|
for (const a of clipAnimatables(clip)) {
|
|
852
852
|
const v = a.get();
|
|
853
|
-
if (
|
|
853
|
+
if (_chunkLBDC5434cjs.isVideoKeyframes.call(void 0, v)) a.set(fn(v));
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
856
|
var OPTIONAL_CLIP_FIELDS = ["name", "effects", "mask", "camera", "scope", "targetTrack", "values", "provider", "opacity", "transform", "fit", "blend", "grade", "animateIn", "animateOut", "fadeIn", "fadeOut", "fadeInCurve", "fadeOutCurve", "transition", "in", "speed", "timeRemap", "volume", "muted", "color", "fontSize", "fontFamily", "fontWeight", "background"];
|
|
@@ -867,8 +867,8 @@ var Editor = (_class = class {
|
|
|
867
867
|
return t;
|
|
868
868
|
}
|
|
869
869
|
clip(id) {
|
|
870
|
-
const at =
|
|
871
|
-
const nested = at ? null :
|
|
870
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, this.p, id);
|
|
871
|
+
const nested = at ? null : _chunkLBDC5434cjs.findVideoSequenceClip.call(void 0, this.p, id);
|
|
872
872
|
if (nested) refuse(`Clip "${id}" is inside sequence "${nested.sequence.id}", and clips inside sequences cannot be edited yet; edit the compound clip that plays the sequence instead (list_video_sequences shows which).`);
|
|
873
873
|
if (!at) {
|
|
874
874
|
const ids = this.p.tracks.flatMap((t) => t.clips.map((c) => c.id));
|
|
@@ -885,16 +885,16 @@ var Editor = (_class = class {
|
|
|
885
885
|
return a;
|
|
886
886
|
}
|
|
887
887
|
fits(track, start, duration, ignore, what) {
|
|
888
|
-
const hit =
|
|
888
|
+
const hit = _chunkLBDC5434cjs.videoOverlap.call(void 0, track, start, start + duration, ignore);
|
|
889
889
|
if (hit) {
|
|
890
|
-
const free =
|
|
891
|
-
refuse(`${what} at ${
|
|
890
|
+
const free = _chunkLBDC5434cjs.nextFreeVideoSlot.call(void 0, track, start, duration, ignore);
|
|
891
|
+
refuse(`${what} at ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, start)}\u2013${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, start + duration)} would overlap clip "${hit.id}" (${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, _chunkLBDC5434cjs.videoClipEnd.call(void 0, hit))}) on track "${track.id}"; the next free place is ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, free)}, or use mode "insert" to push later clips along or "overwrite" to replace what is there.`);
|
|
892
892
|
}
|
|
893
893
|
}
|
|
894
894
|
/** An adjustment clip's target track must exist. */
|
|
895
895
|
adjustmentTarget(clip) {
|
|
896
896
|
if (clip.type !== "adjustment" || clip.targetTrack === void 0) return;
|
|
897
|
-
const ids =
|
|
897
|
+
const ids = _chunkLBDC5434cjs.allVideoTracks.call(void 0, this.p).map(({ track }) => track.id);
|
|
898
898
|
if (!ids.includes(clip.targetTrack)) refuse(`Adjustment clip "${clip.id}" targets track ${_chunkDGWOGQJ5cjs.namedWithSuggestion.call(void 0, clip.targetTrack, ids)}, which does not exist; the tracks are ${ids.map((t) => `"${t}"`).join(", ")}.`);
|
|
899
899
|
}
|
|
900
900
|
kindFits(track, clip) {
|
|
@@ -910,14 +910,14 @@ var Editor = (_class = class {
|
|
|
910
910
|
/** Moves every clip on `track` starting at or after `from` by `delta`. */
|
|
911
911
|
shift(track, from, delta, except = /* @__PURE__ */ new Set()) {
|
|
912
912
|
if (!delta) return;
|
|
913
|
-
for (const c of track.clips) if (!except.has(c.id) && c.start >= from -
|
|
913
|
+
for (const c of track.clips) if (!except.has(c.id) && c.start >= from - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) c.start = Math.max(0, c.start + delta);
|
|
914
914
|
track.clips.sort((a, b) => a.start - b.start);
|
|
915
915
|
}
|
|
916
916
|
get frame() {
|
|
917
917
|
return 1e3 / this.p.fps;
|
|
918
918
|
}
|
|
919
919
|
ids() {
|
|
920
|
-
return
|
|
920
|
+
return _chunkLBDC5434cjs.allVideoClipIds.call(void 0, this.p);
|
|
921
921
|
}
|
|
922
922
|
/**
|
|
923
923
|
* The tracks a ripple on `sources` moves, top to bottom: the sources, and every unlocked
|
|
@@ -925,8 +925,8 @@ var Editor = (_class = class {
|
|
|
925
925
|
*/
|
|
926
926
|
rippleTracks(sources) {
|
|
927
927
|
const set = new Set(sources);
|
|
928
|
-
if ([...set].some(
|
|
929
|
-
for (const t of this.p.tracks) if (
|
|
928
|
+
if ([...set].some(_chunkLBDC5434cjs.videoTrackSyncLocked)) {
|
|
929
|
+
for (const t of this.p.tracks) if (_chunkLBDC5434cjs.videoTrackSyncLocked.call(void 0, t) && !t.locked) set.add(t);
|
|
930
930
|
}
|
|
931
931
|
return this.p.tracks.filter((t) => set.has(t));
|
|
932
932
|
}
|
|
@@ -943,7 +943,7 @@ var Editor = (_class = class {
|
|
|
943
943
|
return open;
|
|
944
944
|
}
|
|
945
945
|
range(from, to) {
|
|
946
|
-
if (!(to - from >
|
|
946
|
+
if (!(to - from > _chunkLBDC5434cjs.VIDEO_TIME_EPSILON)) refuse(`"to" (${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, to)}) must be after "from" (${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, from)}).`);
|
|
947
947
|
}
|
|
948
948
|
/** Moves a media or compound clip's in point by `delta` of timeline time (stills, titles and colours have none). */
|
|
949
949
|
moveIn(clip, delta) {
|
|
@@ -952,18 +952,18 @@ var Editor = (_class = class {
|
|
|
952
952
|
if (clip.in < 1e-9) delete clip.in;
|
|
953
953
|
return;
|
|
954
954
|
}
|
|
955
|
-
if (clip.type !== "media" || _optionalChain([
|
|
956
|
-
clip.in = Math.max(0, (_nullishCoalesce(clip.in, () => ( 0))) + delta *
|
|
955
|
+
if (clip.type !== "media" || _optionalChain([_chunkLBDC5434cjs.videoAssetMap.call(void 0, this.p), 'access', _14 => _14.get, 'call', _15 => _15(clip.asset), 'optionalAccess', _16 => _16.kind]) === "image") return;
|
|
956
|
+
clip.in = Math.max(0, (_nullishCoalesce(clip.in, () => ( 0))) + delta * _chunkLBDC5434cjs.videoClipSpeed.call(void 0, clip));
|
|
957
957
|
if (clip.in < 1e-9) delete clip.in;
|
|
958
958
|
}
|
|
959
959
|
/** Moves a clip's head `delta` later in time (start, in point and keys); the caller sets start and duration. */
|
|
960
960
|
trimHead(clip, delta) {
|
|
961
961
|
if (!isRamped(clip)) this.moveIn(clip, delta);
|
|
962
|
-
retimeClipKeys(clip, (v) =>
|
|
962
|
+
retimeClipKeys(clip, (v) => _chunkLBDC5434cjs.retimeVideoAnimatable.call(void 0, v, -delta));
|
|
963
963
|
}
|
|
964
964
|
/** Cuts `clip` at `at` (inside it): the left part keeps the id, the right part is returned. */
|
|
965
965
|
cut(track, clip, at, id) {
|
|
966
|
-
const end =
|
|
966
|
+
const end = _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip);
|
|
967
967
|
const right = { ...structuredClone(clip), id: _nullishCoalesce(id, () => ( freshId(`${clip.id}-`, this.ids()))), start: at, duration: end - at };
|
|
968
968
|
delete right.transition;
|
|
969
969
|
delete right.fadeIn;
|
|
@@ -971,9 +971,9 @@ var Editor = (_class = class {
|
|
|
971
971
|
delete right.animateIn;
|
|
972
972
|
const leftValues = clipAnimatables(clip);
|
|
973
973
|
clipAnimatables(right).forEach((r, i) => {
|
|
974
|
-
const [l, rr] =
|
|
975
|
-
if (
|
|
976
|
-
if (
|
|
974
|
+
const [l, rr] = _chunkLBDC5434cjs.splitVideoAnimatable.call(void 0, leftValues[i].get(), at - clip.start);
|
|
975
|
+
if (_chunkLBDC5434cjs.isVideoKeyframes.call(void 0, l)) leftValues[i].set(l);
|
|
976
|
+
if (_chunkLBDC5434cjs.isVideoKeyframes.call(void 0, rr)) r.set(rr);
|
|
977
977
|
});
|
|
978
978
|
if (!isRamped(right)) this.moveIn(right, at - clip.start);
|
|
979
979
|
clip.duration = at - clip.start;
|
|
@@ -987,7 +987,7 @@ var Editor = (_class = class {
|
|
|
987
987
|
/** Cuts every clip on `tracks` that runs across `at`; returns the new right-hand parts. */
|
|
988
988
|
cutAcross(tracks, at) {
|
|
989
989
|
const made = [];
|
|
990
|
-
for (const t of tracks) for (const c of [...t.clips]) if (c.start < at -
|
|
990
|
+
for (const t of tracks) for (const c of [...t.clips]) if (c.start < at - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON && _chunkLBDC5434cjs.videoClipEnd.call(void 0, c) > at + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) made.push(this.cut(t, c, at));
|
|
991
991
|
return made;
|
|
992
992
|
}
|
|
993
993
|
/**
|
|
@@ -1005,10 +1005,10 @@ var Editor = (_class = class {
|
|
|
1005
1005
|
*/
|
|
1006
1006
|
close(tracks, from, to) {
|
|
1007
1007
|
for (const t of tracks) {
|
|
1008
|
-
const hit =
|
|
1008
|
+
const hit = _chunkLBDC5434cjs.videoOverlap.call(void 0, t, from, to);
|
|
1009
1009
|
if (hit)
|
|
1010
1010
|
refuse(
|
|
1011
|
-
`Rippling out ${
|
|
1011
|
+
`Rippling out ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, from)}\u2013${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, to)} would pull track "${t.id}" out of sync: clip "${hit.id}" (${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, _chunkLBDC5434cjs.videoClipEnd.call(void 0, hit))}) is in that stretch. Extract the range across "${t.id}" too (extract_range with its id in "tracks"), turn its sync lock off (update_track with syncLocked false) or lock it, or lift instead of rippling.`
|
|
1012
1012
|
);
|
|
1013
1013
|
}
|
|
1014
1014
|
for (const t of tracks) this.shift(t, to, from - to);
|
|
@@ -1020,10 +1020,10 @@ var Editor = (_class = class {
|
|
|
1020
1020
|
clear(track, from, to, report) {
|
|
1021
1021
|
for (const c of [...track.clips]) {
|
|
1022
1022
|
const start = c.start;
|
|
1023
|
-
const end =
|
|
1024
|
-
if (end <= from +
|
|
1025
|
-
const coversHead = start >= from -
|
|
1026
|
-
const coversTail = end <= to +
|
|
1023
|
+
const end = _chunkLBDC5434cjs.videoClipEnd.call(void 0, c);
|
|
1024
|
+
if (end <= from + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON || start >= to - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) continue;
|
|
1025
|
+
const coversHead = start >= from - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON;
|
|
1026
|
+
const coversTail = end <= to + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON;
|
|
1027
1027
|
if (coversHead && coversTail) {
|
|
1028
1028
|
track.clips = track.clips.filter((x) => x !== c);
|
|
1029
1029
|
report.removed.push(c.id);
|
|
@@ -1046,8 +1046,8 @@ var Editor = (_class = class {
|
|
|
1046
1046
|
/** Clamps a slip, roll or slide to `[lo, hi]`, refusing when it cannot move that way at all. */
|
|
1047
1047
|
clamp(delta, lo, hi, why) {
|
|
1048
1048
|
const applied = Math.min(Math.max(delta, Math.min(0, lo)), Math.max(0, hi));
|
|
1049
|
-
if (Math.abs(delta) >
|
|
1050
|
-
return Math.abs(applied) <=
|
|
1049
|
+
if (Math.abs(delta) > _chunkLBDC5434cjs.VIDEO_TIME_EPSILON && Math.abs(applied) <= _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) refuse(why());
|
|
1050
|
+
return Math.abs(applied) <= _chunkLBDC5434cjs.VIDEO_TIME_EPSILON ? 0 : applied;
|
|
1051
1051
|
}
|
|
1052
1052
|
/** Places a clip on a track by `mode`, returning what it cut, trimmed, removed and rippled. */
|
|
1053
1053
|
place(track, clip, mode, outcome) {
|
|
@@ -1057,14 +1057,14 @@ var Editor = (_class = class {
|
|
|
1057
1057
|
outcome.rippled = tracks.map((t) => t.id);
|
|
1058
1058
|
} else if (mode === "overwrite") {
|
|
1059
1059
|
const report = { removed: [], trimmed: [], created: [] };
|
|
1060
|
-
this.clear(track, clip.start,
|
|
1060
|
+
this.clear(track, clip.start, _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip), report);
|
|
1061
1061
|
Object.assign(outcome, report);
|
|
1062
1062
|
} else this.fits(track, clip.start, clip.duration, /* @__PURE__ */ new Set([clip.id]), `Clip "${clip.id}"`);
|
|
1063
1063
|
track.clips.push(clip);
|
|
1064
1064
|
track.clips.sort((a, b) => a.start - b.start);
|
|
1065
1065
|
}
|
|
1066
1066
|
placement(mode, ripple) {
|
|
1067
|
-
if (mode !== void 0 && !
|
|
1067
|
+
if (mode !== void 0 && !_chunkLBDC5434cjs.VIDEO_PLACEMENT_MODES.includes(mode)) refuse(`"mode" must be ${_chunkLBDC5434cjs.VIDEO_PLACEMENT_MODES.map((m) => `"${m}"`).join(", ")}.`);
|
|
1068
1068
|
if (ripple && mode !== void 0 && mode !== "insert") refuse(`"ripple" means mode "insert", so it cannot go with mode "${mode}"; pass one or the other.`);
|
|
1069
1069
|
return _nullishCoalesce(mode, () => ( (ripple ? "insert" : "refuse")));
|
|
1070
1070
|
}
|
|
@@ -1101,7 +1101,7 @@ var Editor = (_class = class {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
case "remove_asset": {
|
|
1103
1103
|
const asset = this.asset(e.asset);
|
|
1104
|
-
const users =
|
|
1104
|
+
const users = _chunkLBDC5434cjs.allVideoTracks.call(void 0, this.p).flatMap(({ track: t }) => t.clips.filter((c) => c.type === "media" && c.asset === asset.id).map((c) => c.id));
|
|
1105
1105
|
if (users.length) refuse(`Asset "${asset.id}" is used by clip${users.length > 1 ? "s" : ""} ${users.map((u) => `"${u}"`).join(", ")}; delete ${users.length > 1 ? "them" : "it"} first.`);
|
|
1106
1106
|
this.p.assets = this.p.assets.filter((a) => a !== asset);
|
|
1107
1107
|
return this.outcomes.push({ op: e.op, asset: asset.id });
|
|
@@ -1154,12 +1154,12 @@ var Editor = (_class = class {
|
|
|
1154
1154
|
else draft.duration = (asset.duration - (_nullishCoalesce(draft.in, () => ( 0)))) / (_nullishCoalesce(draft.speed, () => ( 1)));
|
|
1155
1155
|
if (!(draft.duration > 0)) refuse(`"in" (${draft.in} ms) is at or past the end of "${asset.id}" (${asset.duration} ms).`);
|
|
1156
1156
|
} else if (draft.type === "sequence") {
|
|
1157
|
-
const length =
|
|
1157
|
+
const length = _chunkLBDC5434cjs.videoSequenceDuration.call(void 0, _chunkLBDC5434cjs.videoSequenceMap.call(void 0, this.p).get(draft.sequence)) - (_nullishCoalesce(draft.in, () => ( 0)));
|
|
1158
1158
|
if (!(length > 0)) refuse(`"in" (${_nullishCoalesce(draft.in, () => ( 0))} ms) is at or past the end of sequence "${draft.sequence}".`);
|
|
1159
1159
|
draft.duration = length;
|
|
1160
1160
|
} else draft.duration = VIDEO_DEFAULT_TITLE_DURATION;
|
|
1161
1161
|
}
|
|
1162
|
-
const end =
|
|
1162
|
+
const end = _chunkLBDC5434cjs.sortedVideoClips.call(void 0, track).reduce((m, c) => Math.max(m, _chunkLBDC5434cjs.videoClipEnd.call(void 0, c)), 0);
|
|
1163
1163
|
draft.start ??= end;
|
|
1164
1164
|
const clip = parseVideoClip(draft, "clip");
|
|
1165
1165
|
this.adjustmentTarget(clip);
|
|
@@ -1185,20 +1185,20 @@ var Editor = (_class = class {
|
|
|
1185
1185
|
case "trim_clip": {
|
|
1186
1186
|
const { track, clip } = this.clip(e.clip);
|
|
1187
1187
|
this.unlocked(track);
|
|
1188
|
-
const speed =
|
|
1189
|
-
const end =
|
|
1188
|
+
const speed = _chunkLBDC5434cjs.videoClipSpeed.call(void 0, clip);
|
|
1189
|
+
const end = _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip);
|
|
1190
1190
|
const minimum = 1e3 / this.p.fps;
|
|
1191
|
-
const assets =
|
|
1191
|
+
const assets = _chunkLBDC5434cjs.videoAssetMap.call(void 0, this.p);
|
|
1192
1192
|
if (e.edge === "start") {
|
|
1193
1193
|
const delta = e.to - clip.start;
|
|
1194
|
-
if (clip.duration - delta < minimum -
|
|
1194
|
+
if (clip.duration - delta < minimum - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) refuse(`Trimming the start to ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it ends at ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, end)}.`);
|
|
1195
1195
|
if (clip.type === "media" && !isRamped(clip) || clip.type === "sequence") {
|
|
1196
1196
|
const sourceIn = (_nullishCoalesce(clip.in, () => ( 0))) + delta * speed;
|
|
1197
|
-
if (sourceIn < -
|
|
1197
|
+
if (sourceIn < -_chunkLBDC5434cjs.VIDEO_TIME_EPSILON) refuse(`"${clip.id}" starts ${Math.round((_nullishCoalesce(clip.in, () => ( 0))) / speed)} ms into its source, so its start can move at most that far earlier (to ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, clip.start - (_nullishCoalesce(clip.in, () => ( 0))) / speed)}).`);
|
|
1198
1198
|
clip.in = Math.max(0, sourceIn);
|
|
1199
1199
|
if (clip.in === 0) delete clip.in;
|
|
1200
1200
|
}
|
|
1201
|
-
retimeClipKeys(clip, (v) =>
|
|
1201
|
+
retimeClipKeys(clip, (v) => _chunkLBDC5434cjs.retimeVideoAnimatable.call(void 0, v, -delta));
|
|
1202
1202
|
if (e.ripple) {
|
|
1203
1203
|
const tracks = this.rippleTracks([track]);
|
|
1204
1204
|
if (delta > 0) {
|
|
@@ -1219,17 +1219,17 @@ var Editor = (_class = class {
|
|
|
1219
1219
|
}
|
|
1220
1220
|
} else {
|
|
1221
1221
|
const duration = e.to - clip.start;
|
|
1222
|
-
if (duration < minimum -
|
|
1222
|
+
if (duration < minimum - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) refuse(`Trimming the end to ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it starts at ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, clip.start)}.`);
|
|
1223
1223
|
if (clip.type === "media" && !isRamped(clip)) {
|
|
1224
1224
|
const asset = assets.get(clip.asset);
|
|
1225
1225
|
const out = (_nullishCoalesce(clip.in, () => ( 0))) + duration * speed;
|
|
1226
|
-
if (_optionalChain([asset, 'optionalAccess', _17 => _17.duration]) !== void 0 && out > asset.duration +
|
|
1227
|
-
refuse(`"${clip.id}" can end at most at ${
|
|
1226
|
+
if (_optionalChain([asset, 'optionalAccess', _17 => _17.duration]) !== void 0 && out > asset.duration + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON)
|
|
1227
|
+
refuse(`"${clip.id}" can end at most at ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, clip.start + (asset.duration - (_nullishCoalesce(clip.in, () => ( 0)))) / speed)}, where "${asset.id}" runs out.`);
|
|
1228
1228
|
}
|
|
1229
1229
|
if (clip.type === "sequence") {
|
|
1230
|
-
const seq =
|
|
1231
|
-
const length = seq ?
|
|
1232
|
-
if ((_nullishCoalesce(clip.in, () => ( 0))) + duration > length +
|
|
1230
|
+
const seq = _chunkLBDC5434cjs.videoSequenceMap.call(void 0, this.p).get(clip.sequence);
|
|
1231
|
+
const length = seq ? _chunkLBDC5434cjs.videoSequenceDuration.call(void 0, seq) : Infinity;
|
|
1232
|
+
if ((_nullishCoalesce(clip.in, () => ( 0))) + duration > length + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) refuse(`"${clip.id}" can end at most at ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, clip.start + length - (_nullishCoalesce(clip.in, () => ( 0))))}, where sequence "${clip.sequence}" ends.`);
|
|
1233
1233
|
}
|
|
1234
1234
|
if (e.ripple) {
|
|
1235
1235
|
const tracks = this.rippleTracks([track]);
|
|
@@ -1251,9 +1251,9 @@ var Editor = (_class = class {
|
|
|
1251
1251
|
case "split_clip": {
|
|
1252
1252
|
const { track, clip } = this.clip(e.clip);
|
|
1253
1253
|
this.unlocked(track);
|
|
1254
|
-
const end =
|
|
1254
|
+
const end = _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip);
|
|
1255
1255
|
const minimum = 1e3 / this.p.fps;
|
|
1256
|
-
if (e.at < clip.start + minimum -
|
|
1256
|
+
if (e.at < clip.start + minimum - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON || e.at > end - minimum + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) refuse(`${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, e.at)} is not inside "${clip.id}" (${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, clip.start)}\u2013${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, end)}), at least a frame from either end.`);
|
|
1257
1257
|
if (e.id !== void 0 && this.ids().includes(e.id)) refuse(`There is already a clip "${e.id}".`);
|
|
1258
1258
|
const right = this.cut(track, clip, e.at, e.id);
|
|
1259
1259
|
return this.outcomes.push({ op: e.op, clips: [clip.id, right.id], clip: right.id, track: track.id });
|
|
@@ -1264,12 +1264,12 @@ var Editor = (_class = class {
|
|
|
1264
1264
|
for (const track of new Set(found.map((f) => f.track))) track.clips = track.clips.filter((c) => !found.some((f) => f.clip === c));
|
|
1265
1265
|
if (!e.ripple) return this.outcomes.push({ op: e.op, clips: found.map((f) => f.clip.id) });
|
|
1266
1266
|
const rippled = /* @__PURE__ */ new Set();
|
|
1267
|
-
const groups = [...new Set(found.map((f) => f.track))].filter((t) => !
|
|
1268
|
-
if (found.some((f) =>
|
|
1267
|
+
const groups = [...new Set(found.map((f) => f.track))].filter((t) => !_chunkLBDC5434cjs.videoTrackSyncLocked.call(void 0, t)).map((t) => [t]);
|
|
1268
|
+
if (found.some((f) => _chunkLBDC5434cjs.videoTrackSyncLocked.call(void 0, f.track))) groups.push(found.filter((f) => _chunkLBDC5434cjs.videoTrackSyncLocked.call(void 0, f.track)).map((f) => f.track));
|
|
1269
1269
|
for (const sources of groups) {
|
|
1270
1270
|
const tracks = this.rippleTracks(sources);
|
|
1271
1271
|
tracks.forEach((t) => rippled.add(t));
|
|
1272
|
-
const spans = mergeSpans(found.filter((f) => sources.includes(f.track)).map((f) => [f.clip.start,
|
|
1272
|
+
const spans = mergeSpans(found.filter((f) => sources.includes(f.track)).map((f) => [f.clip.start, _chunkLBDC5434cjs.videoClipEnd.call(void 0, f.clip)]));
|
|
1273
1273
|
for (const [from, to] of spans.reverse()) this.close(tracks, from, to);
|
|
1274
1274
|
}
|
|
1275
1275
|
return this.outcomes.push({ op: e.op, clips: found.map((f) => f.clip.id), rippled: this.p.tracks.filter((t) => rippled.has(t)).map((t) => t.id) });
|
|
@@ -1285,7 +1285,7 @@ var Editor = (_class = class {
|
|
|
1285
1285
|
if ("timeRemap" in set) refuse("Set a speed ramp with set_time_remap, which checks it against the media and moves later clips if asked.");
|
|
1286
1286
|
let stretch = 1;
|
|
1287
1287
|
if (at.clip.type === "media" && !("duration" in set)) {
|
|
1288
|
-
const was =
|
|
1288
|
+
const was = _chunkLBDC5434cjs.videoClipSpeed.call(void 0, at.clip);
|
|
1289
1289
|
const now = "speed" in set ? set.speed : _optionalChain([e, 'access', _18 => _18.remove, 'optionalAccess', _19 => _19.includes, 'call', _20 => _20("speed")]) ? 1 : was;
|
|
1290
1290
|
if (now !== was) {
|
|
1291
1291
|
set.duration = at.clip.duration * was / now;
|
|
@@ -1293,7 +1293,7 @@ var Editor = (_class = class {
|
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
1295
|
const next = { ...structuredClone(at.clip), ...set };
|
|
1296
|
-
if (stretch !== 1) retimeClipKeys(next, (v) =>
|
|
1296
|
+
if (stretch !== 1) retimeClipKeys(next, (v) => _chunkLBDC5434cjs.retimeVideoAnimatable.call(void 0, v, 0, stretch));
|
|
1297
1297
|
for (const k of _nullishCoalesce(e.remove, () => ( []))) delete next[k];
|
|
1298
1298
|
const clip = parseVideoClip(next, "set");
|
|
1299
1299
|
this.adjustmentTarget(clip);
|
|
@@ -1307,17 +1307,17 @@ var Editor = (_class = class {
|
|
|
1307
1307
|
const { track, clip } = this.clip(e.clip);
|
|
1308
1308
|
this.unlocked(track);
|
|
1309
1309
|
if (clip.type === "sequence") refuse(`Clip "${clip.id}" is a compound clip, which plays its sequence at normal speed; ramp the clips inside the sequence instead.`);
|
|
1310
|
-
if (clip.type !== "media") refuse(`Clip "${clip.id}" is a ${
|
|
1310
|
+
if (clip.type !== "media") refuse(`Clip "${clip.id}" is a ${_chunkLBDC5434cjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to ramp; only video and audio clips change speed.`);
|
|
1311
1311
|
const asset = this.asset(clip.asset);
|
|
1312
1312
|
if (asset.kind === "image") refuse(`Clip "${clip.id}" is a still ("${asset.id}"), so it has no motion to ramp.`);
|
|
1313
1313
|
const media = clip;
|
|
1314
|
-
const end =
|
|
1314
|
+
const end = _chunkLBDC5434cjs.videoClipEnd.call(void 0, media);
|
|
1315
1315
|
const duration = _nullishCoalesce(e.duration, () => ( media.duration));
|
|
1316
|
-
if (!(duration >= 1e3 / this.p.fps -
|
|
1316
|
+
if (!(duration >= 1e3 / this.p.fps - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON)) refuse(`"duration" must be at least a frame (${Math.ceil(1e3 / this.p.fps)} ms).`);
|
|
1317
1317
|
if (e.keys === null) {
|
|
1318
1318
|
if (!media.timeRemap) refuse(`Clip "${clip.id}" has no speed ramp to remove.`);
|
|
1319
1319
|
const from = (_nullishCoalesce(media.in, () => ( 0))) + media.timeRemap.keys[0].v;
|
|
1320
|
-
if (asset.duration !== void 0 && from + duration > asset.duration +
|
|
1320
|
+
if (asset.duration !== void 0 && from + duration > asset.duration + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON)
|
|
1321
1321
|
refuse(`At normal speed from ${Math.round(from)} ms, "${clip.id}" would run past the end of "${asset.id}" (${asset.duration} ms); give a duration of at most ${Math.floor(asset.duration - from)} ms.`);
|
|
1322
1322
|
delete media.timeRemap;
|
|
1323
1323
|
media.in = from;
|
|
@@ -1325,17 +1325,17 @@ var Editor = (_class = class {
|
|
|
1325
1325
|
} else {
|
|
1326
1326
|
if (!Array.isArray(e.keys) || !e.keys.length) refuse('"keys" must be a list of at least one { t, v, ease } (or null to remove the ramp).');
|
|
1327
1327
|
const remap = parseVideoTimeRemap({ keys: e.keys }, void 0, "keys");
|
|
1328
|
-
remap.keys =
|
|
1329
|
-
|
|
1330
|
-
const span =
|
|
1331
|
-
if (asset.duration !== void 0 && (_nullishCoalesce(media.in, () => ( 0))) + span.to > asset.duration +
|
|
1328
|
+
remap.keys = _chunkLBDC5434cjs.sortVideoKeys.call(void 0, remap.keys, { jumps: false });
|
|
1329
|
+
_chunkLBDC5434cjs.checkVideoTimeRemap.call(void 0, remap, "keys");
|
|
1330
|
+
const span = _chunkLBDC5434cjs.videoTimeRemapSpan.call(void 0, remap);
|
|
1331
|
+
if (asset.duration !== void 0 && (_nullishCoalesce(media.in, () => ( 0))) + span.to > asset.duration + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON)
|
|
1332
1332
|
refuse(`The ramp plays ${Math.round(span.to)} ms of source from the in point (${_nullishCoalesce(media.in, () => ( 0))} ms), past the end of "${asset.id}" (${asset.duration} ms); it can use at most ${Math.floor(asset.duration - (_nullishCoalesce(media.in, () => ( 0))))} ms.`);
|
|
1333
1333
|
media.timeRemap = remap;
|
|
1334
1334
|
delete media.speed;
|
|
1335
1335
|
}
|
|
1336
1336
|
const newEnd = media.start + duration;
|
|
1337
1337
|
const outcome = { op: e.op, clip: clip.id, track: track.id };
|
|
1338
|
-
if (Math.abs(newEnd - end) >
|
|
1338
|
+
if (Math.abs(newEnd - end) > _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) {
|
|
1339
1339
|
if (e.ripple) {
|
|
1340
1340
|
const tracks = this.rippleTracks([track]);
|
|
1341
1341
|
if (newEnd < end) {
|
|
@@ -1364,11 +1364,11 @@ var Editor = (_class = class {
|
|
|
1364
1364
|
case "slip_clip": {
|
|
1365
1365
|
const { track, clip } = this.clip(e.clip);
|
|
1366
1366
|
this.unlocked(track);
|
|
1367
|
-
if (clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${
|
|
1367
|
+
if (clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${_chunkLBDC5434cjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to slip; only video, audio and compound clips slip.`);
|
|
1368
1368
|
const source = clip.type === "sequence" ? `sequence "${clip.sequence}"` : `"${this.asset(clip.asset).id}"`;
|
|
1369
1369
|
if (clip.type === "media" && this.asset(clip.asset).kind === "image") refuse(`Clip "${clip.id}" is a still ("${clip.asset}"), so it has no source to slip; only video and audio clips slip.`);
|
|
1370
|
-
const handles =
|
|
1371
|
-
const { lead, tail } =
|
|
1370
|
+
const handles = _chunkLBDC5434cjs.videoClipHandles.call(void 0, clip, _chunkLBDC5434cjs.videoAssetMap.call(void 0, this.p), _chunkLBDC5434cjs.videoSequenceMap.call(void 0, this.p));
|
|
1371
|
+
const { lead, tail } = _chunkLBDC5434cjs.videoClipOverhang.call(void 0, track, clip);
|
|
1372
1372
|
const delta = this.clamp(
|
|
1373
1373
|
e.delta,
|
|
1374
1374
|
lead - handles.before,
|
|
@@ -1386,13 +1386,13 @@ var Editor = (_class = class {
|
|
|
1386
1386
|
this.unlocked(track);
|
|
1387
1387
|
const L = left.clip;
|
|
1388
1388
|
const R = right.clip;
|
|
1389
|
-
if (Math.abs(
|
|
1390
|
-
if (Math.abs(
|
|
1391
|
-
refuse(`"${L.id}" ends at ${
|
|
1389
|
+
if (Math.abs(_chunkLBDC5434cjs.videoClipEnd.call(void 0, L) - R.start) > _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) {
|
|
1390
|
+
if (Math.abs(_chunkLBDC5434cjs.videoClipEnd.call(void 0, R) - L.start) <= _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) refuse(`"${R.id}" comes before "${L.id}"; pass left "${R.id}" and right "${L.id}".`);
|
|
1391
|
+
refuse(`"${L.id}" ends at ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, _chunkLBDC5434cjs.videoClipEnd.call(void 0, L))} but "${R.id}" starts at ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, R.start)}; a roll needs two clips that meet at a cut (use trim_clip to move one edge).`);
|
|
1392
1392
|
}
|
|
1393
|
-
const assets =
|
|
1394
|
-
const lo = Math.max(-(L.duration - this.frame), -(
|
|
1395
|
-
const hi = Math.min(R.duration - this.frame,
|
|
1393
|
+
const assets = _chunkLBDC5434cjs.videoAssetMap.call(void 0, this.p);
|
|
1394
|
+
const lo = Math.max(-(L.duration - this.frame), -(_chunkLBDC5434cjs.videoClipHandles.call(void 0, R, assets, _chunkLBDC5434cjs.videoSequenceMap.call(void 0, this.p)).before - _chunkLBDC5434cjs.videoClipOverhang.call(void 0, track, R).lead));
|
|
1395
|
+
const hi = Math.min(R.duration - this.frame, _chunkLBDC5434cjs.videoClipHandles.call(void 0, L, assets, _chunkLBDC5434cjs.videoSequenceMap.call(void 0, this.p)).after - _chunkLBDC5434cjs.videoClipOverhang.call(void 0, track, L).tail);
|
|
1396
1396
|
const delta = this.clamp(
|
|
1397
1397
|
e.delta,
|
|
1398
1398
|
lo,
|
|
@@ -1408,18 +1408,18 @@ var Editor = (_class = class {
|
|
|
1408
1408
|
case "slide_clip": {
|
|
1409
1409
|
const { track, clip } = this.clip(e.clip);
|
|
1410
1410
|
this.unlocked(track);
|
|
1411
|
-
const before =
|
|
1412
|
-
const after =
|
|
1411
|
+
const before = _chunkLBDC5434cjs.videoClipBefore.call(void 0, track, clip);
|
|
1412
|
+
const after = _chunkLBDC5434cjs.videoClipAfter.call(void 0, track, clip);
|
|
1413
1413
|
if (!before && !after) refuse(`"${clip.id}" has no clip right before or after it on track "${track.id}", so there is nothing to slide against; use move_clip.`);
|
|
1414
|
-
const assets =
|
|
1415
|
-
const end =
|
|
1414
|
+
const assets = _chunkLBDC5434cjs.videoAssetMap.call(void 0, this.p);
|
|
1415
|
+
const end = _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip);
|
|
1416
1416
|
const others = track.clips.filter((c) => c !== clip);
|
|
1417
1417
|
const room = {
|
|
1418
|
-
earlier: before ? before.duration - this.frame : clip.start - others.filter((c) =>
|
|
1419
|
-
later: after ? after.duration - this.frame : others.filter((c) => c.start >= end -
|
|
1418
|
+
earlier: before ? before.duration - this.frame : clip.start - others.filter((c) => _chunkLBDC5434cjs.videoClipEnd.call(void 0, c) <= clip.start + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.max(m, _chunkLBDC5434cjs.videoClipEnd.call(void 0, c)), 0),
|
|
1419
|
+
later: after ? after.duration - this.frame : others.filter((c) => c.start >= end - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.min(m, c.start - end), Infinity)
|
|
1420
1420
|
};
|
|
1421
|
-
const lo = -Math.min(room.earlier, after ?
|
|
1422
|
-
const hi = Math.min(room.later, before ?
|
|
1421
|
+
const lo = -Math.min(room.earlier, after ? _chunkLBDC5434cjs.videoClipHandles.call(void 0, after, assets, _chunkLBDC5434cjs.videoSequenceMap.call(void 0, this.p)).before - _chunkLBDC5434cjs.videoClipOverhang.call(void 0, track, after).lead : Infinity);
|
|
1422
|
+
const hi = Math.min(room.later, before ? _chunkLBDC5434cjs.videoClipHandles.call(void 0, before, assets, _chunkLBDC5434cjs.videoSequenceMap.call(void 0, this.p)).after - _chunkLBDC5434cjs.videoClipOverhang.call(void 0, track, before).tail : Infinity);
|
|
1423
1423
|
const delta = this.clamp(
|
|
1424
1424
|
e.delta,
|
|
1425
1425
|
lo,
|
|
@@ -1452,29 +1452,29 @@ var Editor = (_class = class {
|
|
|
1452
1452
|
}
|
|
1453
1453
|
case "split_at": {
|
|
1454
1454
|
const tracks = this.rangeTracks(e.tracks);
|
|
1455
|
-
const lefts = tracks.flatMap((t) => t.clips.filter((c) => c.start < e.at -
|
|
1456
|
-
if (!lefts.length) refuse(`No clip runs across ${
|
|
1455
|
+
const lefts = tracks.flatMap((t) => t.clips.filter((c) => c.start < e.at - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON && _chunkLBDC5434cjs.videoClipEnd.call(void 0, c) > e.at + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON).map((c) => c.id));
|
|
1456
|
+
if (!lefts.length) refuse(`No clip runs across ${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, e.at)} on ${e.tracks ? `track${tracks.length > 1 ? "s" : ""} ${tracks.map((t) => `"${t.id}"`).join(", ")}` : "the unlocked tracks"}, so there is nothing to split there.`);
|
|
1457
1457
|
const created = this.cutAcross(tracks, e.at).map((c) => c.id);
|
|
1458
1458
|
return this.outcomes.push({ op: e.op, clips: lefts, created });
|
|
1459
1459
|
}
|
|
1460
1460
|
case "set_keyframes": {
|
|
1461
1461
|
const { track, clip } = this.clip(e.clip);
|
|
1462
1462
|
this.unlocked(track);
|
|
1463
|
-
if (!
|
|
1463
|
+
if (!_chunkLBDC5434cjs.VIDEO_KEYFRAME_PROPERTIES.includes(e.property)) refuse(`"${e.property}" cannot be keyframed; use one of ${_chunkLBDC5434cjs.VIDEO_KEYFRAME_PROPERTIES.join(", ")}.`);
|
|
1464
1464
|
if (e.property === "volume" && clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${clip.type} clip and has no volume; volume keys go on media and compound clips.`);
|
|
1465
|
-
const limits =
|
|
1466
|
-
const transform =
|
|
1465
|
+
const limits = _chunkLBDC5434cjs.VIDEO_KEYFRAME_LIMITS[e.property];
|
|
1466
|
+
const transform = _chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES.includes(e.property);
|
|
1467
1467
|
const c = clip;
|
|
1468
1468
|
const current = transform ? _optionalChain([c, 'access', _23 => _23.transform, 'optionalAccess', _24 => _24[e.property]]) : c[e.property];
|
|
1469
1469
|
let value;
|
|
1470
1470
|
if (e.keys === null) {
|
|
1471
|
-
const v =
|
|
1472
|
-
value =
|
|
1471
|
+
const v = _chunkLBDC5434cjs.videoValueAt.call(void 0, current, 0, limits.default);
|
|
1472
|
+
value = _chunkLBDC5434cjs.isVideoKeyframes.call(void 0, current) ? v === limits.default ? void 0 : v : current;
|
|
1473
1473
|
} else {
|
|
1474
1474
|
if (!Array.isArray(e.keys) || !e.keys.length) refuse('"keys" must list at least one key { t, v }; pass null to remove the keyframes.');
|
|
1475
1475
|
let sorted = [];
|
|
1476
1476
|
try {
|
|
1477
|
-
sorted =
|
|
1477
|
+
sorted = _chunkLBDC5434cjs.sortVideoKeys.call(void 0, e.keys);
|
|
1478
1478
|
} catch (error) {
|
|
1479
1479
|
refuse(error.message);
|
|
1480
1480
|
}
|
|
@@ -1493,12 +1493,12 @@ var Editor = (_class = class {
|
|
|
1493
1493
|
this.unlocked(track);
|
|
1494
1494
|
let at = 0;
|
|
1495
1495
|
const moved = [];
|
|
1496
|
-
for (const clip of
|
|
1497
|
-
if (clip.start >= (_nullishCoalesce(e.from, () => ( 0))) -
|
|
1496
|
+
for (const clip of _chunkLBDC5434cjs.sortedVideoClips.call(void 0, track)) {
|
|
1497
|
+
if (clip.start >= (_nullishCoalesce(e.from, () => ( 0))) - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON && clip.start > at + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) {
|
|
1498
1498
|
clip.start = Math.max(at, _nullishCoalesce(e.from, () => ( 0)));
|
|
1499
1499
|
moved.push(clip.id);
|
|
1500
1500
|
}
|
|
1501
|
-
at = Math.max(at,
|
|
1501
|
+
at = Math.max(at, _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip));
|
|
1502
1502
|
}
|
|
1503
1503
|
return this.outcomes.push({ op: e.op, track: track.id, clips: moved });
|
|
1504
1504
|
}
|
|
@@ -1628,7 +1628,7 @@ function videoTranscriptTrack(project, track) {
|
|
|
1628
1628
|
if (!project.tracks.some((t) => t.id === track)) throw new Error(`There is no track "${track}"; the tracks are ${project.tracks.map((t) => `"${t.id}"`).join(", ")}.`);
|
|
1629
1629
|
return track;
|
|
1630
1630
|
}
|
|
1631
|
-
const assets =
|
|
1631
|
+
const assets = _chunkLBDC5434cjs.videoAssetMap.call(void 0, project);
|
|
1632
1632
|
const transcribed = (t) => t.clips.some((c) => c.type === "media" && _optionalChain([assets, 'access', _26 => _26.get, 'call', _27 => _27(c.asset), 'optionalAccess', _28 => _28.transcript, 'optionalAccess', _29 => _29.length]));
|
|
1633
1633
|
return _nullishCoalesce(_optionalChain([(_nullishCoalesce(project.tracks.find((t) => t.kind === "audio" && transcribed(t)), () => ( project.tracks.find(transcribed)))), 'optionalAccess', _30 => _30.id]), () => ( null));
|
|
1634
1634
|
}
|
|
@@ -1636,16 +1636,16 @@ function videoTimelineTranscript(project, options = {}) {
|
|
|
1636
1636
|
const id = videoTranscriptTrack(project, options.track);
|
|
1637
1637
|
if (!id) return [];
|
|
1638
1638
|
const track = project.tracks.find((t) => t.id === id);
|
|
1639
|
-
const assets =
|
|
1639
|
+
const assets = _chunkLBDC5434cjs.videoAssetMap.call(void 0, project);
|
|
1640
1640
|
const out = [];
|
|
1641
|
-
for (const clip of
|
|
1641
|
+
for (const clip of _chunkLBDC5434cjs.sortedVideoClips.call(void 0, track)) {
|
|
1642
1642
|
if (clip.type !== "media") continue;
|
|
1643
1643
|
const words = _optionalChain([assets, 'access', _31 => _31.get, 'call', _32 => _32(clip.asset), 'optionalAccess', _33 => _33.transcript]);
|
|
1644
1644
|
if (!_optionalChain([words, 'optionalAccess', _34 => _34.length])) continue;
|
|
1645
|
-
const speed =
|
|
1645
|
+
const speed = _chunkLBDC5434cjs.videoClipSpeed.call(void 0, clip);
|
|
1646
1646
|
const from = _nullishCoalesce(clip.in, () => ( 0));
|
|
1647
1647
|
const to = from + clip.duration * speed;
|
|
1648
|
-
const toTimeline = (s) => Math.min(
|
|
1648
|
+
const toTimeline = (s) => Math.min(_chunkLBDC5434cjs.videoClipEnd.call(void 0, clip), Math.max(clip.start, clip.start + (s - from) / speed));
|
|
1649
1649
|
words.forEach((w, index) => {
|
|
1650
1650
|
const mid = (w.start + w.end) / 2;
|
|
1651
1651
|
if (mid < from || mid >= to) return;
|
|
@@ -1690,19 +1690,19 @@ function findVideoTranscriptPauses(words, options = {}) {
|
|
|
1690
1690
|
let to = b.start - keep;
|
|
1691
1691
|
if (options.fps) {
|
|
1692
1692
|
const f = 1e3 / options.fps;
|
|
1693
|
-
from =
|
|
1694
|
-
to =
|
|
1693
|
+
from = _chunkLBDC5434cjs.snapToVideoFrame.call(void 0, Math.ceil(from / f - 1e-9) * f, options.fps);
|
|
1694
|
+
to = _chunkLBDC5434cjs.snapToVideoFrame.call(void 0, Math.floor(to / f + 1e-9) * f, options.fps);
|
|
1695
1695
|
}
|
|
1696
|
-
if (to - from >
|
|
1696
|
+
if (to - from > _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) out.push({ from, to, text: `(pause after "${a.word}")` });
|
|
1697
1697
|
}
|
|
1698
1698
|
return out;
|
|
1699
1699
|
}
|
|
1700
1700
|
function mergeVideoRanges(ranges) {
|
|
1701
|
-
const sorted = ranges.filter((r) => r.to - r.from >
|
|
1701
|
+
const sorted = ranges.filter((r) => r.to - r.from > _chunkLBDC5434cjs.VIDEO_TIME_EPSILON).map((r) => ({ from: r.from, to: r.to })).sort((a, b) => a.from - b.from);
|
|
1702
1702
|
const out = [];
|
|
1703
1703
|
for (const r of sorted) {
|
|
1704
1704
|
const last = out[out.length - 1];
|
|
1705
|
-
if (last && r.from <= last.to +
|
|
1705
|
+
if (last && r.from <= last.to + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) last.to = Math.max(last.to, r.to);
|
|
1706
1706
|
else out.push(r);
|
|
1707
1707
|
}
|
|
1708
1708
|
return out;
|
|
@@ -1748,7 +1748,7 @@ function findVideoRepetitions(words, options = {}) {
|
|
|
1748
1748
|
var VIDEO_DISFLUENCY_KINDS = ["filler", "pause", "repetition"];
|
|
1749
1749
|
function detectVideoDisfluencies(words, options = {}) {
|
|
1750
1750
|
const kinds = new Set(_nullishCoalesce(options.kinds, () => ( VIDEO_DISFLUENCY_KINDS)));
|
|
1751
|
-
const startIndex = (time) => Math.max(0, words.findIndex((w) => w.start >= time -
|
|
1751
|
+
const startIndex = (time) => Math.max(0, words.findIndex((w) => w.start >= time - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON));
|
|
1752
1752
|
const out = [];
|
|
1753
1753
|
if (kinds.has("filler"))
|
|
1754
1754
|
for (const r of findVideoFillers(words, options.fillers)) {
|
|
@@ -1762,13 +1762,13 @@ function detectVideoDisfluencies(words, options = {}) {
|
|
|
1762
1762
|
}
|
|
1763
1763
|
if (kinds.has("pause"))
|
|
1764
1764
|
for (const r of findVideoTranscriptPauses(words, options.pauses)) {
|
|
1765
|
-
const after = words.findIndex((w) => w.start >= r.to -
|
|
1765
|
+
const after = words.findIndex((w) => w.start >= r.to - _chunkLBDC5434cjs.VIDEO_TIME_EPSILON);
|
|
1766
1766
|
out.push({ ...r, kind: "pause", words: [Math.max(0, after - 1), Math.max(0, after)] });
|
|
1767
1767
|
}
|
|
1768
1768
|
return out.sort((a, b) => a.from - b.from || a.to - b.to);
|
|
1769
1769
|
}
|
|
1770
1770
|
function videoCutsWithMargin(ranges, keep) {
|
|
1771
|
-
return ranges.map((r) => ({ ...r, from: r.from + keep, to: r.to - keep })).filter((r) => r.to - r.from >
|
|
1771
|
+
return ranges.map((r) => ({ ...r, from: r.from + keep, to: r.to - keep })).filter((r) => r.to - r.from > _chunkLBDC5434cjs.VIDEO_TIME_EPSILON);
|
|
1772
1772
|
}
|
|
1773
1773
|
|
|
1774
1774
|
// src/video-editor/mix.ts
|
|
@@ -1874,7 +1874,7 @@ function videoDuckingKeys(clip, speech, options = {}) {
|
|
|
1874
1874
|
const gap = Math.max(_nullishCoalesce(options.mergeGap, () => ( 600)), attack + release);
|
|
1875
1875
|
const base = _nullishCoalesce(options.base, () => ( 1));
|
|
1876
1876
|
const low = Math.round(base * 10 ** (duckDb / 20) * 1e4) / 1e4;
|
|
1877
|
-
const end =
|
|
1877
|
+
const end = _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip);
|
|
1878
1878
|
const ranges = [];
|
|
1879
1879
|
for (const r of mergeVideoRanges(speech)) {
|
|
1880
1880
|
if (r.to <= clip.start - release || r.from >= end + attack) continue;
|
|
@@ -2079,7 +2079,7 @@ function videoClipWaveform(clip, peaks, columns) {
|
|
|
2079
2079
|
const step = clip.duration / Math.max(1, n);
|
|
2080
2080
|
for (let c = 0; c < n; c++) {
|
|
2081
2081
|
const { min, max } = videoAudioPeakRange(peaks, start + c * step * speed, start + (c + 1) * step * speed);
|
|
2082
|
-
const gain =
|
|
2082
|
+
const gain = _chunkLBDC5434cjs.videoClipSoundGain.call(void 0, clip, (c + 0.5) * step);
|
|
2083
2083
|
out[2 * c] = min * gain;
|
|
2084
2084
|
out[2 * c + 1] = max * gain;
|
|
2085
2085
|
}
|
|
@@ -2212,8 +2212,8 @@ function videoClipPicture(project, clip) {
|
|
|
2212
2212
|
const asset = clip.type === "media" ? project.assets.find((a) => a.id === clip.asset) : void 0;
|
|
2213
2213
|
const size = asset ? { width: _nullishCoalesce(asset.width, () => ( project.width)), height: _nullishCoalesce(asset.height, () => ( project.height)) } : { width: project.width, height: project.height };
|
|
2214
2214
|
const fit = _nullishCoalesce(clip.fit, () => ( (clip.type === "media" || clip.type === "sequence" ? "contain" : "fill")));
|
|
2215
|
-
const rect =
|
|
2216
|
-
return { size, rect, rotation:
|
|
2215
|
+
const rect = _chunkLBDC5434cjs.placeVideoRect.call(void 0, project, size, clip.type === "text" ? "fill" : fit, clip.transform, 0);
|
|
2216
|
+
return { size, rect, rotation: _chunkLBDC5434cjs.videoTransformAt.call(void 0, clip.transform, 0).rotation };
|
|
2217
2217
|
}
|
|
2218
2218
|
function turn(x, y, cx, cy, deg) {
|
|
2219
2219
|
if (!deg) return [x, y];
|
|
@@ -2239,7 +2239,7 @@ function videoClipMaskOutline(project, clip) {
|
|
|
2239
2239
|
const { rect, rotation } = picture;
|
|
2240
2240
|
const cx = rect.x + rect.width / 2;
|
|
2241
2241
|
const cy = rect.y + rect.height / 2;
|
|
2242
|
-
const polygon =
|
|
2242
|
+
const polygon = _chunkLBDC5434cjs.videoMaskPolygon.call(void 0, clip.mask, rect).map(([x, y]) => turn(x, y, cx, cy, rotation));
|
|
2243
2243
|
if (polygon.length < 2) return null;
|
|
2244
2244
|
return [...polygon, polygon[0]].flatMap(([x, y]) => [Math.round(x * 100) / 100, Math.round(y * 100) / 100]);
|
|
2245
2245
|
}
|
|
@@ -2277,7 +2277,7 @@ var VideoPathGesture = (_class3 = class {
|
|
|
2277
2277
|
// src/video-editor/plan.ts
|
|
2278
2278
|
function clipIndex(project) {
|
|
2279
2279
|
const out = /* @__PURE__ */ new Map();
|
|
2280
|
-
for (const { track } of
|
|
2280
|
+
for (const { track } of _chunkLBDC5434cjs.allVideoTracks.call(void 0, project)) for (const c of track.clips) out.set(c.id, c);
|
|
2281
2281
|
return out;
|
|
2282
2282
|
}
|
|
2283
2283
|
function diffVideoProjects(before, after) {
|
|
@@ -2286,8 +2286,8 @@ function diffVideoProjects(before, after) {
|
|
|
2286
2286
|
const clipsAdded = [...b.keys()].filter((id) => !a.has(id));
|
|
2287
2287
|
const clipsRemoved = [...a.keys()].filter((id) => !b.has(id));
|
|
2288
2288
|
const clipsChanged = [...b.keys()].filter((id) => a.has(id) && JSON.stringify(a.get(id)) !== JSON.stringify(b.get(id)));
|
|
2289
|
-
const durationBefore =
|
|
2290
|
-
const durationAfter =
|
|
2289
|
+
const durationBefore = _chunkLBDC5434cjs.videoProjectDuration.call(void 0, before);
|
|
2290
|
+
const durationAfter = _chunkLBDC5434cjs.videoProjectDuration.call(void 0, after);
|
|
2291
2291
|
return { durationBefore, durationAfter, durationDelta: durationAfter - durationBefore, clipsAdded, clipsRemoved, clipsChanged };
|
|
2292
2292
|
}
|
|
2293
2293
|
function planVideoEdits(project, input) {
|
|
@@ -2714,10 +2714,10 @@ function videoTransformOfView(view, base, stage) {
|
|
|
2714
2714
|
function videoCameraBase(clip) {
|
|
2715
2715
|
if (clip.camera) return clip.camera.base;
|
|
2716
2716
|
const t = _nullishCoalesce(clip.transform, () => ( {}));
|
|
2717
|
-
const keyed =
|
|
2717
|
+
const keyed = _chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES.filter((p) => _chunkLBDC5434cjs.isVideoKeyframes.call(void 0, t[p]));
|
|
2718
2718
|
if (keyed.length)
|
|
2719
2719
|
throw new Error(`Clip "${clip.id}" keys its ${keyed.join(", ")}, which a camera move would replace; remove those keyframes first (set_video_keyframes with keys null).`);
|
|
2720
|
-
return Object.fromEntries(
|
|
2720
|
+
return Object.fromEntries(_chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => typeof t[p] === "number" ? [[p, t[p]]] : []));
|
|
2721
2721
|
}
|
|
2722
2722
|
async function bakeVideoClipCamera(clip, camera, project, provider) {
|
|
2723
2723
|
const stage = { width: project.width, height: project.height };
|
|
@@ -2756,7 +2756,7 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
|
|
|
2756
2756
|
const base = videoCameraBase(clip);
|
|
2757
2757
|
const transforms = keys.map((k) => ({ t: Math.round(k.t * 1e3) / 1e3, value: videoTransformOfView(k.view, base, stage) }));
|
|
2758
2758
|
const transform = {};
|
|
2759
|
-
for (const p of
|
|
2759
|
+
for (const p of _chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES) {
|
|
2760
2760
|
const out = [];
|
|
2761
2761
|
for (const { t, value } of transforms) {
|
|
2762
2762
|
const last = out[out.length - 1];
|
|
@@ -2999,7 +2999,7 @@ function videoProxyFfmpeg(asset, options = {}) {
|
|
|
2999
2999
|
output
|
|
3000
3000
|
];
|
|
3001
3001
|
const proxy = { scale, src: output, ...asset.width && asset.height ? { width: Math.trunc(asset.width * scale / 2) * 2, height: Math.trunc(asset.height * scale / 2) * 2 } : {} };
|
|
3002
|
-
return { asset: asset.id, args, command: ["ffmpeg", ...args].map(
|
|
3002
|
+
return { asset: asset.id, args, command: ["ffmpeg", ...args].map(_chunkLBDC5434cjs.videoShellQuote).join(" "), proxy };
|
|
3003
3003
|
}
|
|
3004
3004
|
function videoProxyPlan(project, options = {}) {
|
|
3005
3005
|
const scale = _nullishCoalesce(options.scale, () => ( 0.5));
|
|
@@ -3025,7 +3025,7 @@ var videoSourceFrameTime = (frame, fps) => (frame + 0.5) * 1e3 / fps;
|
|
|
3025
3025
|
var videoFrameCacheKey = (src, frame) => `${frame}@${src}`;
|
|
3026
3026
|
function videoFrameRequestsAt(project, time, srcFor = (l) => l.src) {
|
|
3027
3027
|
const out = [];
|
|
3028
|
-
for (const layer of
|
|
3028
|
+
for (const layer of _chunkLBDC5434cjs.videoFrameLeafLayers.call(void 0, _chunkLBDC5434cjs.videoFrameAt.call(void 0, project, time).layers)) {
|
|
3029
3029
|
if (layer.type !== "media" || layer.assetKind !== "video") continue;
|
|
3030
3030
|
const src = srcFor(layer);
|
|
3031
3031
|
if (!src) continue;
|
|
@@ -3366,7 +3366,7 @@ var VideoPreviewEngine = (_class7 = class {
|
|
|
3366
3366
|
if (this.destroyed) return;
|
|
3367
3367
|
const state = this.source.getState();
|
|
3368
3368
|
const { project, time, playing } = state;
|
|
3369
|
-
const frame =
|
|
3369
|
+
const frame = _chunkLBDC5434cjs.videoFrameAt.call(void 0, project, time);
|
|
3370
3370
|
const scale = resolveVideoPreviewScale(_nullishCoalesce(this.options.previewScale, () => ( state.previewScale)), this.resolutionFor(project.width));
|
|
3371
3371
|
const assets = new Map(project.assets.map((a) => [a.id, a]));
|
|
3372
3372
|
this.srcFor = (layer) => videoPreviewSrc(assets.get(_nullishCoalesce(layer.asset, () => ( ""))), scale, layer.src);
|
|
@@ -3396,7 +3396,7 @@ var VideoPreviewEngine = (_class7 = class {
|
|
|
3396
3396
|
}
|
|
3397
3397
|
};
|
|
3398
3398
|
const sounding = new Map(frame.audio.map((a) => [a.clip, a]));
|
|
3399
|
-
for (const layer of
|
|
3399
|
+
for (const layer of _chunkLBDC5434cjs.videoFrameLeafLayers.call(void 0, frame.layers)) {
|
|
3400
3400
|
if (layer.type !== "media" || layer.assetKind !== "video" || !layer.src) continue;
|
|
3401
3401
|
const sound = sounding.get(layer.clip);
|
|
3402
3402
|
sync(layer.clip, this.srcFor(layer), "video", _nullishCoalesce(layer.sourceTime, () => ( 0)), _nullishCoalesce(_optionalChain([sound, 'optionalAccess', _93 => _93.speed]), () => ( 1)), sound ? sound.gain : null);
|
|
@@ -3408,9 +3408,9 @@ var VideoPreviewEngine = (_class7 = class {
|
|
|
3408
3408
|
}
|
|
3409
3409
|
/** With effects, the frame is drawn at the start of its frame, so effect pictures are cached once per frame. */
|
|
3410
3410
|
drawable(project, frame) {
|
|
3411
|
-
if (!_optionalChain([this, 'access', _94 => _94.effects, 'optionalAccess', _95 => _95.available]) || !
|
|
3412
|
-
const at =
|
|
3413
|
-
return at === frame.time ? frame : { ...
|
|
3411
|
+
if (!_optionalChain([this, 'access', _94 => _94.effects, 'optionalAccess', _95 => _95.available]) || !_chunkLBDC5434cjs.videoLayersUseEffects.call(void 0, frame.layers)) return frame;
|
|
3412
|
+
const at = _chunkLBDC5434cjs.videoEffectFrameTime.call(void 0, frame.time, project.fps);
|
|
3413
|
+
return at === frame.time ? frame : { ..._chunkLBDC5434cjs.videoFrameAt.call(void 0, project, at), time: frame.time };
|
|
3414
3414
|
}
|
|
3415
3415
|
redraw() {
|
|
3416
3416
|
if (this.scheduled || this.destroyed) return;
|
|
@@ -3419,7 +3419,7 @@ var VideoPreviewEngine = (_class7 = class {
|
|
|
3419
3419
|
this.scheduled = false;
|
|
3420
3420
|
if (this.destroyed) return;
|
|
3421
3421
|
const { project, time } = this.source.getState();
|
|
3422
|
-
this.draw(this.drawable(project,
|
|
3422
|
+
this.draw(this.drawable(project, _chunkLBDC5434cjs.videoFrameAt.call(void 0, project, time)));
|
|
3423
3423
|
});
|
|
3424
3424
|
}
|
|
3425
3425
|
__init42() {this.sourceFor = (layer) => {
|
|
@@ -3462,7 +3462,7 @@ var VideoPreviewEngine = (_class7 = class {
|
|
|
3462
3462
|
if (!source) this.complete = false;
|
|
3463
3463
|
return source;
|
|
3464
3464
|
};
|
|
3465
|
-
|
|
3465
|
+
_chunkLBDC5434cjs.drawVideoFrame.call(void 0, this.ctx, frame, sourceFor, resolution, {
|
|
3466
3466
|
defineSvgFilter: this.defineSvgFilter,
|
|
3467
3467
|
lutFor: this.lutFor,
|
|
3468
3468
|
scratch: this.scratch,
|
|
@@ -3535,7 +3535,7 @@ var VideoPreviewEngine = (_class7 = class {
|
|
|
3535
3535
|
var svgUrl = (svg) => svg.trimStart().startsWith("<") ? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}` : svg;
|
|
3536
3536
|
var GROUPS = ["base", "background", "subject", "overlay", "text"];
|
|
3537
3537
|
function videoEditsFromSequence(project, sequence, options = {}) {
|
|
3538
|
-
const at = _nullishCoalesce(options.at, () => (
|
|
3538
|
+
const at = _nullishCoalesce(options.at, () => ( _chunkLBDC5434cjs.videoProjectDuration.call(void 0, project)));
|
|
3539
3539
|
const W = project.width;
|
|
3540
3540
|
const H = project.height;
|
|
3541
3541
|
const sx = W / sequence.stage.width;
|
|
@@ -3543,7 +3543,7 @@ function videoEditsFromSequence(project, sequence, options = {}) {
|
|
|
3543
3543
|
const timing = _chunk557BDWKOcjs.effectSequenceTiming.call(void 0, sequence);
|
|
3544
3544
|
const provider = options.provider ? { provider: options.provider } : {};
|
|
3545
3545
|
const notes = [];
|
|
3546
|
-
const usedClips = new Set(
|
|
3546
|
+
const usedClips = new Set(_chunkLBDC5434cjs.allVideoClipIds.call(void 0, project));
|
|
3547
3547
|
const usedTracks = new Set(project.tracks.map((t) => t.id));
|
|
3548
3548
|
const usedAssets = new Set(project.assets.map((a) => a.id));
|
|
3549
3549
|
const fresh = (used, base) => {
|
|
@@ -3664,19 +3664,19 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3664
3664
|
__init54() {this.planBasis = /* @__PURE__ */ new Map()}
|
|
3665
3665
|
__init55() {this.planCount = 0}
|
|
3666
3666
|
constructor(options = {}) {;_class8.prototype.__init46.call(this);_class8.prototype.__init47.call(this);_class8.prototype.__init48.call(this);_class8.prototype.__init49.call(this);_class8.prototype.__init50.call(this);_class8.prototype.__init51.call(this);_class8.prototype.__init52.call(this);_class8.prototype.__init53.call(this);_class8.prototype.__init54.call(this);_class8.prototype.__init55.call(this);_class8.prototype.__init56.call(this);_class8.prototype.__init57.call(this);_class8.prototype.__init58.call(this);
|
|
3667
|
-
this.history = _nullishCoalesce(options.history, () => ( new (0,
|
|
3667
|
+
this.history = _nullishCoalesce(options.history, () => ( new (0, _chunkWPLGZBNEcjs.HistoryManager)()));
|
|
3668
3668
|
this.audioPeaks = options.audioPeaks instanceof VideoAudioPeaksCache ? options.audioPeaks : new VideoAudioPeaksCache(options.audioPeaks);
|
|
3669
|
-
this.luts = options.luts instanceof
|
|
3669
|
+
this.luts = options.luts instanceof _chunkLBDC5434cjs.VideoLutCache ? options.luts : new (0, _chunkLBDC5434cjs.VideoLutCache)(options.luts);
|
|
3670
3670
|
this.frameCache = _nullishCoalesce(options.frameCache, () => ( null));
|
|
3671
3671
|
this.effects = new (0, _chunkL2JTLW6Bcjs.EffectsSlot)();
|
|
3672
3672
|
if (options.effects) this.effects.set(options.effects);
|
|
3673
|
-
this.effectsEngine = new (0,
|
|
3673
|
+
this.effectsEngine = new (0, _chunkLBDC5434cjs.VideoEffectsEngine)({ slot: this.effects });
|
|
3674
3674
|
this.project = options.project ? parseVideoProject(options.project) : createVideoProject();
|
|
3675
3675
|
this.issues = checkVideoProject(this.project);
|
|
3676
3676
|
this.readOnly = _nullishCoalesce(options.readOnly, () => ( false));
|
|
3677
3677
|
this.previewScale = checkPreviewScale(_nullishCoalesce(options.previewScale, () => ( "auto")));
|
|
3678
3678
|
this.onChange = options.onChange;
|
|
3679
|
-
this.player = new (0, _chunkM5GLQQWGcjs.AnimationPlayer)({ clock: options.clock, duration: () =>
|
|
3679
|
+
this.player = new (0, _chunkM5GLQQWGcjs.AnimationPlayer)({ clock: options.clock, duration: () => _chunkLBDC5434cjs.videoProjectDuration.call(void 0, this.project), loop: "none" });
|
|
3680
3680
|
this.state = this.computeState();
|
|
3681
3681
|
this.connect();
|
|
3682
3682
|
}
|
|
@@ -3713,12 +3713,12 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3713
3713
|
const h = this.history.getState();
|
|
3714
3714
|
return {
|
|
3715
3715
|
project: this.project,
|
|
3716
|
-
duration:
|
|
3716
|
+
duration: _chunkLBDC5434cjs.videoProjectDuration.call(void 0, this.project),
|
|
3717
3717
|
time: p.time,
|
|
3718
3718
|
playing: p.playing,
|
|
3719
3719
|
loop: p.loop,
|
|
3720
3720
|
selection: this.selection,
|
|
3721
|
-
current:
|
|
3721
|
+
current: _chunkLBDC5434cjs.videoClipsAt.call(void 0, this.project, p.time).map((c) => c.clip.id),
|
|
3722
3722
|
issues: this.issues,
|
|
3723
3723
|
readOnly: this.readOnly,
|
|
3724
3724
|
error: this.error,
|
|
@@ -3752,7 +3752,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3752
3752
|
this.issues = checkVideoProject(project);
|
|
3753
3753
|
const ids = new Set(project.tracks.flatMap((t) => t.clips.map((c) => c.id)));
|
|
3754
3754
|
if (this.selection.some((id) => !ids.has(id))) this.selection = this.selection.filter((id) => ids.has(id));
|
|
3755
|
-
this.player.setDuration(() =>
|
|
3755
|
+
this.player.setDuration(() => _chunkLBDC5434cjs.videoProjectDuration.call(void 0, this.project));
|
|
3756
3756
|
} finally {
|
|
3757
3757
|
this.applying = false;
|
|
3758
3758
|
}
|
|
@@ -3914,7 +3914,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3914
3914
|
}
|
|
3915
3915
|
/** Selects clips (unknown ids are dropped). `add` toggles them into the current selection. */
|
|
3916
3916
|
select(clips, options = {}) {
|
|
3917
|
-
const known = _nullishCoalesce(_optionalChain([clips, 'optionalAccess', _117 => _117.filter, 'call', _118 => _118((id) =>
|
|
3917
|
+
const known = _nullishCoalesce(_optionalChain([clips, 'optionalAccess', _117 => _117.filter, 'call', _118 => _118((id) => _chunkLBDC5434cjs.findVideoClip.call(void 0, this.project, id))]), () => ( []));
|
|
3918
3918
|
let next;
|
|
3919
3919
|
if (options.add) {
|
|
3920
3920
|
next = [...this.selection];
|
|
@@ -3941,7 +3941,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3941
3941
|
step(frames) {
|
|
3942
3942
|
this.player.pause();
|
|
3943
3943
|
const fps = this.project.fps;
|
|
3944
|
-
this.player.seek(Math.max(0,
|
|
3944
|
+
this.player.seek(Math.max(0, _chunkLBDC5434cjs.snapToVideoFrame.call(void 0, this.player.currentTime, fps) + frames * 1e3 / fps));
|
|
3945
3945
|
}
|
|
3946
3946
|
setLoop(loop) {
|
|
3947
3947
|
this.player.setLoop(loop);
|
|
@@ -3958,14 +3958,14 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3958
3958
|
*/
|
|
3959
3959
|
snap(time, options = {}) {
|
|
3960
3960
|
const threshold = _nullishCoalesce(options.threshold, () => ( 8 * 1e3 / this.project.fps));
|
|
3961
|
-
const points =
|
|
3962
|
-
const hit =
|
|
3963
|
-
return hit.snapped !== null ? hit : { time: Math.max(0,
|
|
3961
|
+
const points = _chunkLBDC5434cjs.videoSnapPoints.call(void 0, this.project, { exclude: options.exclude, playhead: options.playhead === false ? void 0 : this.player.currentTime });
|
|
3962
|
+
const hit = _chunkLBDC5434cjs.snapVideoTime.call(void 0, time, points, threshold);
|
|
3963
|
+
return hit.snapped !== null ? hit : { time: Math.max(0, _chunkLBDC5434cjs.snapToVideoFrame.call(void 0, time, this.project.fps)), snapped: null };
|
|
3964
3964
|
}
|
|
3965
3965
|
/** Splits the selected clips (or every clip) under the playhead there, as one undo step. */
|
|
3966
3966
|
splitAtPlayhead() {
|
|
3967
|
-
const t =
|
|
3968
|
-
const under =
|
|
3967
|
+
const t = _chunkLBDC5434cjs.snapToVideoFrame.call(void 0, this.player.currentTime, this.project.fps);
|
|
3968
|
+
const under = _chunkLBDC5434cjs.videoClipsAt.call(void 0, this.project, t).filter(({ clip }) => t > clip.start && t < _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip));
|
|
3969
3969
|
const chosen = this.selection.length ? under.filter(({ clip }) => this.selection.includes(clip.id)) : under;
|
|
3970
3970
|
if (!chosen.length) return this.refuse("No clip is under the playhead to split.");
|
|
3971
3971
|
return this.apply(chosen.map(({ clip }) => ({ op: "split_clip", clip: clip.id, at: t })), "Split");
|
|
@@ -3993,7 +3993,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
3993
3993
|
/** The provider's description of an effect, checked for `place` (rejects without a provider or for an unknown id). */
|
|
3994
3994
|
async describeEffect(effect, place) {
|
|
3995
3995
|
const d = await this.effects.require().describe(effect);
|
|
3996
|
-
if (place)
|
|
3996
|
+
if (place) _chunkLBDC5434cjs.checkVideoEffectPlace.call(void 0, d, place);
|
|
3997
3997
|
return d;
|
|
3998
3998
|
}
|
|
3999
3999
|
/**
|
|
@@ -4037,7 +4037,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4037
4037
|
return { ...result, clip: plan.clip, ...plan.effect ? { effect: plan.effect() } : {} };
|
|
4038
4038
|
}
|
|
4039
4039
|
clipOrThrow(id) {
|
|
4040
|
-
const at =
|
|
4040
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, this.project, id);
|
|
4041
4041
|
if (!at) throw new Error(`There is no clip "${id}"; list_applied_effects or get_video_project lists the clips.`);
|
|
4042
4042
|
return at.clip;
|
|
4043
4043
|
}
|
|
@@ -4050,7 +4050,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4050
4050
|
return this.effectEdit(async () => {
|
|
4051
4051
|
const current = this.clipOrThrow(clip);
|
|
4052
4052
|
const d = await this.describeEffect(effect, "clip");
|
|
4053
|
-
const values =
|
|
4053
|
+
const values = _chunkLBDC5434cjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
|
|
4054
4054
|
const stack = [..._nullishCoalesce(current.effects, () => ( []))];
|
|
4055
4055
|
const taken = new Set(stack.map((e) => e.id));
|
|
4056
4056
|
let n = 1;
|
|
@@ -4086,7 +4086,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4086
4086
|
if (!(k in d.controls.properties)) throw new Error(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
|
|
4087
4087
|
base[k] = d.defaults[k];
|
|
4088
4088
|
}
|
|
4089
|
-
next.values =
|
|
4089
|
+
next.values = _chunkLBDC5434cjs.checkVideoEffectValues.call(void 0, d, given, { base, keyframes: true });
|
|
4090
4090
|
}
|
|
4091
4091
|
if (changes.enabled !== void 0) {
|
|
4092
4092
|
if (changes.enabled) delete next.enabled;
|
|
@@ -4107,7 +4107,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4107
4107
|
return (await provider.list({ kind: "camera" })).filter((e) => e.kind === "camera" && e.camera && (!role || e.camera.role === role));
|
|
4108
4108
|
}
|
|
4109
4109
|
cameraClip(id) {
|
|
4110
|
-
const at =
|
|
4110
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, this.project, id);
|
|
4111
4111
|
if (!at) {
|
|
4112
4112
|
const ids = this.project.tracks.flatMap((t) => t.clips.map((c) => c.id));
|
|
4113
4113
|
throw new Error(`There is no clip "${id}"; the clips are ${ids.map((c) => `"${c}"`).join(", ") || "none"} (get_video_project lists them).`);
|
|
@@ -4128,7 +4128,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4128
4128
|
const bake = await bakeVideoClipCamera(clip, camera, this.project, this.effects.require());
|
|
4129
4129
|
const r = this.apply({ op: "update_clip", clip: clipId, set: { camera, transform: bake.transform } }, label, { merge });
|
|
4130
4130
|
if (!r.ok) return r;
|
|
4131
|
-
const keys = Object.fromEntries(
|
|
4131
|
+
const keys = Object.fromEntries(_chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => [p, _chunkLBDC5434cjs.videoKeysOf.call(void 0, bake.transform[p]).length]));
|
|
4132
4132
|
return { ok: true, clip: clipId, camera, keys, cuts: bake.cuts, windows: bake.windows, notes: bake.notes };
|
|
4133
4133
|
}
|
|
4134
4134
|
/**
|
|
@@ -4185,7 +4185,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4185
4185
|
removeClipEffect(clip, instance) {
|
|
4186
4186
|
const reason = this.readOnlyReason();
|
|
4187
4187
|
if (reason) return this.refused(reason);
|
|
4188
|
-
const at =
|
|
4188
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, this.project, clip);
|
|
4189
4189
|
if (!at) return this.refused(`There is no clip "${clip}".`);
|
|
4190
4190
|
const stack = _nullishCoalesce(at.clip.effects, () => ( []));
|
|
4191
4191
|
const was = stack.find((e) => e.id === instance);
|
|
@@ -4202,7 +4202,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4202
4202
|
return this.effectEdit(async () => {
|
|
4203
4203
|
this.clipOrThrow(clip);
|
|
4204
4204
|
const d = await this.describeEffect(effect, "transition");
|
|
4205
|
-
const values =
|
|
4205
|
+
const values = _chunkLBDC5434cjs.checkVideoEffectValues.call(void 0, d, options.values);
|
|
4206
4206
|
const duration = _nullishCoalesce(_nullishCoalesce(options.duration, () => ( d.duration)), () => ( 1e3));
|
|
4207
4207
|
return { edit: { op: "set_transition", clip, transition: { type: "effect", duration, effect: { effect: d.id, provider: this.effects.require().id, name: d.name, values } } }, label: `Transition ${d.name}`, clip };
|
|
4208
4208
|
});
|
|
@@ -4215,7 +4215,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4215
4215
|
addEffectClip(track, effect, options = {}) {
|
|
4216
4216
|
return this.effectEdit(async () => {
|
|
4217
4217
|
const d = await this.describeEffect(effect, "generator");
|
|
4218
|
-
const values =
|
|
4218
|
+
const values = _chunkLBDC5434cjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
|
|
4219
4219
|
const duration = _nullishCoalesce(_nullishCoalesce(options.duration, () => ( d.duration)), () => ( 5e3));
|
|
4220
4220
|
const label = `Add ${d.name}`;
|
|
4221
4221
|
const clipId = _nullishCoalesce(options.id, () => ( ""));
|
|
@@ -4237,12 +4237,12 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4237
4237
|
if (part === "generator") {
|
|
4238
4238
|
if (current.type !== "effect") throw new Error(`Clip "${clip}" is not an effect clip.`);
|
|
4239
4239
|
const d2 = await this.describeEffect(current.effect);
|
|
4240
|
-
return { edit: { op: "update_clip", clip, set: { values:
|
|
4240
|
+
return { edit: { op: "update_clip", clip, set: { values: _chunkLBDC5434cjs.checkVideoEffectValues.call(void 0, d2, values, { base: _nullishCoalesce(current.values, () => ( {})), keyframes: true }) } }, label: `Change ${_nullishCoalesce(current.name, () => ( d2.name))}`, clip };
|
|
4241
4241
|
}
|
|
4242
4242
|
const t = current.transition;
|
|
4243
4243
|
if (_optionalChain([t, 'optionalAccess', _128 => _128.type]) !== "effect" || !t.effect) throw new Error(`Clip "${clip}" has no effect transition.`);
|
|
4244
4244
|
const d = await this.describeEffect(t.effect.effect);
|
|
4245
|
-
const merged =
|
|
4245
|
+
const merged = _chunkLBDC5434cjs.checkVideoEffectValues.call(void 0, d, values, { base: _nullishCoalesce(t.effect.values, () => ( {})) });
|
|
4246
4246
|
return { edit: { op: "set_transition", clip, transition: { ...t, effect: { ...t.effect, values: merged } } }, label: `Change transition ${d.name}`, clip };
|
|
4247
4247
|
}, options.merge);
|
|
4248
4248
|
}
|
|
@@ -4281,7 +4281,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4281
4281
|
if (typeof path.d !== "string") return fail2('d must be SVG path data (a string), or "" to clear the path.');
|
|
4282
4282
|
value = path.d;
|
|
4283
4283
|
} else if ("mask" in path) {
|
|
4284
|
-
const from = _optionalChain([
|
|
4284
|
+
const from = _optionalChain([_chunkLBDC5434cjs.findVideoClip.call(void 0, this.project, path.mask.clip), 'optionalAccess', _133 => _133.clip]);
|
|
4285
4285
|
if (!from) return fail2(`There is no clip "${path.mask.clip}" to take a mask from.`);
|
|
4286
4286
|
const outline = videoClipMaskOutline(this.project, from);
|
|
4287
4287
|
if (!outline) return fail2(`Clip "${path.mask.clip}" has no mask; add one with set_video_clip_mask, or pass points or d.`);
|
|
@@ -4323,31 +4323,31 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
|
|
|
4323
4323
|
}
|
|
4324
4324
|
/** Keys for one numeric control of a clip effect (clip-relative ms), or `null` to stop animating it (keeping its value at the clip's start). */
|
|
4325
4325
|
setClipEffectKeyframes(clip, instance, control, keys) {
|
|
4326
|
-
const current = _optionalChain([
|
|
4326
|
+
const current = _optionalChain([_chunkLBDC5434cjs.findVideoClip.call(void 0, this.project, clip), 'optionalAccess', _134 => _134.clip]);
|
|
4327
4327
|
const was = _optionalChain([current, 'optionalAccess', _135 => _135.effects, 'optionalAccess', _136 => _136.find, 'call', _137 => _137((e) => e.id === instance)]);
|
|
4328
4328
|
const value = _optionalChain([was, 'optionalAccess', _138 => _138.values, 'optionalAccess', _139 => _139[control]]);
|
|
4329
|
-
const plain = keys === null ?
|
|
4329
|
+
const plain = keys === null ? _chunkLBDC5434cjs.isVideoKeyframes.call(void 0, value) ? _optionalChain([value, 'access', _140 => _140.keys, 'access', _141 => _141[0], 'optionalAccess', _142 => _142.v]) : value : { keys: [...keys].sort((a, b) => a.t - b.t) };
|
|
4330
4330
|
return this.updateClipEffect(clip, instance, { values: { [control]: _nullishCoalesce(plain, () => ( null)) } });
|
|
4331
4331
|
}
|
|
4332
4332
|
/** What plays at `time` (default: the playhead). */
|
|
4333
4333
|
frame(time = this.player.currentTime) {
|
|
4334
|
-
return
|
|
4334
|
+
return _chunkLBDC5434cjs.videoFrameAt.call(void 0, this.project, time);
|
|
4335
4335
|
}
|
|
4336
4336
|
/** The frame at `time` (default: the playhead) as SVG. */
|
|
4337
4337
|
toSvg(time = this.player.currentTime, options = {}) {
|
|
4338
|
-
return
|
|
4338
|
+
return _chunkLBDC5434cjs.videoProjectSvg.call(void 0, this.project, time, { lutFor: (src) => this.luts.peek(src), ...options });
|
|
4339
4339
|
}
|
|
4340
4340
|
/** The project as an ffmpeg command. */
|
|
4341
4341
|
toFfmpeg(options = {}) {
|
|
4342
|
-
return
|
|
4342
|
+
return _chunkLBDC5434cjs.toVideoFfmpeg.call(void 0, this.project, options);
|
|
4343
4343
|
}
|
|
4344
4344
|
/** The ffmpeg command that measures the mix's loudness (see `toVideoLoudnessMeasure`). */
|
|
4345
4345
|
toLoudnessMeasure(options = {}) {
|
|
4346
|
-
return
|
|
4346
|
+
return _chunkLBDC5434cjs.toVideoLoudnessMeasure.call(void 0, this.project, options);
|
|
4347
4347
|
}
|
|
4348
4348
|
/** One track as a CMX 3600 EDL. */
|
|
4349
4349
|
toEdl(options = {}) {
|
|
4350
|
-
return
|
|
4350
|
+
return _chunkLBDC5434cjs.toVideoEdl.call(void 0, this.project, options);
|
|
4351
4351
|
}
|
|
4352
4352
|
}, _class8.__initStatic(), _class8);
|
|
4353
4353
|
function checkPreviewScale(scale) {
|
|
@@ -4415,12 +4415,12 @@ function videoRulerTicks(duration, pxPerSecond, fps) {
|
|
|
4415
4415
|
const ticks = [];
|
|
4416
4416
|
for (let t = 0; t <= duration + 1e-6; t += step) {
|
|
4417
4417
|
const isMajor = Math.abs(t / major - Math.round(t / major)) < 1e-9;
|
|
4418
|
-
ticks.push({ time: t, x: t * pxPerMs, major: isMajor, ...isMajor ? { label:
|
|
4418
|
+
ticks.push({ time: t, x: t * pxPerMs, major: isMajor, ...isMajor ? { label: _chunkLBDC5434cjs.formatVideoTimecode.call(void 0, t, fps).replace(/^00:/, "") } : {} });
|
|
4419
4419
|
}
|
|
4420
4420
|
return ticks;
|
|
4421
4421
|
}
|
|
4422
4422
|
function videoClipShowsWaveform(clip, asset, mode = "audio") {
|
|
4423
|
-
if (clip.type !== "media" || mode === "none" || !
|
|
4423
|
+
if (clip.type !== "media" || mode === "none" || !_chunkLBDC5434cjs.videoAssetHasSound.call(void 0, asset)) return false;
|
|
4424
4424
|
return mode === "all" || asset.kind === "audio";
|
|
4425
4425
|
}
|
|
4426
4426
|
var VIDEO_CLIP_ANIMATION_LABELS = {
|
|
@@ -4481,11 +4481,11 @@ function videoClipLabel(clip, asset, sequence) {
|
|
|
4481
4481
|
if (clip.type === "effect") return `Effect: ${clip.effect}`;
|
|
4482
4482
|
if (clip.type === "adjustment") return `Adjustment${clip.scope === "all" ? " (all tracks)" : clip.scope === "track" ? ` (${clip.targetTrack})` : ""}`;
|
|
4483
4483
|
const base = _nullishCoalesce(_nullishCoalesce(_optionalChain([asset, 'optionalAccess', _145 => _145.name]), () => ( _optionalChain([asset, 'optionalAccess', _146 => _146.src, 'access', _147 => _147.replace, 'call', _148 => _148(/^.*[\\/]/, "")]))), () => ( clip.asset));
|
|
4484
|
-
const speed =
|
|
4484
|
+
const speed = _chunkLBDC5434cjs.videoClipSpeed.call(void 0, clip);
|
|
4485
4485
|
return speed !== 1 ? `${base} (${Math.round(speed * 100)}%)` : base;
|
|
4486
4486
|
}
|
|
4487
4487
|
function planVideoClipDrag(project, input) {
|
|
4488
|
-
const at =
|
|
4488
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, project, input.clip);
|
|
4489
4489
|
if (!at) return null;
|
|
4490
4490
|
const { clip, track } = at;
|
|
4491
4491
|
const snap = _nullishCoalesce(input.snap, () => ( ((t) => t)));
|
|
@@ -4502,17 +4502,17 @@ function planVideoClipDrag(project, input) {
|
|
|
4502
4502
|
}
|
|
4503
4503
|
const minimum = 1e3 / project.fps;
|
|
4504
4504
|
if (input.mode === "trim-start") {
|
|
4505
|
-
const to2 = Math.min(snap(Math.max(0, clip.start + input.delta)),
|
|
4505
|
+
const to2 = Math.min(snap(Math.max(0, clip.start + input.delta)), _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip) - minimum);
|
|
4506
4506
|
const changed2 = Math.abs(to2 - clip.start) > 1e-6;
|
|
4507
|
-
const plan = input.ripple ? { start: clip.start, duration: clip.duration - (to2 - clip.start) } : { start: to2, duration:
|
|
4507
|
+
const plan = input.ripple ? { start: clip.start, duration: clip.duration - (to2 - clip.start) } : { start: to2, duration: _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip) - to2 };
|
|
4508
4508
|
return { ...plan, track: track.id, edit: changed2 ? { op: "trim_clip", clip: clip.id, edge: "start", to: to2, ...input.ripple ? { ripple: true } : {} } : null };
|
|
4509
4509
|
}
|
|
4510
|
-
const to = Math.max(snap(
|
|
4511
|
-
const changed = Math.abs(to -
|
|
4510
|
+
const to = Math.max(snap(_chunkLBDC5434cjs.videoClipEnd.call(void 0, clip) + input.delta), clip.start + minimum);
|
|
4511
|
+
const changed = Math.abs(to - _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip)) > 1e-6;
|
|
4512
4512
|
return { start: clip.start, duration: to - clip.start, track: track.id, edit: changed ? { op: "trim_clip", clip: clip.id, edge: "end", to, ...input.ripple ? { ripple: true } : {} } : null };
|
|
4513
4513
|
}
|
|
4514
4514
|
function videoDropTracks(project, clipId) {
|
|
4515
|
-
const at =
|
|
4515
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, project, clipId);
|
|
4516
4516
|
if (!at) return [];
|
|
4517
4517
|
return project.tracks.filter((t) => t.kind === at.track.kind && !t.locked).map((t) => t.id);
|
|
4518
4518
|
}
|
|
@@ -4521,7 +4521,7 @@ function videoDragLabel(edit) {
|
|
|
4521
4521
|
return edit.op === "trim_clip" && edit.ripple ? "Ripple trim" : "Trim clip";
|
|
4522
4522
|
}
|
|
4523
4523
|
function videoAssetDropEdit(project, assetId, options = {}) {
|
|
4524
|
-
const asset =
|
|
4524
|
+
const asset = _chunkLBDC5434cjs.videoAssetMap.call(void 0, project).get(assetId);
|
|
4525
4525
|
if (!asset) return null;
|
|
4526
4526
|
const kind = asset.kind === "audio" ? "audio" : "video";
|
|
4527
4527
|
const track = _nullishCoalesce(options.track, () => ( _optionalChain([project, 'access', _149 => _149.tracks, 'access', _150 => _150.find, 'call', _151 => _151((t) => t.kind === kind && !t.locked), 'optionalAccess', _152 => _152.id])));
|
|
@@ -4573,25 +4573,25 @@ var KEY_LABELS = {
|
|
|
4573
4573
|
scale: { label: "Scale", step: 0.05 },
|
|
4574
4574
|
rotation: { label: "Rotation", step: 1 }
|
|
4575
4575
|
};
|
|
4576
|
-
var animatableOf = (clip, property) =>
|
|
4576
|
+
var animatableOf = (clip, property) => _chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([clip, 'access', _153 => _153.transform, 'optionalAccess', _154 => _154[property]]) : property === "volume" ? clip.type === "media" || clip.type === "sequence" ? clip.volume : void 0 : clip.opacity;
|
|
4577
4577
|
var playheadInClip = (clip, time) => Math.round(Math.min(clip.duration, Math.max(0, time - clip.start)));
|
|
4578
4578
|
function videoKeyframeRows(project, clipId, time) {
|
|
4579
|
-
const at =
|
|
4579
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, project, clipId);
|
|
4580
4580
|
if (!at) return [];
|
|
4581
4581
|
const { clip } = at;
|
|
4582
|
-
const asset = clip.type === "media" ?
|
|
4582
|
+
const asset = clip.type === "media" ? _chunkLBDC5434cjs.videoAssetMap.call(void 0, project).get(clip.asset) : void 0;
|
|
4583
4583
|
const visual = !(_optionalChain([asset, 'optionalAccess', _155 => _155.kind]) === "audio" || at.track.kind === "audio");
|
|
4584
|
-
const audible = clip.type === "media" &&
|
|
4585
|
-
const properties = [...visual ? ["opacity"] : [], ...audible ? ["volume"] : [], ...visual ?
|
|
4584
|
+
const audible = clip.type === "media" && _chunkLBDC5434cjs.videoAssetHasSound.call(void 0, asset) || clip.type === "sequence";
|
|
4585
|
+
const properties = [...visual ? ["opacity"] : [], ...audible ? ["volume"] : [], ...visual ? _chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES : []];
|
|
4586
4586
|
const clipTime = playheadInClip(clip, time);
|
|
4587
4587
|
return properties.map((property) => {
|
|
4588
4588
|
const prop = animatableOf(clip, property);
|
|
4589
|
-
const keys =
|
|
4590
|
-
const limits =
|
|
4589
|
+
const keys = _chunkLBDC5434cjs.isVideoKeyframes.call(void 0, prop) ? prop.keys : [];
|
|
4590
|
+
const limits = _chunkLBDC5434cjs.VIDEO_KEYFRAME_LIMITS[property];
|
|
4591
4591
|
return {
|
|
4592
4592
|
property,
|
|
4593
4593
|
...KEY_LABELS[property],
|
|
4594
|
-
value: Math.round(
|
|
4594
|
+
value: Math.round(_chunkLBDC5434cjs.videoValueAt.call(void 0, prop, clipTime, limits.default) * 1e3) / 1e3,
|
|
4595
4595
|
keyed: keys.length > 0,
|
|
4596
4596
|
keys: keys.length,
|
|
4597
4597
|
onKey: keys.some((k) => Math.abs(k.t - clipTime) < 0.5),
|
|
@@ -4602,44 +4602,44 @@ function videoKeyframeRows(project, clipId, time) {
|
|
|
4602
4602
|
});
|
|
4603
4603
|
}
|
|
4604
4604
|
function plainValueEdit(clip, property, value) {
|
|
4605
|
-
if (!
|
|
4605
|
+
if (!_chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES.includes(property))
|
|
4606
4606
|
return value === void 0 ? { op: "update_clip", clip: clip.id, remove: [property] } : { op: "update_clip", clip: clip.id, set: { [property]: value } };
|
|
4607
4607
|
const transform = { ...clip.transform, [property]: value };
|
|
4608
4608
|
if (value === void 0) delete transform[property];
|
|
4609
4609
|
return Object.keys(transform).length ? { op: "update_clip", clip: clip.id, set: { transform } } : { op: "update_clip", clip: clip.id, remove: ["transform"] };
|
|
4610
4610
|
}
|
|
4611
4611
|
function videoKeyframeValueEdit(project, clipId, property, time, value) {
|
|
4612
|
-
const at =
|
|
4612
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, project, clipId);
|
|
4613
4613
|
if (!at) return null;
|
|
4614
4614
|
const prop = animatableOf(at.clip, property);
|
|
4615
|
-
if (!
|
|
4615
|
+
if (!_chunkLBDC5434cjs.isVideoKeyframes.call(void 0, prop)) return plainValueEdit(at.clip, property, value);
|
|
4616
4616
|
if (value === void 0) return null;
|
|
4617
|
-
return { op: "set_keyframes", clip: clipId, property, keys:
|
|
4617
|
+
return { op: "set_keyframes", clip: clipId, property, keys: _chunkLBDC5434cjs.setVideoKey.call(void 0, prop, { t: playheadInClip(at.clip, time), v: value }, _chunkLBDC5434cjs.VIDEO_KEYFRAME_LIMITS[property].default).keys };
|
|
4618
4618
|
}
|
|
4619
4619
|
function videoKeyframeToggleEdit(project, clipId, property, time) {
|
|
4620
|
-
const at =
|
|
4620
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, project, clipId);
|
|
4621
4621
|
if (!at) return null;
|
|
4622
4622
|
const prop = animatableOf(at.clip, property);
|
|
4623
4623
|
const t = playheadInClip(at.clip, time);
|
|
4624
|
-
const fallback =
|
|
4625
|
-
if (
|
|
4624
|
+
const fallback = _chunkLBDC5434cjs.VIDEO_KEYFRAME_LIMITS[property].default;
|
|
4625
|
+
if (_chunkLBDC5434cjs.isVideoKeyframes.call(void 0, prop)) {
|
|
4626
4626
|
const key = prop.keys.find((k) => Math.abs(k.t - t) < 0.5);
|
|
4627
4627
|
if (key) {
|
|
4628
|
-
const rest =
|
|
4629
|
-
return
|
|
4628
|
+
const rest = _chunkLBDC5434cjs.removeVideoKey.call(void 0, prop, key.t);
|
|
4629
|
+
return _chunkLBDC5434cjs.isVideoKeyframes.call(void 0, rest) ? { op: "set_keyframes", clip: clipId, property, keys: rest.keys } : plainValueEdit(at.clip, property, rest === fallback ? void 0 : rest);
|
|
4630
4630
|
}
|
|
4631
4631
|
}
|
|
4632
|
-
const v =
|
|
4633
|
-
return { op: "set_keyframes", clip: clipId, property, keys:
|
|
4632
|
+
const v = _chunkLBDC5434cjs.videoValueAt.call(void 0, prop, t, fallback);
|
|
4633
|
+
return { op: "set_keyframes", clip: clipId, property, keys: _chunkLBDC5434cjs.isVideoKeyframes.call(void 0, prop) ? _chunkLBDC5434cjs.setVideoKey.call(void 0, prop, { t, v }, fallback).keys : [{ t, v }] };
|
|
4634
4634
|
}
|
|
4635
4635
|
function videoLutEdits(project, clips, lut) {
|
|
4636
4636
|
const edits = [];
|
|
4637
4637
|
for (const id of clips) {
|
|
4638
|
-
const at =
|
|
4638
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, project, id);
|
|
4639
4639
|
if (!at) continue;
|
|
4640
4640
|
const { lut: current, ...rest } = _nullishCoalesce(at.clip.grade, () => ( {}));
|
|
4641
4641
|
if (!lut && !current) continue;
|
|
4642
|
-
const grade =
|
|
4642
|
+
const grade = _chunkLBDC5434cjs.normalizeVideoGrade.call(void 0, lut ? { ...rest, lut } : rest);
|
|
4643
4643
|
edits.push(grade ? { op: "update_clip", clip: id, set: { grade } } : { op: "update_clip", clip: id, remove: ["grade"] });
|
|
4644
4644
|
}
|
|
4645
4645
|
return edits;
|
|
@@ -4660,7 +4660,7 @@ function videoAddAdjustmentEdits(project, time, options = {}) {
|
|
|
4660
4660
|
const duration = _nullishCoalesce(options.duration, () => ( 3e3));
|
|
4661
4661
|
const start = Math.max(0, time);
|
|
4662
4662
|
const top = project.tracks[0];
|
|
4663
|
-
const free = top && top.kind === "video" && !top.locked && !top.clips.some((c) => c.start < start + duration &&
|
|
4663
|
+
const free = top && top.kind === "video" && !top.locked && !top.clips.some((c) => c.start < start + duration && _chunkLBDC5434cjs.videoClipEnd.call(void 0, c) > start);
|
|
4664
4664
|
const edits = [];
|
|
4665
4665
|
let track = _optionalChain([top, 'optionalAccess', _156 => _156.id]);
|
|
4666
4666
|
if (!free) {
|
|
@@ -4679,7 +4679,7 @@ function videoMaskEdit(clip, mask) {
|
|
|
4679
4679
|
function videoSkinProtectionEdits(project, clips, amount) {
|
|
4680
4680
|
const edits = [];
|
|
4681
4681
|
for (const id of clips) {
|
|
4682
|
-
const clip = _optionalChain([
|
|
4682
|
+
const clip = _optionalChain([_chunkLBDC5434cjs.findVideoClip.call(void 0, project, id), 'optionalAccess', _157 => _157.clip]);
|
|
4683
4683
|
const lut = _optionalChain([clip, 'optionalAccess', _158 => _158.grade, 'optionalAccess', _159 => _159.lut]);
|
|
4684
4684
|
if (!clip || !lut) continue;
|
|
4685
4685
|
const { preserveSkinTones: _p, ...rest } = lut;
|
|
@@ -4713,7 +4713,7 @@ var RIPPLE = {
|
|
|
4713
4713
|
};
|
|
4714
4714
|
var MODE = {
|
|
4715
4715
|
type: "string",
|
|
4716
|
-
enum: [...
|
|
4716
|
+
enum: [..._chunkLBDC5434cjs.VIDEO_PLACEMENT_MODES],
|
|
4717
4717
|
description: 'What to do with clips already where it lands: "refuse" (default) fails with the next free place; "overwrite" cuts, trims or removes what is underneath on that track; "insert" cuts everything across the start and pushes later material along by its length on this track and every sync-locked track.'
|
|
4718
4718
|
};
|
|
4719
4719
|
var DELTA = (what) => ({ type: "number", description: `${what}, in milliseconds of timeline time: positive is later, negative earlier. It is clamped to what the media and neighbours allow; the result says how far it went.` });
|
|
@@ -4730,11 +4730,11 @@ var TRANSFORM = object(
|
|
|
4730
4730
|
);
|
|
4731
4731
|
var TRANSITION = object(
|
|
4732
4732
|
{
|
|
4733
|
-
type: { type: "string", enum:
|
|
4733
|
+
type: { type: "string", enum: _chunkLBDC5434cjs.VIDEO_TRANSITION_TYPES.filter((t) => t !== "effect"), description: "crossfade (this clip fades up over the one before), dip (down into a colour and up out of it), wipe (an edge travels across revealing this clip), push (this clip slides in and pushes the one before out), slide (this clip slides in over the one before) or iris (a circle opens from the centre). For a transition effect from the effects provider use set_video_effect_transition." },
|
|
4734
4734
|
duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms, centred on the cut. Every type but dip needs half of it in media past the cut on both sides (handles); a dip needs none." },
|
|
4735
4735
|
color: COLOR("For dip: the colour passed through (default black)"),
|
|
4736
|
-
direction: { type: "string", enum: [...
|
|
4737
|
-
audioCurve: { type: "string", enum: [...
|
|
4736
|
+
direction: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_WIPE_DIRECTIONS], description: "For wipe, push and slide: the way the edge or picture travels (default right, coming in from the left)." },
|
|
4737
|
+
audioCurve: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fades through it: default equal-power for every type but dip (steady loudness while the two sounds overlap), linear for dip; or s-curve, exponential, logarithmic." }
|
|
4738
4738
|
},
|
|
4739
4739
|
["type", "duration"],
|
|
4740
4740
|
"A transition from the clip that ends where this one starts on the same track."
|
|
@@ -4744,7 +4744,7 @@ var LUT_STRENGTH = { type: "number", minimum: 0, maximum: 1, description: "How m
|
|
|
4744
4744
|
var SKIN = { type: "number", minimum: 0, maximum: 1, description: "How much of the LUT's change to hold back on skin tones, 0 (none, the default) to 1 (skin keeps its colour); 0.5-0.8 keeps faces natural under a heavy look. Applied in the preview and frame renders; ffmpeg's lut3d cannot, so the export notes it." };
|
|
4745
4745
|
var GRADE = object(
|
|
4746
4746
|
{
|
|
4747
|
-
...Object.fromEntries(
|
|
4747
|
+
...Object.fromEntries(_chunkLBDC5434cjs.VIDEO_GRADE_CONTROLS.map((c) => [c.key, { type: "number", minimum: c.min, maximum: c.max, description: c.description }])),
|
|
4748
4748
|
lut: object({ src: LUT_SRC, strength: LUT_STRENGTH, name: { type: "string", minLength: 1, description: "A label for the look." }, preserveSkinTones: SKIN }, ["src"], "A 3D LUT applied after the other settings (set_video_lut checks the file first).")
|
|
4749
4749
|
},
|
|
4750
4750
|
[],
|
|
@@ -4752,7 +4752,7 @@ var GRADE = object(
|
|
|
4752
4752
|
);
|
|
4753
4753
|
var ANIMATION = (when) => object(
|
|
4754
4754
|
{
|
|
4755
|
-
effect: { type: "string", enum: [...
|
|
4755
|
+
effect: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_CLIP_ANIMATION_EFFECTS], description: "fade; rise (up into place) or drop (down into place); slide-left / slide-right (moving that way); zoom (grows into place); pop (grows past its size and settles). Each also fades; an exit plays the movement backwards." },
|
|
4756
4756
|
duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms (default 500)." }
|
|
4757
4757
|
},
|
|
4758
4758
|
["effect"],
|
|
@@ -4762,11 +4762,11 @@ var CLIP_COMMON = {
|
|
|
4762
4762
|
name: { type: "string", description: "A label for the clip." },
|
|
4763
4763
|
opacity: { type: "number", minimum: 0, maximum: 1, description: "Opacity 0\u20131 (default 1). A number replaces any keyframes; set_video_keyframes animates it." },
|
|
4764
4764
|
transform: TRANSFORM,
|
|
4765
|
-
fit: { type: "string", enum: [...
|
|
4765
|
+
fit: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_FITS], description: "How the picture fits the frame before the transform, as CSS object-fit (default contain for media, fill for colours)." },
|
|
4766
4766
|
grade: GRADE,
|
|
4767
4767
|
animateIn: ANIMATION("How the picture enters, from the clip's start (on top of any fade in). Titles usually rise, pop or fade in."),
|
|
4768
4768
|
animateOut: ANIMATION("How the picture leaves, ending at the clip's end."),
|
|
4769
|
-
blend: { type: "string", enum: [...
|
|
4769
|
+
blend: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_BLEND_MODES], description: "How the picture mixes with what is beneath it, as CSS mix-blend-mode (default normal): multiply darkens (shadows, textures), screen and add lighten (light leaks, flares, glows), overlay and soft-light add contrast, difference and exclusion invert." },
|
|
4770
4770
|
fadeIn: MS("Fade up from nothing (picture and sound) over this long"),
|
|
4771
4771
|
fadeOut: MS("Fade down to nothing over this long")
|
|
4772
4772
|
};
|
|
@@ -4775,8 +4775,8 @@ var MEDIA_FIELDS = {
|
|
|
4775
4775
|
speed: { type: "number", minimum: 0.05, maximum: 20, description: "Playback speed (default 1). Changing it keeps the stretch of source, so the clip gets shorter or longer." },
|
|
4776
4776
|
volume: { type: "number", minimum: 0, maximum: 4, description: "Gain (1 = unchanged, default 1). A number replaces any keyframes; set_video_keyframes animates it." },
|
|
4777
4777
|
muted: { type: "boolean", description: "Silence this clip (default false)." },
|
|
4778
|
-
fadeInCurve: { type: "string", enum: [...
|
|
4779
|
-
fadeOutCurve: { type: "string", enum: [...
|
|
4778
|
+
fadeInCurve: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fade in (default linear; the picture always fades linearly): linear, equal-power (steady loudness, best for crossfades), s-curve (gentle at both ends), exponential (slow start, natural from silence) or logarithmic (fast start)." },
|
|
4779
|
+
fadeOutCurve: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fade out (default linear), the same choices as fadeInCurve; exponential sounds natural fading to silence." }
|
|
4780
4780
|
};
|
|
4781
4781
|
var TEXT_FIELDS = {
|
|
4782
4782
|
text: { type: "string", minLength: 1, description: `The title's text ("\\n" breaks lines).` },
|
|
@@ -4825,7 +4825,7 @@ var ASSET_FIELDS = {
|
|
|
4825
4825
|
};
|
|
4826
4826
|
var KEY_PROPERTY = {
|
|
4827
4827
|
type: "string",
|
|
4828
|
-
enum: [...
|
|
4828
|
+
enum: [..._chunkLBDC5434cjs.VIDEO_KEYFRAME_PROPERTIES],
|
|
4829
4829
|
description: "Which property: opacity (0\u20131), volume (media only, 0\u20134 gain), x / y (pixels from the frame's centre, right / down), scale (1 = fitted size) or rotation (degrees clockwise)."
|
|
4830
4830
|
};
|
|
4831
4831
|
var KEYS = {
|
|
@@ -4840,7 +4840,7 @@ var KEYS = {
|
|
|
4840
4840
|
ease: {
|
|
4841
4841
|
description: "How the value moves from this key to the next (default linear): linear, hold (stays, then jumps at the next key), ease-in, ease-out, ease-in-out, or CSS cubic-bezier points [x1, y1, x2, y2] with x1 and x2 in 0\u20131.",
|
|
4842
4842
|
anyOf: [
|
|
4843
|
-
{ type: "string", enum: [...
|
|
4843
|
+
{ type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_EASE_NAMES] },
|
|
4844
4844
|
{ type: "array", items: { type: "number" }, minItems: 4, maxItems: 4 }
|
|
4845
4845
|
]
|
|
4846
4846
|
}
|
|
@@ -4869,19 +4869,19 @@ var describeVideoTracks = (tracks) => tracks.map((t, index) => ({
|
|
|
4869
4869
|
...t.locked ? { locked: true } : {},
|
|
4870
4870
|
...t.syncLocked === false ? { syncLocked: false } : {},
|
|
4871
4871
|
...t.volume !== void 0 ? { volume: t.volume } : {},
|
|
4872
|
-
clips:
|
|
4872
|
+
clips: _chunkLBDC5434cjs.sortedVideoClips.call(void 0, t).map((c) => ({ ...c, end: _chunkLBDC5434cjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkLBDC5434cjs.videoClipSourceRange.call(void 0, c) } : {} }))
|
|
4873
4873
|
}));
|
|
4874
|
-
var videoSequenceUsers = (project, id) =>
|
|
4875
|
-
({ sequence, track }) => track.clips.flatMap((c) => c.type === "sequence" && c.sequence === id ? [{ clip: c.id, ...sequence ? { inSequence: sequence } : {}, track: track.id, start: c.start, end:
|
|
4874
|
+
var videoSequenceUsers = (project, id) => _chunkLBDC5434cjs.allVideoTracks.call(void 0, project).flatMap(
|
|
4875
|
+
({ sequence, track }) => track.clips.flatMap((c) => c.type === "sequence" && c.sequence === id ? [{ clip: c.id, ...sequence ? { inSequence: sequence } : {}, track: track.id, start: c.start, end: _chunkLBDC5434cjs.videoClipEnd.call(void 0, c), source: _chunkLBDC5434cjs.videoClipSourceRange.call(void 0, c) }] : [])
|
|
4876
4876
|
);
|
|
4877
4877
|
function describeVideoSequence(project, sequence, tracks = true) {
|
|
4878
|
-
const cycle =
|
|
4878
|
+
const cycle = _chunkLBDC5434cjs.findVideoSequenceCycle.call(void 0, project, sequence.id);
|
|
4879
4879
|
return {
|
|
4880
4880
|
id: sequence.id,
|
|
4881
4881
|
...sequence.name ? { name: sequence.name } : {},
|
|
4882
|
-
duration:
|
|
4882
|
+
duration: _chunkLBDC5434cjs.videoSequenceDuration.call(void 0, sequence),
|
|
4883
4883
|
clipCount: sequence.tracks.reduce((n, t) => n + t.clips.length, 0),
|
|
4884
|
-
nests:
|
|
4884
|
+
nests: _chunkLBDC5434cjs.videoSequenceChildren.call(void 0, sequence),
|
|
4885
4885
|
usedBy: videoSequenceUsers(project, sequence.id),
|
|
4886
4886
|
...cycle ? { cycle } : {},
|
|
4887
4887
|
...tracks ? { tracks: describeVideoTracks(sequence.tracks) } : { trackCount: sequence.tracks.length }
|
|
@@ -4893,7 +4893,7 @@ function describeVideoProject(project) {
|
|
|
4893
4893
|
width: project.width,
|
|
4894
4894
|
height: project.height,
|
|
4895
4895
|
fps: project.fps,
|
|
4896
|
-
duration:
|
|
4896
|
+
duration: _chunkLBDC5434cjs.videoProjectDuration.call(void 0, project),
|
|
4897
4897
|
...project.background ? { background: project.background } : {},
|
|
4898
4898
|
assets: project.assets.map(videoAssetOut),
|
|
4899
4899
|
tracks: describeVideoTracks(project.tracks),
|
|
@@ -4910,7 +4910,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4910
4910
|
const project = () => controller.getProject();
|
|
4911
4911
|
const outcome = (result, extra = {}) => {
|
|
4912
4912
|
if (!result.ok) throw new Error(result.error);
|
|
4913
|
-
return { ...extra, duration:
|
|
4913
|
+
return { ...extra, duration: _chunkLBDC5434cjs.videoProjectDuration.call(void 0, result.project), issues: issueSummary(result.issues) };
|
|
4914
4914
|
};
|
|
4915
4915
|
const apply = (edits, label, extra) => {
|
|
4916
4916
|
const result = controller.apply(edits, label);
|
|
@@ -4919,7 +4919,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4919
4919
|
const clipOut = (p, id) => {
|
|
4920
4920
|
for (const t of p.tracks) {
|
|
4921
4921
|
const c = t.clips.find((x) => x.id === id);
|
|
4922
|
-
if (c) return { track: t.id, ...c, end:
|
|
4922
|
+
if (c) return { track: t.id, ...c, end: _chunkLBDC5434cjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkLBDC5434cjs.videoClipSourceRange.call(void 0, c) } : {} };
|
|
4923
4923
|
}
|
|
4924
4924
|
return null;
|
|
4925
4925
|
};
|
|
@@ -4931,7 +4931,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4931
4931
|
});
|
|
4932
4932
|
const keysOut = (p, clip, property) => {
|
|
4933
4933
|
const c = clipOut(p, clip);
|
|
4934
|
-
const value =
|
|
4934
|
+
const value = _chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([c, 'optionalAccess', _168 => _168.transform, 'optionalAccess', _169 => _169[property]]) : _optionalChain([c, 'optionalAccess', _170 => _170[property]]);
|
|
4935
4935
|
return typeof value === "object" ? { keys: value.keys } : { keys: [], value: _nullishCoalesce(value, () => ( null)) };
|
|
4936
4936
|
};
|
|
4937
4937
|
const getProject = {
|
|
@@ -4953,8 +4953,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4953
4953
|
inputSchema: object({ time: MS("Time from the start (default: the playhead)") }),
|
|
4954
4954
|
annotations: { title: "What plays at a moment", ...READ },
|
|
4955
4955
|
handler: ({ time }) => {
|
|
4956
|
-
const frame =
|
|
4957
|
-
return { ...frame, timecode:
|
|
4956
|
+
const frame = _chunkLBDC5434cjs.videoFrameAt.call(void 0, project(), _nullishCoalesce(time, () => ( controller.getState().time)));
|
|
4957
|
+
return { ...frame, timecode: _chunkLBDC5434cjs.formatVideoTimecode.call(void 0, frame.time, project().fps) };
|
|
4958
4958
|
}
|
|
4959
4959
|
};
|
|
4960
4960
|
const listSequences = {
|
|
@@ -4982,7 +4982,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
4982
4982
|
annotations: { title: "Find gaps", ...READ },
|
|
4983
4983
|
handler: ({ track }) => {
|
|
4984
4984
|
if (track !== void 0 && !project().tracks.some((t) => t.id === track)) throw new Error(`There is no track "${track}"; the tracks are ${project().tracks.map((t) => `"${t.id}"`).join(", ")}.`);
|
|
4985
|
-
return { gaps:
|
|
4985
|
+
return { gaps: _chunkLBDC5434cjs.findVideoGaps.call(void 0, project(), track) };
|
|
4986
4986
|
}
|
|
4987
4987
|
};
|
|
4988
4988
|
const checkProject = {
|
|
@@ -5012,7 +5012,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5012
5012
|
const lutSrcs = [...new Set(p.tracks.flatMap((t) => t.clips.map((c) => _optionalChain([c, 'access', _171 => _171.grade, 'optionalAccess', _172 => _172.lut, 'optionalAccess', _173 => _173.src])).filter((x) => !!x)))];
|
|
5013
5013
|
const missing = (await Promise.all(lutSrcs.map((src) => controller.luts.load(src).then(() => null, (e) => e.message)))).filter((m) => !!m);
|
|
5014
5014
|
const svgOptions = { lutFor: (src) => controller.luts.peek(src), ...columns ? { columns } : {} };
|
|
5015
|
-
const svg = times ?
|
|
5015
|
+
const svg = times ? _chunkLBDC5434cjs.videoContactSheetSvg.call(void 0, p, times, svgOptions) : _chunkLBDC5434cjs.videoProjectSvg.call(void 0, p, _nullishCoalesce(time, () => ( controller.getState().time)), svgOptions);
|
|
5016
5016
|
const notes = [...missing.map((m) => `${m}; that LUT is left out of the picture.`), ...lutSrcs.length > missing.length ? ["LUTs are drawn approximately in SVG (curves and a colour matrix); the preview and export apply them exactly."] : []];
|
|
5017
5017
|
if (format === "png") {
|
|
5018
5018
|
if (!options.rasterize) throw new Error('This host cannot make PNG images; call render_video_frame with format "svg".');
|
|
@@ -5102,7 +5102,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5102
5102
|
if (play === true) controller.play();
|
|
5103
5103
|
if (play === false) controller.pause();
|
|
5104
5104
|
const state = controller.getState();
|
|
5105
|
-
return { time: state.time, timecode:
|
|
5105
|
+
return { time: state.time, timecode: _chunkLBDC5434cjs.formatVideoTimecode.call(void 0, state.time, p.fps), playing: state.playing, clips: state.current };
|
|
5106
5106
|
}
|
|
5107
5107
|
};
|
|
5108
5108
|
const setSettings = {
|
|
@@ -5228,7 +5228,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5228
5228
|
inputSchema: object(
|
|
5229
5229
|
{
|
|
5230
5230
|
clip: CLIP_ID,
|
|
5231
|
-
set: object({ ...CLIP_COMMON, ...MEDIA_FIELDS, asset: { ...ASSET_ID, description: "For media: play another asset (same in point)." }, ...TEXT_FIELDS, color: COLOR("Text colour, or a colour clip's fill"), scope: { type: "string", enum: [...
|
|
5231
|
+
set: object({ ...CLIP_COMMON, ...MEDIA_FIELDS, asset: { ...ASSET_ID, description: "For media: play another asset (same in point)." }, ...TEXT_FIELDS, color: COLOR("Text colour, or a colour clip's fill"), scope: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_ADJUSTMENT_SCOPES], description: "For adjustment clips: which pictures it changes, underneath (default), all or track." }, targetTrack: { ...TRACK_ID, description: 'For adjustment clips with scope "track": the track whose pictures it changes.' } }, [], "Fields to replace (only those that fit the clip's type)."),
|
|
5232
5232
|
remove: { type: "array", items: { type: "string", enum: ["name", "opacity", "transform", "fit", "blend", "grade", "animateIn", "animateOut", "fadeIn", "fadeOut", "fadeInCurve", "fadeOutCurve", "in", "speed", "volume", "muted", "fontSize", "fontFamily", "fontWeight", "background", "scope", "targetTrack"] }, description: 'Fields to reset to their defaults (an adjustment clip going from scope "track" to another scope must also remove targetTrack).' }
|
|
5233
5233
|
},
|
|
5234
5234
|
["clip"]
|
|
@@ -5247,7 +5247,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5247
5247
|
const gradeTargets = (ids) => {
|
|
5248
5248
|
const p = project();
|
|
5249
5249
|
for (const id of ids) {
|
|
5250
|
-
const at =
|
|
5250
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, p, id);
|
|
5251
5251
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
5252
5252
|
const { clip } = at;
|
|
5253
5253
|
if (at.track.kind !== "video" || clip.type === "media" && _optionalChain([p, 'access', _174 => _174.assets, 'access', _175 => _175.find, 'call', _176 => _176((a) => a.id === clip.asset), 'optionalAccess', _177 => _177.kind]) === "audio")
|
|
@@ -5261,7 +5261,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5261
5261
|
inputSchema: object(
|
|
5262
5262
|
{
|
|
5263
5263
|
clips: { type: "array", items: CLIP_ID, minItems: 1, description: "Clips on video tracks to grade." },
|
|
5264
|
-
preset: { type: "string", enum: [...
|
|
5264
|
+
preset: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_GRADE_PRESET_NAMES], description: "The look." },
|
|
5265
5265
|
amount: { type: "number", minimum: 0, maximum: 1, description: "Strength, 0 (none) to 1 (full, the default); 0.5 is a subtler version." }
|
|
5266
5266
|
},
|
|
5267
5267
|
["clips", "preset"]
|
|
@@ -5270,10 +5270,10 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5270
5270
|
handler: ({ clips, preset, amount }) => {
|
|
5271
5271
|
gradeTargets(clips);
|
|
5272
5272
|
const edits = clips.map((clip) => {
|
|
5273
|
-
const grade =
|
|
5273
|
+
const grade = _chunkLBDC5434cjs.videoGradeLook.call(void 0, _chunkLBDC5434cjs.findVideoClip.call(void 0, project(), clip).clip.grade, preset, _nullishCoalesce(amount, () => ( 1)));
|
|
5274
5274
|
return grade ? { op: "update_clip", clip, set: { grade } } : { op: "update_clip", clip, remove: ["grade"] };
|
|
5275
5275
|
});
|
|
5276
|
-
return apply(edits, `Apply ${preset} look`, (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([
|
|
5276
|
+
return apply(edits, `Apply ${preset} look`, (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkLBDC5434cjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _178 => _178.clip, 'access', _179 => _179.grade]), () => ( null)) })) }));
|
|
5277
5277
|
}
|
|
5278
5278
|
};
|
|
5279
5279
|
const copyGrade = {
|
|
@@ -5284,7 +5284,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5284
5284
|
annotations: { title: "Copy a colour grade", ...WRITE_IDEMPOTENT },
|
|
5285
5285
|
handler: ({ from, to }) => {
|
|
5286
5286
|
gradeTargets([from, ...to]);
|
|
5287
|
-
const grade =
|
|
5287
|
+
const grade = _chunkLBDC5434cjs.findVideoClip.call(void 0, project(), from).clip.grade;
|
|
5288
5288
|
const edits = to.map((clip) => grade ? { op: "update_clip", clip, set: { grade: { ...grade } } } : { op: "update_clip", clip, remove: ["grade"] });
|
|
5289
5289
|
return apply(edits, "Copy grade", () => ({ grade: _nullishCoalesce(grade, () => ( null)), clips: to }));
|
|
5290
5290
|
}
|
|
@@ -5310,7 +5310,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5310
5310
|
const lut = await controller.luts.load(src);
|
|
5311
5311
|
const label = _nullishCoalesce(name, () => ( lut.title));
|
|
5312
5312
|
const setting = { src, ...strength !== void 0 && strength !== 1 ? { strength } : {}, ...label ? { name: label } : {}, ...preserve_skin_tones ? { preserveSkinTones: preserve_skin_tones } : {} };
|
|
5313
|
-
return apply(videoLutEdits(project(), clips, setting), "Apply LUT", (r) => ({ lut: { src, ...lut.title ? { title: lut.title } : {}, size: lut.size }, clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([
|
|
5313
|
+
return apply(videoLutEdits(project(), clips, setting), "Apply LUT", (r) => ({ lut: { src, ...lut.title ? { title: lut.title } : {}, size: lut.size }, clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkLBDC5434cjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _180 => _180.clip, 'access', _181 => _181.grade]), () => ( null)) })) }));
|
|
5314
5314
|
}
|
|
5315
5315
|
};
|
|
5316
5316
|
const removeLut = {
|
|
@@ -5322,9 +5322,9 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5322
5322
|
handler: ({ clips }) => {
|
|
5323
5323
|
gradeTargets(clips);
|
|
5324
5324
|
const p = project();
|
|
5325
|
-
const withLut = clips.filter((id) => _optionalChain([
|
|
5325
|
+
const withLut = clips.filter((id) => _optionalChain([_chunkLBDC5434cjs.findVideoClip.call(void 0, p, id), 'access', _182 => _182.clip, 'access', _183 => _183.grade, 'optionalAccess', _184 => _184.lut]));
|
|
5326
5326
|
if (!withLut.length) throw new Error(`None of ${clips.map((c) => `"${c}"`).join(", ")} has a LUT; get_video_project shows each clip's grade.`);
|
|
5327
|
-
return apply(videoLutEdits(p, withLut, null), "Remove LUT", (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([
|
|
5327
|
+
return apply(videoLutEdits(p, withLut, null), "Remove LUT", (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkLBDC5434cjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _185 => _185.clip, 'access', _186 => _186.grade]), () => ( null)) })) }));
|
|
5328
5328
|
}
|
|
5329
5329
|
};
|
|
5330
5330
|
const PROXY_SCALE = { type: "number", exclusiveMinimum: 0, exclusiveMaximum: 1, description: "Proxy size as a fraction of the original: 0.5 (half width and height, the default) or 0.25 for very large footage." };
|
|
@@ -5433,7 +5433,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5433
5433
|
approximate: parsed.approximate,
|
|
5434
5434
|
first: list[0],
|
|
5435
5435
|
last: list[list.length - 1],
|
|
5436
|
-
...a.duration !== void 0 && list[list.length - 1].end > a.duration +
|
|
5436
|
+
...a.duration !== void 0 && list[list.length - 1].end > a.duration + _chunkLBDC5434cjs.VIDEO_TIME_EPSILON ? { warning: `The transcript runs to ${list[list.length - 1].end} ms, past the asset's ${a.duration} ms: is it for this asset?` } : {}
|
|
5437
5437
|
}));
|
|
5438
5438
|
}
|
|
5439
5439
|
};
|
|
@@ -5504,22 +5504,22 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5504
5504
|
const bad = ranges.findIndex((r) => !(r.to > r.from));
|
|
5505
5505
|
if (bad >= 0) throw new Error(`Range ${bad + 1} is empty or backwards (${ranges[bad].from}\u2013${ranges[bad].to} ms); "to" must be after "from".`);
|
|
5506
5506
|
const merged = mergeVideoRanges(ranges);
|
|
5507
|
-
const before =
|
|
5508
|
-
return apply(videoRemoveRangesEdits(merged, tracks), merged.length > 1 ? `Cut ${merged.length} stretches` : "Cut stretch", (r) => ({ removed: merged.length, time: round(before -
|
|
5507
|
+
const before = _chunkLBDC5434cjs.videoProjectDuration.call(void 0, project());
|
|
5508
|
+
return apply(videoRemoveRangesEdits(merged, tracks), merged.length > 1 ? `Cut ${merged.length} stretches` : "Cut stretch", (r) => ({ removed: merged.length, time: round(before - _chunkLBDC5434cjs.videoProjectDuration.call(void 0, r.project)), duration: _chunkLBDC5434cjs.videoProjectDuration.call(void 0, r.project) }));
|
|
5509
5509
|
}
|
|
5510
5510
|
};
|
|
5511
5511
|
const rampTarget = (id) => {
|
|
5512
|
-
const at =
|
|
5512
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, project(), id);
|
|
5513
5513
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
5514
5514
|
const { clip } = at;
|
|
5515
5515
|
if (clip.type === "sequence") throw new Error(`Clip "${id}" is a compound clip, which plays its sequence at normal speed; change the speed of the clips inside the sequence instead.`);
|
|
5516
|
-
if (clip.type !== "media") throw new Error(`Clip "${id}" is a ${
|
|
5516
|
+
if (clip.type !== "media") throw new Error(`Clip "${id}" is a ${_chunkLBDC5434cjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to change the speed of; use a video or audio clip.`);
|
|
5517
5517
|
if (_optionalChain([project, 'call', _191 => _191(), 'access', _192 => _192.assets, 'access', _193 => _193.find, 'call', _194 => _194((a) => a.id === clip.asset), 'optionalAccess', _195 => _195.kind]) === "image") throw new Error(`Clip "${id}" is a still, so it has no motion to change the speed of.`);
|
|
5518
5518
|
return clip;
|
|
5519
5519
|
};
|
|
5520
5520
|
const rampOut = (r, id) => {
|
|
5521
5521
|
const outcome2 = r.outcomes[r.outcomes.length - 1];
|
|
5522
|
-
return { clip: clipOut(r.project, id), ...outcome2.rippled ? { rippled: outcome2.rippled } : {}, duration:
|
|
5522
|
+
return { clip: clipOut(r.project, id), ...outcome2.rippled ? { rippled: outcome2.rippled } : {}, duration: _chunkLBDC5434cjs.videoProjectDuration.call(void 0, r.project) };
|
|
5523
5523
|
};
|
|
5524
5524
|
const RIPPLE_RAMP = { type: "boolean", description: "Move later material on every sync-locked track by the change in length (default true); false refuses if the clip would overlap the next one." };
|
|
5525
5525
|
const setSpeedRamp = {
|
|
@@ -5550,8 +5550,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5550
5550
|
),
|
|
5551
5551
|
annotations: { title: "Ramp the speed", ...WRITE_IDEMPOTENT },
|
|
5552
5552
|
handler: ({ clip, segments, ripple }) => {
|
|
5553
|
-
const edit =
|
|
5554
|
-
return apply(edit, "Speed ramp", (r) => ({ ...rampOut(r, clip), source: Math.round(
|
|
5553
|
+
const edit = _chunkLBDC5434cjs.videoSpeedRampEdit.call(void 0, rampTarget(clip), segments, _nullishCoalesce(ripple, () => ( true)));
|
|
5554
|
+
return apply(edit, "Speed ramp", (r) => ({ ...rampOut(r, clip), source: Math.round(_chunkLBDC5434cjs.videoSpeedRampKeys.call(void 0, segments).source) }));
|
|
5555
5555
|
}
|
|
5556
5556
|
};
|
|
5557
5557
|
const addFreeze = {
|
|
@@ -5571,8 +5571,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5571
5571
|
handler: ({ clip, at, duration, ripple }) => {
|
|
5572
5572
|
const c = rampTarget(clip);
|
|
5573
5573
|
const t = at - c.start;
|
|
5574
|
-
if (t < 0 || t > c.duration) throw new Error(`${
|
|
5575
|
-
return apply(
|
|
5574
|
+
if (t < 0 || t > c.duration) throw new Error(`${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, at)} is outside clip "${clip}" (${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, c.start)}\u2013${_chunkLBDC5434cjs.formatVideoSeconds.call(void 0, _chunkLBDC5434cjs.videoClipEnd.call(void 0, c))}); pick a time inside it.`);
|
|
5575
|
+
return apply(_chunkLBDC5434cjs.videoFreezeFrameEdit.call(void 0, c, t, duration, _nullishCoalesce(ripple, () => ( true))), "Freeze frame", (r) => rampOut(r, clip));
|
|
5576
5576
|
}
|
|
5577
5577
|
};
|
|
5578
5578
|
const removeRamp = {
|
|
@@ -5745,7 +5745,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5745
5745
|
let from;
|
|
5746
5746
|
let to;
|
|
5747
5747
|
if (args.clip !== void 0) {
|
|
5748
|
-
const found =
|
|
5748
|
+
const found = _chunkLBDC5434cjs.findVideoClip.call(void 0, p, args.clip);
|
|
5749
5749
|
if (!found) throw new Error(`There is no clip "${args.clip}"; get_video_project lists the clips.`);
|
|
5750
5750
|
const c = found.clip;
|
|
5751
5751
|
if (c.type === "sequence") throw new Error(`Clip "${c.id}" is a compound clip; its sound is the mix of its sequence "${c.sequence}", so read the levels of the media in it (list_video_sequences lists its clips and assets).`);
|
|
@@ -5755,7 +5755,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5755
5755
|
toSource = (t) => (_nullishCoalesce(c.in, () => ( 0))) + (t - c.start) * speed;
|
|
5756
5756
|
toOut = (s) => c.start + (s - (_nullishCoalesce(c.in, () => ( 0)))) / speed;
|
|
5757
5757
|
from = Math.max(c.start, _nullishCoalesce(args.from, () => ( c.start)));
|
|
5758
|
-
to = Math.min(
|
|
5758
|
+
to = Math.min(_chunkLBDC5434cjs.videoClipEnd.call(void 0, c), _nullishCoalesce(args.to, () => ( _chunkLBDC5434cjs.videoClipEnd.call(void 0, c))));
|
|
5759
5759
|
} else {
|
|
5760
5760
|
asset = p.assets.find((a) => a.id === args.asset);
|
|
5761
5761
|
if (!asset) throw new Error(`There is no asset "${args.asset}"; the assets are ${p.assets.map((a) => `"${a.id}"`).join(", ") || "none"}.`);
|
|
@@ -5836,15 +5836,15 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5836
5836
|
annotations: { title: "Measure a frame with scopes", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
5837
5837
|
handler: async ({ time, bins, columns }) => {
|
|
5838
5838
|
const p = project();
|
|
5839
|
-
const end =
|
|
5839
|
+
const end = _chunkLBDC5434cjs.videoProjectDuration.call(void 0, p);
|
|
5840
5840
|
const t = _nullishCoalesce(time, () => ( controller.getState().time));
|
|
5841
5841
|
if (time !== void 0 && time > end) throw new Error(`Time ${time} ms is past the end of the project (${end} ms).`);
|
|
5842
5842
|
const pixels = await pixelsAt(t);
|
|
5843
|
-
return { time: t, timecode:
|
|
5843
|
+
return { time: t, timecode: _chunkLBDC5434cjs.formatVideoTimecode.call(void 0, t, p.fps), width: pixels.width, height: pixels.height, ...summarizeVideoScopes(pixels, { bins, columns }) };
|
|
5844
5844
|
}
|
|
5845
5845
|
};
|
|
5846
5846
|
const MASK_FIELDS = {
|
|
5847
|
-
shape: { type: "string", enum: [...
|
|
5847
|
+
shape: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_MASK_SHAPES], description: "rectangle (with corner_radius), ellipse, linear (a straight split: the side above the line at rotation 0 shows) or polygon (points)." },
|
|
5848
5848
|
x: { type: "number", description: "Centre across the clip's picture, 0 (left edge) to 1 (right edge); default 0.5." },
|
|
5849
5849
|
y: { type: "number", description: "Centre down the clip's picture, 0 (top) to 1 (bottom); default 0.5." },
|
|
5850
5850
|
width: { type: "number", minimum: 0, description: "Width as a fraction of the picture's width (default 0.5). Unused by linear." },
|
|
@@ -5864,10 +5864,10 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5864
5864
|
track: { ...TRACK_ID, description: 'A video track to put it on; tracks below it are "underneath".' },
|
|
5865
5865
|
start: MS("Where it starts on the timeline (default: the end of the track)"),
|
|
5866
5866
|
duration: { type: "number", exclusiveMinimum: 0, description: "How long it lasts, in ms (default 3000)." },
|
|
5867
|
-
scope: { type: "string", enum: [...
|
|
5867
|
+
scope: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_ADJUSTMENT_SCOPES], description: "Which pictures it changes: underneath (default), all or track." },
|
|
5868
5868
|
target_track: { ...TRACK_ID, description: 'For scope "track" (required then): the track whose pictures it changes.' },
|
|
5869
5869
|
grade: GRADE,
|
|
5870
|
-
preset: { type: "string", enum: [...
|
|
5870
|
+
preset: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_GRADE_PRESET_NAMES], description: "A named look to start from (grade settings given override it)." },
|
|
5871
5871
|
amount: { type: "number", minimum: 0, maximum: 1, description: "Strength of the preset, 0\u20131 (default 1)." },
|
|
5872
5872
|
name: { type: "string", minLength: 1, description: 'A label for the clip (e.g. "Night look").' },
|
|
5873
5873
|
id: { type: "string", minLength: 1, description: 'Your own id for the clip (default: a fresh one such as "c7").' },
|
|
@@ -5881,13 +5881,13 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5881
5881
|
if (t && t.kind !== "video") throw new Error(`Track "${track}" is an audio track; adjustment clips change pictures, so put it on a video track.`);
|
|
5882
5882
|
if (scope === "track" && !target_track) throw new Error('Scope "track" needs target_track: the id of the track whose pictures it changes.');
|
|
5883
5883
|
if (target_track !== void 0 && scope !== "track") throw new Error('target_track is only for scope "track"; leave it out or set scope to "track".');
|
|
5884
|
-
const look = { ...preset ?
|
|
5884
|
+
const look = { ...preset ? _chunkLBDC5434cjs.videoGradePreset.call(void 0, preset, _nullishCoalesce(amount, () => ( 1))) : {}, ..._nullishCoalesce(grade, () => ( {})) };
|
|
5885
5885
|
const clip = { type: "adjustment", ...id ? { id } : {}, ...name ? { name } : {}, ...start !== void 0 ? { start } : {}, duration: _nullishCoalesce(duration, () => ( 3e3)), ...scope ? { scope } : {}, ...target_track ? { targetTrack: target_track } : {}, ...Object.keys(look).length ? { grade: look } : {} };
|
|
5886
5886
|
return apply({ op: "add_clip", track, clip, mode }, "Add adjustment clip", (r) => ({ clip: clipOut(r.project, r.outcomes[0].clip), ...placed(r.outcomes[0]), ...Object.keys(look).length ? {} : { hint: "It changes nothing yet: give it a grade (update_video_clip), effects (apply_effect) or a mask." } }));
|
|
5887
5887
|
}
|
|
5888
5888
|
};
|
|
5889
5889
|
const maskTarget = (id) => {
|
|
5890
|
-
const at =
|
|
5890
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, project(), id);
|
|
5891
5891
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
5892
5892
|
if (at.track.kind !== "video") throw new Error(`Clip "${id}" is on audio track "${at.track.id}"; masks cut pictures, so pass a clip on a video track.`);
|
|
5893
5893
|
return at;
|
|
@@ -5929,13 +5929,13 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5929
5929
|
gradeTargets(clips);
|
|
5930
5930
|
const edits = [];
|
|
5931
5931
|
for (const id of clips) {
|
|
5932
|
-
const clip =
|
|
5932
|
+
const clip = _chunkLBDC5434cjs.findVideoClip.call(void 0, project(), id).clip;
|
|
5933
5933
|
const lut = _optionalChain([clip, 'access', _196 => _196.grade, 'optionalAccess', _197 => _197.lut]);
|
|
5934
5934
|
if (!lut) throw new Error(`Clip "${id}" has no LUT to protect skin from; add one with set_video_lut first.`);
|
|
5935
5935
|
const { preserveSkinTones: _p, ...rest } = lut;
|
|
5936
5936
|
edits.push({ op: "update_clip", clip: id, set: { grade: { ...clip.grade, lut: amount > 0 ? { ...rest, preserveSkinTones: amount } : rest } } });
|
|
5937
5937
|
}
|
|
5938
|
-
return apply(edits, amount > 0 ? "Protect skin tones" : "Stop protecting skin tones", (r) => ({ clips: clips.map((id) => ({ id, lut: _nullishCoalesce(_optionalChain([
|
|
5938
|
+
return apply(edits, amount > 0 ? "Protect skin tones" : "Stop protecting skin tones", (r) => ({ clips: clips.map((id) => ({ id, lut: _nullishCoalesce(_optionalChain([_chunkLBDC5434cjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _198 => _198.clip, 'access', _199 => _199.grade, 'optionalAccess', _200 => _200.lut]), () => ( null)) })) }));
|
|
5939
5939
|
}
|
|
5940
5940
|
};
|
|
5941
5941
|
const planOut = (plan) => ({
|
|
@@ -5988,7 +5988,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
|
|
|
5988
5988
|
handler: ({ plan }) => {
|
|
5989
5989
|
const r = controller.applyPlan(plan);
|
|
5990
5990
|
if (!r.ok) throw new Error(r.error);
|
|
5991
|
-
return { plan: r.plan.id, title: r.plan.title, stale: r.stale, outcomes: r.outcomes, duration:
|
|
5991
|
+
return { plan: r.plan.id, title: r.plan.title, stale: r.stale, outcomes: r.outcomes, duration: _chunkLBDC5434cjs.videoProjectDuration.call(void 0, r.project), issues: issueSummary(r.issues) };
|
|
5992
5992
|
}
|
|
5993
5993
|
};
|
|
5994
5994
|
const discardPlan = {
|
|
@@ -6126,7 +6126,7 @@ var KEYS2 = {
|
|
|
6126
6126
|
properties: {
|
|
6127
6127
|
t: { type: "number", description: "Clip-relative time in ms (0 = the clip's start)." },
|
|
6128
6128
|
v: { type: "number", description: "The control's value at t, within its range from describe_effect." },
|
|
6129
|
-
ease: { anyOf: [{ type: "string", enum: [...
|
|
6129
|
+
ease: { anyOf: [{ type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_EASE_NAMES] }, { type: "array", items: { type: "number" }, minItems: 4, maxItems: 4 }], description: "How the value moves to the next key: linear (default), hold, ease-in, ease-out, ease-in-out, or CSS cubic-bezier [x1, y1, x2, y2]." }
|
|
6130
6130
|
},
|
|
6131
6131
|
required: ["t", "v"],
|
|
6132
6132
|
additionalProperties: false
|
|
@@ -6140,7 +6140,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
6140
6140
|
return controller.readOnlyReason();
|
|
6141
6141
|
};
|
|
6142
6142
|
const clipOf = (id) => {
|
|
6143
|
-
const at =
|
|
6143
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, controller.getProject(), id);
|
|
6144
6144
|
if (!at) {
|
|
6145
6145
|
const ids = controller.getProject().tracks.flatMap((t) => t.clips.map((c) => c.id));
|
|
6146
6146
|
throw new Error(`There is no clip "${id}"; the clips are ${ids.map((c) => `"${c}"`).join(", ") || "none"} (get_video_project lists them).`);
|
|
@@ -6226,7 +6226,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
6226
6226
|
duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms (default: the effect's own length, else 5000)." },
|
|
6227
6227
|
values: ctx.valuesSchema("Control values over the effect's defaults", true),
|
|
6228
6228
|
name: { type: "string", minLength: 1, description: "A label for the clip (default: the effect's name)." },
|
|
6229
|
-
mode: { type: "string", enum: [...
|
|
6229
|
+
mode: { type: "string", enum: [..._chunkLBDC5434cjs.VIDEO_PLACEMENT_MODES], description: "What to do with clips already there: refuse (default), overwrite or insert." }
|
|
6230
6230
|
},
|
|
6231
6231
|
required: ["track", "effect"],
|
|
6232
6232
|
additionalProperties: false
|
|
@@ -6327,7 +6327,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
|
|
|
6327
6327
|
const clip = clipOf(args.clip);
|
|
6328
6328
|
if (clip.type !== "effect") throw new Error(`Clip "${args.clip}" is not an effect clip; give the id of one of its effects (list_applied_effects).`);
|
|
6329
6329
|
const was = _optionalChain([clip, 'access', _207 => _207.values, 'optionalAccess', _208 => _208[args.control]]);
|
|
6330
|
-
const plain = keys === null ?
|
|
6330
|
+
const plain = keys === null ? _chunkLBDC5434cjs.isVideoKeyframes.call(void 0, was) ? _optionalChain([was, 'access', _209 => _209.keys, 'access', _210 => _210[0], 'optionalAccess', _211 => _211.v]) : was : { keys: [...keys].sort((a, b) => a.t - b.t) };
|
|
6331
6331
|
if (plain === void 0) throw new Error(`"${args.control}" has no value to keep; give keys instead.`);
|
|
6332
6332
|
r = await controller.updateEffectValues(args.clip, "generator", { [args.control]: plain });
|
|
6333
6333
|
} else r = await controller.setClipEffectKeyframes(args.clip, args.effect, args.control, keys);
|
|
@@ -6405,7 +6405,7 @@ function createVideoDialogueToolProvider(controller, options = {}) {
|
|
|
6405
6405
|
const r = controller.proposePlan({ title, description: "Cuts fillers, long pauses and stutters found in the transcript, closing up every sync-locked track.", edits: videoRemoveRangesEdits(cuts), ranges: cuts.map((d) => ({ from: d.from, to: d.to, text: d.text, reason: d.kind })), source: "plan_video_dialogue_cleanup" });
|
|
6406
6406
|
if (!r.ok) throw new Error(r.error);
|
|
6407
6407
|
const p = r.plan;
|
|
6408
|
-
return { plan: { id: p.id, title: p.title, summary: p.summary, text: describeVideoEditPlan(p), cuts: cuts.length }, durationNow:
|
|
6408
|
+
return { plan: { id: p.id, title: p.title, summary: p.summary, text: describeVideoEditPlan(p), cuts: cuts.length }, durationNow: _chunkLBDC5434cjs.videoProjectDuration.call(void 0, controller.getProject()), hint: `Nothing changed yet. Show the user the plan, then call apply_video_edit_plan with plan "${p.id}" (or discard_video_edit_plan).` };
|
|
6409
6409
|
}
|
|
6410
6410
|
};
|
|
6411
6411
|
return withVideoPlayback(
|
|
@@ -6452,7 +6452,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6452
6452
|
};
|
|
6453
6453
|
const project = () => controller.getProject();
|
|
6454
6454
|
const soundClip = (p, id) => {
|
|
6455
|
-
const at =
|
|
6455
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, p, id);
|
|
6456
6456
|
if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
|
|
6457
6457
|
const c = at.clip;
|
|
6458
6458
|
if (c.type !== "media") throw new Error(`Clip "${id}" is a ${c.type} clip and has no sound of its own; pass a video or audio clip.`);
|
|
@@ -6468,8 +6468,8 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6468
6468
|
const { clip, asset: asset2 } = soundClip(p, args.clip);
|
|
6469
6469
|
const speed = _nullishCoalesce(clip.speed, () => ( 1));
|
|
6470
6470
|
const from2 = Math.max(clip.start, _nullishCoalesce(args.from, () => ( clip.start)));
|
|
6471
|
-
const to2 = Math.min(
|
|
6472
|
-
if (!(to2 > from2)) throw new Error(`The stretch is empty (${from2}\u2013${to2} ms); "from" and "to" must be inside the clip (${clip.start}\u2013${
|
|
6471
|
+
const to2 = Math.min(_chunkLBDC5434cjs.videoClipEnd.call(void 0, clip), _nullishCoalesce(args.to, () => ( _chunkLBDC5434cjs.videoClipEnd.call(void 0, clip))));
|
|
6472
|
+
if (!(to2 > from2)) throw new Error(`The stretch is empty (${from2}\u2013${to2} ms); "from" and "to" must be inside the clip (${clip.start}\u2013${_chunkLBDC5434cjs.videoClipEnd.call(void 0, clip)} ms) with "to" after "from".`);
|
|
6473
6473
|
return { asset: asset2, from: (_nullishCoalesce(clip.in, () => ( 0))) + (from2 - clip.start) * speed, to: (_nullishCoalesce(clip.in, () => ( 0))) + (to2 - clip.start) * speed, out: (s) => clip.start + (s - (_nullishCoalesce(clip.in, () => ( 0)))) / speed };
|
|
6474
6474
|
}
|
|
6475
6475
|
const asset = p.assets.find((a) => a.id === args.asset);
|
|
@@ -6511,7 +6511,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6511
6511
|
handler: async ({ clips, target, ceiling, replace }) => {
|
|
6512
6512
|
const p = project();
|
|
6513
6513
|
const targets = clips.map((id) => soundClip(p, id));
|
|
6514
|
-
for (const t of targets) if (
|
|
6514
|
+
for (const t of targets) if (_chunkLBDC5434cjs.isVideoKeyframes.call(void 0, t.clip.volume) && !replace) throw new Error(`Clip "${t.clip.id}" has volume keyframes, which a constant gain would replace; pass replace: true, or remove them first.`);
|
|
6515
6515
|
const results = [];
|
|
6516
6516
|
const edits = [];
|
|
6517
6517
|
for (const { clip, asset } of targets) {
|
|
@@ -6556,7 +6556,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6556
6556
|
handler: async (args) => {
|
|
6557
6557
|
const p = project();
|
|
6558
6558
|
const music = args.music.map((id) => soundClip(p, id));
|
|
6559
|
-
for (const m of music) if (
|
|
6559
|
+
for (const m of music) if (_chunkLBDC5434cjs.isVideoKeyframes.call(void 0, m.clip.volume) && !args.replace) throw new Error(`Music clip "${m.clip.id}" already has volume keyframes; pass replace: true to replace them, or remove them first.`);
|
|
6560
6560
|
const transcriptTrack = videoTranscriptTrack(p, args.dialogue_track);
|
|
6561
6561
|
const mode = _nullishCoalesce(args.speech, () => ( (transcriptTrack && videoTimelineTranscript(p, { track: transcriptTrack }).length ? "transcript" : "audio")));
|
|
6562
6562
|
let ranges = [];
|
|
@@ -6569,7 +6569,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6569
6569
|
const track = p.tracks.find((t) => t.id === args.dialogue_track);
|
|
6570
6570
|
if (!track) throw new Error(`There is no track "${args.dialogue_track}".`);
|
|
6571
6571
|
const musicIds = new Set(music.map((m) => m.clip.id));
|
|
6572
|
-
for (const c of
|
|
6572
|
+
for (const c of _chunkLBDC5434cjs.sortedVideoClips.call(void 0, track)) {
|
|
6573
6573
|
if (c.type !== "media" || musicIds.has(c.id)) continue;
|
|
6574
6574
|
const asset = p.assets.find((a) => a.id === c.asset);
|
|
6575
6575
|
if (!asset || asset.kind === "image" || asset.hasAudio === false) continue;
|
|
@@ -6580,10 +6580,10 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6580
6580
|
let at = c.start;
|
|
6581
6581
|
for (const s of silences) {
|
|
6582
6582
|
const a = c.start + (s.start - src0) / speed;
|
|
6583
|
-
if (a - at >
|
|
6583
|
+
if (a - at > _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: a });
|
|
6584
6584
|
at = c.start + (s.end - src0) / speed;
|
|
6585
6585
|
}
|
|
6586
|
-
if (
|
|
6586
|
+
if (_chunkLBDC5434cjs.videoClipEnd.call(void 0, c) - at > _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: _chunkLBDC5434cjs.videoClipEnd.call(void 0, c) });
|
|
6587
6587
|
}
|
|
6588
6588
|
if (!ranges.length) throw new Error(`Track "${args.dialogue_track}" has no sound above -40 dBFS, so there is no speech to duck under.`);
|
|
6589
6589
|
}
|
|
@@ -6646,7 +6646,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6646
6646
|
if (!beats.length) throw new Error(`No beats were found in "${args.music}"; try a lower sensitivity, or pass beats.`);
|
|
6647
6647
|
} else beats = [...args.beats].sort((a, b) => a - b);
|
|
6648
6648
|
const tolerance = _nullishCoalesce(args.tolerance, () => ( 150));
|
|
6649
|
-
const clips =
|
|
6649
|
+
const clips = _chunkLBDC5434cjs.sortedVideoClips.call(void 0, track);
|
|
6650
6650
|
const edits = [];
|
|
6651
6651
|
const ranges = [];
|
|
6652
6652
|
const skipped = [];
|
|
@@ -6654,8 +6654,8 @@ function createVideoMusicToolProvider(controller, options = {}) {
|
|
|
6654
6654
|
for (let i = 0; i + 1 < clips.length; i++) {
|
|
6655
6655
|
const left = clips[i];
|
|
6656
6656
|
const right = clips[i + 1];
|
|
6657
|
-
const cut =
|
|
6658
|
-
if (Math.abs(right.start - cut) >
|
|
6657
|
+
const cut = _chunkLBDC5434cjs.videoClipEnd.call(void 0, left);
|
|
6658
|
+
if (Math.abs(right.start - cut) > _chunkLBDC5434cjs.VIDEO_TIME_EPSILON) continue;
|
|
6659
6659
|
const beat = nearestVideoBeat(beats, cut, tolerance);
|
|
6660
6660
|
if (beat === null) {
|
|
6661
6661
|
skipped.push({ cut: round4(cut), reason: `no beat within ${tolerance} ms` });
|
|
@@ -6730,7 +6730,7 @@ function videoClipEffectDocument(clip, instance, providerId) {
|
|
|
6730
6730
|
const values = {};
|
|
6731
6731
|
const tracks = {};
|
|
6732
6732
|
for (const [control, v] of Object.entries(_nullishCoalesce(effect.values, () => ( {})))) {
|
|
6733
|
-
if (
|
|
6733
|
+
if (_chunkLBDC5434cjs.isVideoKeyframes.call(void 0, v)) {
|
|
6734
6734
|
values[control] = v.keys[0].v;
|
|
6735
6735
|
tracks[control] = v.keys.map((k) => ({ time: k.t, value: k.v, ...k.ease && k.ease !== "linear" ? { easing: videoEaseToAnimationEasing(k.ease) } : {} }));
|
|
6736
6736
|
} else values[control] = v;
|
|
@@ -6771,10 +6771,10 @@ function videoEffectValuesFromDocument(doc) {
|
|
|
6771
6771
|
async function openVideoClipEffectAuthoring(controller, clip, instance, options = {}) {
|
|
6772
6772
|
const provider = controller.effectsProvider;
|
|
6773
6773
|
if (!provider) throw new Error("No effects provider is registered, so the effect cannot be opened for authoring; register one with setEffectsProvider.");
|
|
6774
|
-
const at =
|
|
6774
|
+
const at = _chunkLBDC5434cjs.findVideoClip.call(void 0, controller.getProject(), clip);
|
|
6775
6775
|
if (!at) throw new Error(`There is no clip "${clip}".`);
|
|
6776
6776
|
const doc = videoClipEffectDocument(at.clip, instance, provider.id);
|
|
6777
|
-
const session = await
|
|
6777
|
+
const session = await _chunkXUDMRMXQcjs.createEffectAuthoringSession.call(void 0, { document: doc }, { ...options, provider });
|
|
6778
6778
|
return {
|
|
6779
6779
|
clip,
|
|
6780
6780
|
instance,
|
|
@@ -7128,4 +7128,4 @@ function createVideoEditorDocument(controller) {
|
|
|
7128
7128
|
|
|
7129
7129
|
|
|
7130
7130
|
|
|
7131
|
-
exports.TranscriptVideoController = TranscriptVideoController; exports.VIDEO_ADJUSTMENT_SCOPES = _chunkCBVNCWJMcjs.VIDEO_ADJUSTMENT_SCOPES; exports.VIDEO_ADJUSTMENT_SCOPE_LABELS = VIDEO_ADJUSTMENT_SCOPE_LABELS; exports.VIDEO_BLEND_MODES = _chunkCBVNCWJMcjs.VIDEO_BLEND_MODES; exports.VIDEO_BLEND_MODE_LABELS = VIDEO_BLEND_MODE_LABELS; exports.VIDEO_CLIP_ANIMATION_DURATION = _chunkCBVNCWJMcjs.VIDEO_CLIP_ANIMATION_DURATION; exports.VIDEO_CLIP_ANIMATION_EFFECTS = _chunkCBVNCWJMcjs.VIDEO_CLIP_ANIMATION_EFFECTS; exports.VIDEO_CLIP_ANIMATION_LABELS = VIDEO_CLIP_ANIMATION_LABELS; exports.VIDEO_CLIP_TYPES = _chunkCBVNCWJMcjs.VIDEO_CLIP_TYPES; exports.VIDEO_DEFAULT_FILLERS = VIDEO_DEFAULT_FILLERS; exports.VIDEO_DEFAULT_STILL_DURATION = VIDEO_DEFAULT_STILL_DURATION; exports.VIDEO_DEFAULT_TITLE_DURATION = VIDEO_DEFAULT_TITLE_DURATION; exports.VIDEO_DISFLUENCY_KINDS = VIDEO_DISFLUENCY_KINDS; exports.VIDEO_EASE_NAMES = _chunkCBVNCWJMcjs.VIDEO_EASE_NAMES; exports.VIDEO_EDIT_OPS = VIDEO_EDIT_OPS; exports.VIDEO_EFFECT_PLACES = _chunkCBVNCWJMcjs.VIDEO_EFFECT_PLACES; exports.VIDEO_FADE_CURVES = _chunkCBVNCWJMcjs.VIDEO_FADE_CURVES; exports.VIDEO_FADE_CURVE_LABELS = VIDEO_FADE_CURVE_LABELS; exports.VIDEO_FITS = _chunkCBVNCWJMcjs.VIDEO_FITS; exports.VIDEO_GRADE_CONTROLS = _chunkCBVNCWJMcjs.VIDEO_GRADE_CONTROLS; exports.VIDEO_GRADE_PRESETS = _chunkCBVNCWJMcjs.VIDEO_GRADE_PRESETS; exports.VIDEO_GRADE_PRESET_NAMES = _chunkCBVNCWJMcjs.VIDEO_GRADE_PRESET_NAMES; exports.VIDEO_ISSUE_CODES = VIDEO_ISSUE_CODES; exports.VIDEO_KEYFRAME_LIMITS = _chunkCBVNCWJMcjs.VIDEO_KEYFRAME_LIMITS; exports.VIDEO_KEYFRAME_PROPERTIES = _chunkCBVNCWJMcjs.VIDEO_KEYFRAME_PROPERTIES; exports.VIDEO_LOUDNESS_HOP = VIDEO_LOUDNESS_HOP; exports.VIDEO_LUT_MAX_SIZE = _chunkCBVNCWJMcjs.VIDEO_LUT_MAX_SIZE; exports.VIDEO_MASK_DEFAULTS = _chunkCBVNCWJMcjs.VIDEO_MASK_DEFAULTS; exports.VIDEO_MASK_SHAPES = _chunkCBVNCWJMcjs.VIDEO_MASK_SHAPES; exports.VIDEO_MASK_SHAPE_LABELS = VIDEO_MASK_SHAPE_LABELS; exports.VIDEO_PEAK_BLOCK = VIDEO_PEAK_BLOCK; exports.VIDEO_PLACEMENT_MODES = _chunkCBVNCWJMcjs.VIDEO_PLACEMENT_MODES; exports.VIDEO_PREVIEW_SCALE_OPTIONS = VIDEO_PREVIEW_SCALE_OPTIONS; exports.VIDEO_PROXY_SCALES = VIDEO_PROXY_SCALES; exports.VIDEO_SCOPE_KINDS = VIDEO_SCOPE_KINDS; exports.VIDEO_TIME_EPSILON = _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON; exports.VIDEO_TRANSFORM_PROPERTIES = _chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES; exports.VIDEO_TRANSITION_LABELS = VIDEO_TRANSITION_LABELS; exports.VIDEO_TRANSITION_TYPES = _chunkCBVNCWJMcjs.VIDEO_TRANSITION_TYPES; exports.VIDEO_VECTORSCOPE_TARGETS = VIDEO_VECTORSCOPE_TARGETS; exports.VIDEO_WIPE_DIRECTIONS = _chunkCBVNCWJMcjs.VIDEO_WIPE_DIRECTIONS; exports.VideoAudioPeaksCache = VideoAudioPeaksCache; exports.VideoEditorController = VideoEditorController; exports.VideoEffectsEngine = _chunkCBVNCWJMcjs.VideoEffectsEngine; exports.VideoFrameCache = VideoFrameCache; exports.VideoLutCache = _chunkCBVNCWJMcjs.VideoLutCache; exports.VideoPathGesture = VideoPathGesture; exports.VideoPreviewEngine = VideoPreviewEngine; exports.VideoPreviewPixels = VideoPreviewPixels; exports.allVideoClipIds = _chunkCBVNCWJMcjs.allVideoClipIds; exports.allVideoTracks = _chunkCBVNCWJMcjs.allVideoTracks; exports.animationEasingToVideoEase = animationEasingToVideoEase; exports.applyVideoEdits = applyVideoEdits; exports.applyVideoGrade = _chunkCBVNCWJMcjs.applyVideoGrade; exports.applyVideoLut = _chunkCBVNCWJMcjs.applyVideoLut; exports.applyVideoLutToPixels = _chunkCBVNCWJMcjs.applyVideoLutToPixels; exports.bakeVideoClipCamera = bakeVideoClipCamera; exports.buildVideoAudioPeaks = buildVideoAudioPeaks; exports.checkVideoEffectPlace = _chunkCBVNCWJMcjs.checkVideoEffectPlace; exports.checkVideoEffectValues = _chunkCBVNCWJMcjs.checkVideoEffectValues; exports.checkVideoProject = checkVideoProject; exports.checkVideoTimeRemap = _chunkCBVNCWJMcjs.checkVideoTimeRemap; exports.createVideoDialogueToolProvider = createVideoDialogueToolProvider; exports.createVideoEditorDocument = createVideoEditorDocument; exports.createVideoEditorToolProvider = createVideoEditorToolProvider; exports.createVideoEffectsToolProvider = createVideoEffectsToolProvider; exports.createVideoElementDecoder = createVideoElementDecoder; exports.createVideoMusicToolProvider = createVideoMusicToolProvider; exports.createVideoProject = createVideoProject; exports.decodeVideoAudioPeaks = decodeVideoAudioPeaks; exports.describeVideoEditPlan = describeVideoEditPlan; exports.describeVideoProject = describeVideoProject; exports.describeVideoSequence = describeVideoSequence; exports.detectVideoDisfluencies = detectVideoDisfluencies; exports.diffVideoProjects = diffVideoProjects; exports.drawVideoFrame = _chunkCBVNCWJMcjs.drawVideoFrame; exports.ffmpegFilterValue = _chunkCBVNCWJMcjs.ffmpegFilterValue; exports.findVideoAudioBeats = findVideoAudioBeats; exports.findVideoAudioSilences = findVideoAudioSilences; exports.findVideoClip = _chunkCBVNCWJMcjs.findVideoClip; exports.findVideoFillers = findVideoFillers; exports.findVideoGaps = _chunkCBVNCWJMcjs.findVideoGaps; exports.findVideoRepetitions = findVideoRepetitions; exports.findVideoSequenceClip = _chunkCBVNCWJMcjs.findVideoSequenceClip; exports.findVideoSequenceCycle = _chunkCBVNCWJMcjs.findVideoSequenceCycle; exports.findVideoTranscriptPauses = findVideoTranscriptPauses; exports.findVideoTranscriptText = findVideoTranscriptText; exports.formatVideoSeconds = _chunkCBVNCWJMcjs.formatVideoSeconds; exports.formatVideoTimecode = _chunkCBVNCWJMcjs.formatVideoTimecode; exports.formatVideoTimecodeFrames = _chunkCBVNCWJMcjs.formatVideoTimecodeFrames; exports.framePointsToPicture = framePointsToPicture; exports.isVideoDropFrameRate = _chunkCBVNCWJMcjs.isVideoDropFrameRate; exports.isVideoKeyframes = _chunkCBVNCWJMcjs.isVideoKeyframes; exports.measureVideoLoudness = measureVideoLoudness; exports.mergeVideoRanges = mergeVideoRanges; exports.mixEffectPixels = _chunkCBVNCWJMcjs.mixEffectPixels; exports.nearestVideoBeat = nearestVideoBeat; exports.nextFreeVideoSlot = _chunkCBVNCWJMcjs.nextFreeVideoSlot; exports.normalizeVideoClipMask = _chunkCBVNCWJMcjs.normalizeVideoClipMask; exports.normalizeVideoGrade = _chunkCBVNCWJMcjs.normalizeVideoGrade; exports.normalizeVideoGradeLut = _chunkCBVNCWJMcjs.normalizeVideoGradeLut; exports.normalizeVideoWord = normalizeVideoWord; exports.openVideoClipEffectAuthoring = openVideoClipEffectAuthoring; exports.overEffectPixels = _chunkCBVNCWJMcjs.overEffectPixels; exports.parseVideoAnimatable = parseVideoAnimatable; exports.parseVideoAsset = parseVideoAsset; exports.parseVideoAssetProxies = parseVideoAssetProxies; exports.parseVideoClip = parseVideoClip; exports.parseVideoClipAnimation = parseVideoClipAnimation; exports.parseVideoClipCamera = parseVideoClipCamera; exports.parseVideoClipEffects = parseVideoClipEffects; exports.parseVideoClipMask = parseVideoClipMask; exports.parseVideoCubeLut = _chunkCBVNCWJMcjs.parseVideoCubeLut; exports.parseVideoEffectRef = parseVideoEffectRef; exports.parseVideoEffectValues = parseVideoEffectValues; exports.parseVideoGrade = parseVideoGrade; exports.parseVideoGradeLut = parseVideoGradeLut; exports.parseVideoKeyframes = parseVideoKeyframes; exports.parseVideoLoudnessMeasurement = _chunkCBVNCWJMcjs.parseVideoLoudnessMeasurement; exports.parseVideoMarker = parseVideoMarker; exports.parseVideoPreviewScale = parseVideoPreviewScale; exports.parseVideoProject = parseVideoProject; exports.parseVideoSequence = parseVideoSequence; exports.parseVideoTimeRef = parseVideoTimeRef; exports.parseVideoTimeRemap = parseVideoTimeRemap; exports.parseVideoTrack = parseVideoTrack; exports.parseVideoTranscript = parseVideoTranscript; exports.parseVideoTranscriptWords = parseVideoTranscriptWords; exports.parseVideoTransform = parseVideoTransform; exports.parseVideoTransition = parseVideoTransition; exports.placeVideoRect = _chunkCBVNCWJMcjs.placeVideoRect; exports.planVideoClipDrag = planVideoClipDrag; exports.planVideoEdits = planVideoEdits; exports.planVideoPrefetch = planVideoPrefetch; exports.planVideoToolPlayback = planVideoToolPlayback; exports.probeVideoMedia = probeVideoMedia; exports.readVideoScopesPanel = readVideoScopesPanel; exports.removeVideoKey = _chunkCBVNCWJMcjs.removeVideoKey; exports.renderVideoFrameExact = _chunkCBVNCWJMcjs.renderVideoFrameExact; exports.resolveVideoPreviewScale = resolveVideoPreviewScale; exports.retimeVideoAnimatable = _chunkCBVNCWJMcjs.retimeVideoAnimatable; exports.setVideoKey = _chunkCBVNCWJMcjs.setVideoKey; exports.snapToVideoFrame = _chunkCBVNCWJMcjs.snapToVideoFrame; exports.snapVideoTime = _chunkCBVNCWJMcjs.snapVideoTime; exports.sortVideoKeys = _chunkCBVNCWJMcjs.sortVideoKeys; exports.sortedVideoClips = _chunkCBVNCWJMcjs.sortedVideoClips; exports.splitVideoAnimatable = _chunkCBVNCWJMcjs.splitVideoAnimatable; exports.summarizeVideoScopes = summarizeVideoScopes; exports.toVideoEdl = _chunkCBVNCWJMcjs.toVideoEdl; exports.toVideoFfmpeg = _chunkCBVNCWJMcjs.toVideoFfmpeg; exports.toVideoLoudnessMeasure = _chunkCBVNCWJMcjs.toVideoLoudnessMeasure; exports.videoAddAdjustmentEdits = videoAddAdjustmentEdits; exports.videoAssetDropEdit = videoAssetDropEdit; exports.videoAssetHasSound = _chunkCBVNCWJMcjs.videoAssetHasSound; exports.videoAssetKindOf = videoAssetKindOf; exports.videoAssetMap = _chunkCBVNCWJMcjs.videoAssetMap; exports.videoAssetProxy = videoAssetProxy; exports.videoAudioLevels = videoAudioLevels; exports.videoAudioLoudness = videoAudioLoudness; exports.videoAudioPeakRange = videoAudioPeakRange; exports.videoAudioPeakSpans = videoAudioPeakSpans; exports.videoAudioPeaksDuration = videoAudioPeaksDuration; exports.videoAuthorableEffects = videoAuthorableEffects; exports.videoCacheEvictions = videoCacheEvictions; exports.videoCameraBase = videoCameraBase; exports.videoCameraMoveTools = videoCameraMoveTools; exports.videoCameraView = videoCameraView; exports.videoChroma = videoChroma; exports.videoClipAfter = _chunkCBVNCWJMcjs.videoClipAfter; exports.videoClipAnimated = _chunkCBVNCWJMcjs.videoClipAnimated; exports.videoClipAnimationProperties = _chunkCBVNCWJMcjs.videoClipAnimationProperties; exports.videoClipAnimationSpans = _chunkCBVNCWJMcjs.videoClipAnimationSpans; exports.videoClipAppliedEffects = videoClipAppliedEffects; exports.videoClipBefore = _chunkCBVNCWJMcjs.videoClipBefore; exports.videoClipCameraMove = videoClipCameraMove; exports.videoClipEffectDocument = videoClipEffectDocument; exports.videoClipEffectUses = _chunkCBVNCWJMcjs.videoClipEffectUses; exports.videoClipEnd = _chunkCBVNCWJMcjs.videoClipEnd; exports.videoClipHandles = _chunkCBVNCWJMcjs.videoClipHandles; exports.videoClipHeading = videoClipHeading; exports.videoClipKeyframes = videoClipKeyframes; exports.videoClipLabel = videoClipLabel; exports.videoClipMaskOutline = videoClipMaskOutline; exports.videoClipOverhang = _chunkCBVNCWJMcjs.videoClipOverhang; exports.videoClipPicture = videoClipPicture; exports.videoClipShowsWaveform = videoClipShowsWaveform; exports.videoClipSoundGain = _chunkCBVNCWJMcjs.videoClipSoundGain; exports.videoClipSourceRange = _chunkCBVNCWJMcjs.videoClipSourceRange; exports.videoClipSourceTime = _chunkCBVNCWJMcjs.videoClipSourceTime; exports.videoClipSpeed = _chunkCBVNCWJMcjs.videoClipSpeed; exports.videoClipSpeedAt = _chunkCBVNCWJMcjs.videoClipSpeedAt; exports.videoClipTint = videoClipTint; exports.videoClipTypeLabel = _chunkCBVNCWJMcjs.videoClipTypeLabel; exports.videoClipWaveform = videoClipWaveform; exports.videoClipWaveformPath = videoClipWaveformPath; exports.videoClipsAt = _chunkCBVNCWJMcjs.videoClipsAt; exports.videoContactSheetSvg = _chunkCBVNCWJMcjs.videoContactSheetSvg; exports.videoCutsWithMargin = videoCutsWithMargin; exports.videoDragLabel = videoDragLabel; exports.videoDropTracks = videoDropTracks; exports.videoDuckingKeys = videoDuckingKeys; exports.videoEaseBezier = _chunkCBVNCWJMcjs.videoEaseBezier; exports.videoEaseProgress = _chunkCBVNCWJMcjs.videoEaseProgress; exports.videoEaseToAnimationEasing = videoEaseToAnimationEasing; exports.videoEditsFromSequence = videoEditsFromSequence; exports.videoEffectFrameTime = _chunkCBVNCWJMcjs.videoEffectFrameTime; exports.videoEffectLayerKey = _chunkCBVNCWJMcjs.videoEffectLayerKey; exports.videoEffectValuesAt = _chunkCBVNCWJMcjs.videoEffectValuesAt; exports.videoEffectValuesFromDocument = videoEffectValuesFromDocument; exports.videoExposureNotes = videoExposureNotes; exports.videoExposureStats = videoExposureStats; exports.videoFadeCurveGain = _chunkCBVNCWJMcjs.videoFadeCurveGain; exports.videoFfmpegUnsupportedEffects = _chunkCBVNCWJMcjs.videoFfmpegUnsupportedEffects; exports.videoFfmpegUnsupportedFeatures = _chunkCBVNCWJMcjs.videoFfmpegUnsupportedFeatures; exports.videoFrameAt = _chunkCBVNCWJMcjs.videoFrameAt; exports.videoFrameCacheKey = videoFrameCacheKey; exports.videoFrameDuration = _chunkCBVNCWJMcjs.videoFrameDuration; exports.videoFrameLeafLayers = _chunkCBVNCWJMcjs.videoFrameLeafLayers; exports.videoFrameRequestsAt = videoFrameRequestsAt; exports.videoFrameToSvg = _chunkCBVNCWJMcjs.videoFrameToSvg; exports.videoFrames = _chunkCBVNCWJMcjs.videoFrames; exports.videoFreezeFrameEdit = _chunkCBVNCWJMcjs.videoFreezeFrameEdit; exports.videoGradeCssFilter = _chunkCBVNCWJMcjs.videoGradeCssFilter; exports.videoGradeFfmpegFilters = _chunkCBVNCWJMcjs.videoGradeFfmpegFilters; exports.videoGradeGainsFilterId = _chunkCBVNCWJMcjs.videoGradeGainsFilterId; exports.videoGradeLook = _chunkCBVNCWJMcjs.videoGradeLook; exports.videoGradePreset = _chunkCBVNCWJMcjs.videoGradePreset; exports.videoGradeStepMatrix = _chunkCBVNCWJMcjs.videoGradeStepMatrix; exports.videoGradeStepSvgValues = _chunkCBVNCWJMcjs.videoGradeStepSvgValues; exports.videoGradeSteps = _chunkCBVNCWJMcjs.videoGradeSteps; exports.videoGradeSvgDefs = _chunkCBVNCWJMcjs.videoGradeSvgDefs; exports.videoGradeSvgFilter = _chunkCBVNCWJMcjs.videoGradeSvgFilter; exports.videoHistogram = videoHistogram; exports.videoHistogramImage = videoHistogramImage; exports.videoHourFrames = _chunkCBVNCWJMcjs.videoHourFrames; exports.videoIrisRadius = _chunkCBVNCWJMcjs.videoIrisRadius; exports.videoIssueKey = videoIssueKey; exports.videoKeyTimesProblem = _chunkCBVNCWJMcjs.videoKeyTimesProblem; exports.videoKeyframeBreakpoints = _chunkCBVNCWJMcjs.videoKeyframeBreakpoints; exports.videoKeyframeFfmpegExpr = _chunkCBVNCWJMcjs.videoKeyframeFfmpegExpr; exports.videoKeyframeRows = videoKeyframeRows; exports.videoKeyframeToggleEdit = videoKeyframeToggleEdit; exports.videoKeyframeValueEdit = videoKeyframeValueEdit; exports.videoKeysOf = _chunkCBVNCWJMcjs.videoKeysOf; exports.videoLayerMask = _chunkCBVNCWJMcjs.videoLayerMask; exports.videoLayersUseEffects = _chunkCBVNCWJMcjs.videoLayersUseEffects; exports.videoLayersWithoutTransitionEffects = _chunkCBVNCWJMcjs.videoLayersWithoutTransitionEffects; exports.videoLoudnessEnergy = videoLoudnessEnergy; exports.videoLoudnessGain = videoLoudnessGain; exports.videoLoudnessOf = videoLoudnessOf; exports.videoLuma = videoLuma; exports.videoLumaWaveform = videoLumaWaveform; exports.videoLutEdits = videoLutEdits; exports.videoLutFromFunction = _chunkCBVNCWJMcjs.videoLutFromFunction; exports.videoLutSvgApproximation = _chunkCBVNCWJMcjs.videoLutSvgApproximation; exports.videoLutSvgPrimitives = _chunkCBVNCWJMcjs.videoLutSvgPrimitives; exports.videoLutToCube = _chunkCBVNCWJMcjs.videoLutToCube; exports.videoMaskContains = _chunkCBVNCWJMcjs.videoMaskContains; exports.videoMaskEdit = videoMaskEdit; exports.videoMaskPolygon = _chunkCBVNCWJMcjs.videoMaskPolygon; exports.videoMaskSvgPath = _chunkCBVNCWJMcjs.videoMaskSvgPath; exports.videoOverlap = _chunkCBVNCWJMcjs.videoOverlap; exports.videoPeakDb = videoPeakDb; exports.videoPreviewSrc = videoPreviewSrc; exports.videoProjectDuration = _chunkCBVNCWJMcjs.videoProjectDuration; exports.videoProjectEffects = _chunkCBVNCWJMcjs.videoProjectEffects; exports.videoProjectHasProxies = videoProjectHasProxies; exports.videoProjectSvg = _chunkCBVNCWJMcjs.videoProjectSvg; exports.videoProxyFfmpeg = videoProxyFfmpeg; exports.videoProxyName = videoProxyName; exports.videoProxyPlan = videoProxyPlan; exports.videoRemoveRangesEdits = videoRemoveRangesEdits; exports.videoRulerTicks = videoRulerTicks; exports.videoScopeImage = videoScopeImage; exports.videoSequenceChildren = _chunkCBVNCWJMcjs.videoSequenceChildren; exports.videoSequenceDuration = _chunkCBVNCWJMcjs.videoSequenceDuration; exports.videoSequenceMap = _chunkCBVNCWJMcjs.videoSequenceMap; exports.videoShellQuote = _chunkCBVNCWJMcjs.videoShellQuote; exports.videoSkinProtectionEdits = videoSkinProtectionEdits; exports.videoSkinToneWeight = _chunkCBVNCWJMcjs.videoSkinToneWeight; exports.videoSlowMotionRamp = _chunkCBVNCWJMcjs.videoSlowMotionRamp; exports.videoSnapPoints = _chunkCBVNCWJMcjs.videoSnapPoints; exports.videoSourceFrame = videoSourceFrame; exports.videoSourceFrameTime = videoSourceFrameTime; exports.videoSpeechRanges = videoSpeechRanges; exports.videoSpeedRampEdit = _chunkCBVNCWJMcjs.videoSpeedRampEdit; exports.videoSpeedRampKeys = _chunkCBVNCWJMcjs.videoSpeedRampKeys; exports.videoTextStyle = _chunkCBVNCWJMcjs.videoTextStyle; exports.videoTimeRef = videoTimeRef; exports.videoTimeRemapBreakpoints = _chunkCBVNCWJMcjs.videoTimeRemapBreakpoints; exports.videoTimeRemapSpan = _chunkCBVNCWJMcjs.videoTimeRemapSpan; exports.videoTimecodeFrames = _chunkCBVNCWJMcjs.videoTimecodeFrames; exports.videoTimelineTranscript = videoTimelineTranscript; exports.videoTitleFrame = _chunkCBVNCWJMcjs.videoTitleFrame; exports.videoTrackSyncLocked = _chunkCBVNCWJMcjs.videoTrackSyncLocked; exports.videoTranscriptEdit = videoTranscriptEdit; exports.videoTranscriptTrack = videoTranscriptTrack; exports.videoTransformAt = _chunkCBVNCWJMcjs.videoTransformAt; exports.videoTransformOfView = videoTransformOfView; exports.videoTransitionAudioCurve = _chunkCBVNCWJMcjs.videoTransitionAudioCurve; exports.videoTransitionEase = _chunkCBVNCWJMcjs.videoTransitionEase; exports.videoTransitionHasDirection = videoTransitionHasDirection; exports.videoValueAt = _chunkCBVNCWJMcjs.videoValueAt; exports.videoVectorscope = videoVectorscope; exports.videoVectorscopeAngle = videoVectorscopeAngle; exports.videoVectorscopeImage = videoVectorscopeImage; exports.videoVectorscopePoint = videoVectorscopePoint; exports.videoWaveformImage = videoWaveformImage; exports.videoWaveformPath = videoWaveformPath; exports.videoWipeRect = _chunkCBVNCWJMcjs.videoWipeRect; exports.videoWordAt = videoWordAt; exports.videoWordsRange = videoWordsRange; exports.withVideoPlayback = withVideoPlayback;
|
|
7131
|
+
exports.TranscriptVideoController = TranscriptVideoController; exports.VIDEO_ADJUSTMENT_SCOPES = _chunkLBDC5434cjs.VIDEO_ADJUSTMENT_SCOPES; exports.VIDEO_ADJUSTMENT_SCOPE_LABELS = VIDEO_ADJUSTMENT_SCOPE_LABELS; exports.VIDEO_BLEND_MODES = _chunkLBDC5434cjs.VIDEO_BLEND_MODES; exports.VIDEO_BLEND_MODE_LABELS = VIDEO_BLEND_MODE_LABELS; exports.VIDEO_CLIP_ANIMATION_DURATION = _chunkLBDC5434cjs.VIDEO_CLIP_ANIMATION_DURATION; exports.VIDEO_CLIP_ANIMATION_EFFECTS = _chunkLBDC5434cjs.VIDEO_CLIP_ANIMATION_EFFECTS; exports.VIDEO_CLIP_ANIMATION_LABELS = VIDEO_CLIP_ANIMATION_LABELS; exports.VIDEO_CLIP_TYPES = _chunkLBDC5434cjs.VIDEO_CLIP_TYPES; exports.VIDEO_DEFAULT_FILLERS = VIDEO_DEFAULT_FILLERS; exports.VIDEO_DEFAULT_STILL_DURATION = VIDEO_DEFAULT_STILL_DURATION; exports.VIDEO_DEFAULT_TITLE_DURATION = VIDEO_DEFAULT_TITLE_DURATION; exports.VIDEO_DISFLUENCY_KINDS = VIDEO_DISFLUENCY_KINDS; exports.VIDEO_EASE_NAMES = _chunkLBDC5434cjs.VIDEO_EASE_NAMES; exports.VIDEO_EDIT_OPS = VIDEO_EDIT_OPS; exports.VIDEO_EFFECT_PLACES = _chunkLBDC5434cjs.VIDEO_EFFECT_PLACES; exports.VIDEO_FADE_CURVES = _chunkLBDC5434cjs.VIDEO_FADE_CURVES; exports.VIDEO_FADE_CURVE_LABELS = VIDEO_FADE_CURVE_LABELS; exports.VIDEO_FITS = _chunkLBDC5434cjs.VIDEO_FITS; exports.VIDEO_GRADE_CONTROLS = _chunkLBDC5434cjs.VIDEO_GRADE_CONTROLS; exports.VIDEO_GRADE_PRESETS = _chunkLBDC5434cjs.VIDEO_GRADE_PRESETS; exports.VIDEO_GRADE_PRESET_NAMES = _chunkLBDC5434cjs.VIDEO_GRADE_PRESET_NAMES; exports.VIDEO_ISSUE_CODES = VIDEO_ISSUE_CODES; exports.VIDEO_KEYFRAME_LIMITS = _chunkLBDC5434cjs.VIDEO_KEYFRAME_LIMITS; exports.VIDEO_KEYFRAME_PROPERTIES = _chunkLBDC5434cjs.VIDEO_KEYFRAME_PROPERTIES; exports.VIDEO_LOUDNESS_HOP = VIDEO_LOUDNESS_HOP; exports.VIDEO_LUT_MAX_SIZE = _chunkLBDC5434cjs.VIDEO_LUT_MAX_SIZE; exports.VIDEO_MASK_DEFAULTS = _chunkLBDC5434cjs.VIDEO_MASK_DEFAULTS; exports.VIDEO_MASK_SHAPES = _chunkLBDC5434cjs.VIDEO_MASK_SHAPES; exports.VIDEO_MASK_SHAPE_LABELS = VIDEO_MASK_SHAPE_LABELS; exports.VIDEO_PEAK_BLOCK = VIDEO_PEAK_BLOCK; exports.VIDEO_PLACEMENT_MODES = _chunkLBDC5434cjs.VIDEO_PLACEMENT_MODES; exports.VIDEO_PREVIEW_SCALE_OPTIONS = VIDEO_PREVIEW_SCALE_OPTIONS; exports.VIDEO_PROXY_SCALES = VIDEO_PROXY_SCALES; exports.VIDEO_SCOPE_KINDS = VIDEO_SCOPE_KINDS; exports.VIDEO_TIME_EPSILON = _chunkLBDC5434cjs.VIDEO_TIME_EPSILON; exports.VIDEO_TRANSFORM_PROPERTIES = _chunkLBDC5434cjs.VIDEO_TRANSFORM_PROPERTIES; exports.VIDEO_TRANSITION_LABELS = VIDEO_TRANSITION_LABELS; exports.VIDEO_TRANSITION_TYPES = _chunkLBDC5434cjs.VIDEO_TRANSITION_TYPES; exports.VIDEO_VECTORSCOPE_TARGETS = VIDEO_VECTORSCOPE_TARGETS; exports.VIDEO_WIPE_DIRECTIONS = _chunkLBDC5434cjs.VIDEO_WIPE_DIRECTIONS; exports.VideoAudioPeaksCache = VideoAudioPeaksCache; exports.VideoEditorController = VideoEditorController; exports.VideoEffectsEngine = _chunkLBDC5434cjs.VideoEffectsEngine; exports.VideoFrameCache = VideoFrameCache; exports.VideoLutCache = _chunkLBDC5434cjs.VideoLutCache; exports.VideoPathGesture = VideoPathGesture; exports.VideoPreviewEngine = VideoPreviewEngine; exports.VideoPreviewPixels = VideoPreviewPixels; exports.allVideoClipIds = _chunkLBDC5434cjs.allVideoClipIds; exports.allVideoTracks = _chunkLBDC5434cjs.allVideoTracks; exports.animationEasingToVideoEase = animationEasingToVideoEase; exports.applyVideoEdits = applyVideoEdits; exports.applyVideoGrade = _chunkLBDC5434cjs.applyVideoGrade; exports.applyVideoLut = _chunkLBDC5434cjs.applyVideoLut; exports.applyVideoLutToPixels = _chunkLBDC5434cjs.applyVideoLutToPixels; exports.bakeVideoClipCamera = bakeVideoClipCamera; exports.buildVideoAudioPeaks = buildVideoAudioPeaks; exports.checkVideoEffectPlace = _chunkLBDC5434cjs.checkVideoEffectPlace; exports.checkVideoEffectValues = _chunkLBDC5434cjs.checkVideoEffectValues; exports.checkVideoProject = checkVideoProject; exports.checkVideoTimeRemap = _chunkLBDC5434cjs.checkVideoTimeRemap; exports.createVideoDialogueToolProvider = createVideoDialogueToolProvider; exports.createVideoEditorDocument = createVideoEditorDocument; exports.createVideoEditorToolProvider = createVideoEditorToolProvider; exports.createVideoEffectsToolProvider = createVideoEffectsToolProvider; exports.createVideoElementDecoder = createVideoElementDecoder; exports.createVideoMusicToolProvider = createVideoMusicToolProvider; exports.createVideoProject = createVideoProject; exports.decodeVideoAudioPeaks = decodeVideoAudioPeaks; exports.describeVideoEditPlan = describeVideoEditPlan; exports.describeVideoProject = describeVideoProject; exports.describeVideoSequence = describeVideoSequence; exports.detectVideoDisfluencies = detectVideoDisfluencies; exports.diffVideoProjects = diffVideoProjects; exports.drawVideoFrame = _chunkLBDC5434cjs.drawVideoFrame; exports.ffmpegFilterValue = _chunkLBDC5434cjs.ffmpegFilterValue; exports.findVideoAudioBeats = findVideoAudioBeats; exports.findVideoAudioSilences = findVideoAudioSilences; exports.findVideoClip = _chunkLBDC5434cjs.findVideoClip; exports.findVideoFillers = findVideoFillers; exports.findVideoGaps = _chunkLBDC5434cjs.findVideoGaps; exports.findVideoRepetitions = findVideoRepetitions; exports.findVideoSequenceClip = _chunkLBDC5434cjs.findVideoSequenceClip; exports.findVideoSequenceCycle = _chunkLBDC5434cjs.findVideoSequenceCycle; exports.findVideoTranscriptPauses = findVideoTranscriptPauses; exports.findVideoTranscriptText = findVideoTranscriptText; exports.formatVideoSeconds = _chunkLBDC5434cjs.formatVideoSeconds; exports.formatVideoTimecode = _chunkLBDC5434cjs.formatVideoTimecode; exports.formatVideoTimecodeFrames = _chunkLBDC5434cjs.formatVideoTimecodeFrames; exports.framePointsToPicture = framePointsToPicture; exports.isVideoDropFrameRate = _chunkLBDC5434cjs.isVideoDropFrameRate; exports.isVideoKeyframes = _chunkLBDC5434cjs.isVideoKeyframes; exports.measureVideoLoudness = measureVideoLoudness; exports.mergeVideoRanges = mergeVideoRanges; exports.mixEffectPixels = _chunkLBDC5434cjs.mixEffectPixels; exports.nearestVideoBeat = nearestVideoBeat; exports.nextFreeVideoSlot = _chunkLBDC5434cjs.nextFreeVideoSlot; exports.normalizeVideoClipMask = _chunkLBDC5434cjs.normalizeVideoClipMask; exports.normalizeVideoGrade = _chunkLBDC5434cjs.normalizeVideoGrade; exports.normalizeVideoGradeLut = _chunkLBDC5434cjs.normalizeVideoGradeLut; exports.normalizeVideoWord = normalizeVideoWord; exports.openVideoClipEffectAuthoring = openVideoClipEffectAuthoring; exports.overEffectPixels = _chunkLBDC5434cjs.overEffectPixels; exports.parseVideoAnimatable = parseVideoAnimatable; exports.parseVideoAsset = parseVideoAsset; exports.parseVideoAssetProxies = parseVideoAssetProxies; exports.parseVideoClip = parseVideoClip; exports.parseVideoClipAnimation = parseVideoClipAnimation; exports.parseVideoClipCamera = parseVideoClipCamera; exports.parseVideoClipEffects = parseVideoClipEffects; exports.parseVideoClipMask = parseVideoClipMask; exports.parseVideoCubeLut = _chunkLBDC5434cjs.parseVideoCubeLut; exports.parseVideoEffectRef = parseVideoEffectRef; exports.parseVideoEffectValues = parseVideoEffectValues; exports.parseVideoGrade = parseVideoGrade; exports.parseVideoGradeLut = parseVideoGradeLut; exports.parseVideoKeyframes = parseVideoKeyframes; exports.parseVideoLoudnessMeasurement = _chunkLBDC5434cjs.parseVideoLoudnessMeasurement; exports.parseVideoMarker = parseVideoMarker; exports.parseVideoPreviewScale = parseVideoPreviewScale; exports.parseVideoProject = parseVideoProject; exports.parseVideoSequence = parseVideoSequence; exports.parseVideoTimeRef = parseVideoTimeRef; exports.parseVideoTimeRemap = parseVideoTimeRemap; exports.parseVideoTrack = parseVideoTrack; exports.parseVideoTranscript = parseVideoTranscript; exports.parseVideoTranscriptWords = parseVideoTranscriptWords; exports.parseVideoTransform = parseVideoTransform; exports.parseVideoTransition = parseVideoTransition; exports.placeVideoRect = _chunkLBDC5434cjs.placeVideoRect; exports.planVideoClipDrag = planVideoClipDrag; exports.planVideoEdits = planVideoEdits; exports.planVideoPrefetch = planVideoPrefetch; exports.planVideoToolPlayback = planVideoToolPlayback; exports.probeVideoMedia = probeVideoMedia; exports.readVideoScopesPanel = readVideoScopesPanel; exports.removeVideoKey = _chunkLBDC5434cjs.removeVideoKey; exports.renderVideoFrameExact = _chunkLBDC5434cjs.renderVideoFrameExact; exports.resolveVideoPreviewScale = resolveVideoPreviewScale; exports.retimeVideoAnimatable = _chunkLBDC5434cjs.retimeVideoAnimatable; exports.setVideoKey = _chunkLBDC5434cjs.setVideoKey; exports.snapToVideoFrame = _chunkLBDC5434cjs.snapToVideoFrame; exports.snapVideoTime = _chunkLBDC5434cjs.snapVideoTime; exports.sortVideoKeys = _chunkLBDC5434cjs.sortVideoKeys; exports.sortedVideoClips = _chunkLBDC5434cjs.sortedVideoClips; exports.splitVideoAnimatable = _chunkLBDC5434cjs.splitVideoAnimatable; exports.summarizeVideoScopes = summarizeVideoScopes; exports.toVideoEdl = _chunkLBDC5434cjs.toVideoEdl; exports.toVideoFfmpeg = _chunkLBDC5434cjs.toVideoFfmpeg; exports.toVideoLoudnessMeasure = _chunkLBDC5434cjs.toVideoLoudnessMeasure; exports.videoAddAdjustmentEdits = videoAddAdjustmentEdits; exports.videoAssetDropEdit = videoAssetDropEdit; exports.videoAssetHasSound = _chunkLBDC5434cjs.videoAssetHasSound; exports.videoAssetKindOf = videoAssetKindOf; exports.videoAssetMap = _chunkLBDC5434cjs.videoAssetMap; exports.videoAssetProxy = videoAssetProxy; exports.videoAudioLevels = videoAudioLevels; exports.videoAudioLoudness = videoAudioLoudness; exports.videoAudioPeakRange = videoAudioPeakRange; exports.videoAudioPeakSpans = videoAudioPeakSpans; exports.videoAudioPeaksDuration = videoAudioPeaksDuration; exports.videoAuthorableEffects = videoAuthorableEffects; exports.videoCacheEvictions = videoCacheEvictions; exports.videoCameraBase = videoCameraBase; exports.videoCameraMoveTools = videoCameraMoveTools; exports.videoCameraView = videoCameraView; exports.videoChroma = videoChroma; exports.videoClipAfter = _chunkLBDC5434cjs.videoClipAfter; exports.videoClipAnimated = _chunkLBDC5434cjs.videoClipAnimated; exports.videoClipAnimationProperties = _chunkLBDC5434cjs.videoClipAnimationProperties; exports.videoClipAnimationSpans = _chunkLBDC5434cjs.videoClipAnimationSpans; exports.videoClipAppliedEffects = videoClipAppliedEffects; exports.videoClipBefore = _chunkLBDC5434cjs.videoClipBefore; exports.videoClipCameraMove = videoClipCameraMove; exports.videoClipEffectDocument = videoClipEffectDocument; exports.videoClipEffectUses = _chunkLBDC5434cjs.videoClipEffectUses; exports.videoClipEnd = _chunkLBDC5434cjs.videoClipEnd; exports.videoClipHandles = _chunkLBDC5434cjs.videoClipHandles; exports.videoClipHeading = videoClipHeading; exports.videoClipKeyframes = videoClipKeyframes; exports.videoClipLabel = videoClipLabel; exports.videoClipMaskOutline = videoClipMaskOutline; exports.videoClipOverhang = _chunkLBDC5434cjs.videoClipOverhang; exports.videoClipPicture = videoClipPicture; exports.videoClipShowsWaveform = videoClipShowsWaveform; exports.videoClipSoundGain = _chunkLBDC5434cjs.videoClipSoundGain; exports.videoClipSourceRange = _chunkLBDC5434cjs.videoClipSourceRange; exports.videoClipSourceTime = _chunkLBDC5434cjs.videoClipSourceTime; exports.videoClipSpeed = _chunkLBDC5434cjs.videoClipSpeed; exports.videoClipSpeedAt = _chunkLBDC5434cjs.videoClipSpeedAt; exports.videoClipTint = videoClipTint; exports.videoClipTypeLabel = _chunkLBDC5434cjs.videoClipTypeLabel; exports.videoClipWaveform = videoClipWaveform; exports.videoClipWaveformPath = videoClipWaveformPath; exports.videoClipsAt = _chunkLBDC5434cjs.videoClipsAt; exports.videoContactSheetSvg = _chunkLBDC5434cjs.videoContactSheetSvg; exports.videoCutsWithMargin = videoCutsWithMargin; exports.videoDragLabel = videoDragLabel; exports.videoDropTracks = videoDropTracks; exports.videoDuckingKeys = videoDuckingKeys; exports.videoEaseBezier = _chunkLBDC5434cjs.videoEaseBezier; exports.videoEaseProgress = _chunkLBDC5434cjs.videoEaseProgress; exports.videoEaseToAnimationEasing = videoEaseToAnimationEasing; exports.videoEditsFromSequence = videoEditsFromSequence; exports.videoEffectFrameTime = _chunkLBDC5434cjs.videoEffectFrameTime; exports.videoEffectLayerKey = _chunkLBDC5434cjs.videoEffectLayerKey; exports.videoEffectValuesAt = _chunkLBDC5434cjs.videoEffectValuesAt; exports.videoEffectValuesFromDocument = videoEffectValuesFromDocument; exports.videoExposureNotes = videoExposureNotes; exports.videoExposureStats = videoExposureStats; exports.videoFadeCurveGain = _chunkLBDC5434cjs.videoFadeCurveGain; exports.videoFfmpegUnsupportedEffects = _chunkLBDC5434cjs.videoFfmpegUnsupportedEffects; exports.videoFfmpegUnsupportedFeatures = _chunkLBDC5434cjs.videoFfmpegUnsupportedFeatures; exports.videoFrameAt = _chunkLBDC5434cjs.videoFrameAt; exports.videoFrameCacheKey = videoFrameCacheKey; exports.videoFrameDuration = _chunkLBDC5434cjs.videoFrameDuration; exports.videoFrameLeafLayers = _chunkLBDC5434cjs.videoFrameLeafLayers; exports.videoFrameRequestsAt = videoFrameRequestsAt; exports.videoFrameToSvg = _chunkLBDC5434cjs.videoFrameToSvg; exports.videoFrames = _chunkLBDC5434cjs.videoFrames; exports.videoFreezeFrameEdit = _chunkLBDC5434cjs.videoFreezeFrameEdit; exports.videoGradeCssFilter = _chunkLBDC5434cjs.videoGradeCssFilter; exports.videoGradeFfmpegFilters = _chunkLBDC5434cjs.videoGradeFfmpegFilters; exports.videoGradeGainsFilterId = _chunkLBDC5434cjs.videoGradeGainsFilterId; exports.videoGradeLook = _chunkLBDC5434cjs.videoGradeLook; exports.videoGradePreset = _chunkLBDC5434cjs.videoGradePreset; exports.videoGradeStepMatrix = _chunkLBDC5434cjs.videoGradeStepMatrix; exports.videoGradeStepSvgValues = _chunkLBDC5434cjs.videoGradeStepSvgValues; exports.videoGradeSteps = _chunkLBDC5434cjs.videoGradeSteps; exports.videoGradeSvgDefs = _chunkLBDC5434cjs.videoGradeSvgDefs; exports.videoGradeSvgFilter = _chunkLBDC5434cjs.videoGradeSvgFilter; exports.videoHistogram = videoHistogram; exports.videoHistogramImage = videoHistogramImage; exports.videoHourFrames = _chunkLBDC5434cjs.videoHourFrames; exports.videoIrisRadius = _chunkLBDC5434cjs.videoIrisRadius; exports.videoIssueKey = videoIssueKey; exports.videoKeyTimesProblem = _chunkLBDC5434cjs.videoKeyTimesProblem; exports.videoKeyframeBreakpoints = _chunkLBDC5434cjs.videoKeyframeBreakpoints; exports.videoKeyframeFfmpegExpr = _chunkLBDC5434cjs.videoKeyframeFfmpegExpr; exports.videoKeyframeRows = videoKeyframeRows; exports.videoKeyframeToggleEdit = videoKeyframeToggleEdit; exports.videoKeyframeValueEdit = videoKeyframeValueEdit; exports.videoKeysOf = _chunkLBDC5434cjs.videoKeysOf; exports.videoLayerMask = _chunkLBDC5434cjs.videoLayerMask; exports.videoLayersUseEffects = _chunkLBDC5434cjs.videoLayersUseEffects; exports.videoLayersWithoutTransitionEffects = _chunkLBDC5434cjs.videoLayersWithoutTransitionEffects; exports.videoLoudnessEnergy = videoLoudnessEnergy; exports.videoLoudnessGain = videoLoudnessGain; exports.videoLoudnessOf = videoLoudnessOf; exports.videoLuma = videoLuma; exports.videoLumaWaveform = videoLumaWaveform; exports.videoLutEdits = videoLutEdits; exports.videoLutFromFunction = _chunkLBDC5434cjs.videoLutFromFunction; exports.videoLutSvgApproximation = _chunkLBDC5434cjs.videoLutSvgApproximation; exports.videoLutSvgPrimitives = _chunkLBDC5434cjs.videoLutSvgPrimitives; exports.videoLutToCube = _chunkLBDC5434cjs.videoLutToCube; exports.videoMaskContains = _chunkLBDC5434cjs.videoMaskContains; exports.videoMaskEdit = videoMaskEdit; exports.videoMaskPolygon = _chunkLBDC5434cjs.videoMaskPolygon; exports.videoMaskSvgPath = _chunkLBDC5434cjs.videoMaskSvgPath; exports.videoOverlap = _chunkLBDC5434cjs.videoOverlap; exports.videoPeakDb = videoPeakDb; exports.videoPreviewSrc = videoPreviewSrc; exports.videoProjectDuration = _chunkLBDC5434cjs.videoProjectDuration; exports.videoProjectEffects = _chunkLBDC5434cjs.videoProjectEffects; exports.videoProjectHasProxies = videoProjectHasProxies; exports.videoProjectSvg = _chunkLBDC5434cjs.videoProjectSvg; exports.videoProxyFfmpeg = videoProxyFfmpeg; exports.videoProxyName = videoProxyName; exports.videoProxyPlan = videoProxyPlan; exports.videoRemoveRangesEdits = videoRemoveRangesEdits; exports.videoRulerTicks = videoRulerTicks; exports.videoScopeImage = videoScopeImage; exports.videoSequenceChildren = _chunkLBDC5434cjs.videoSequenceChildren; exports.videoSequenceDuration = _chunkLBDC5434cjs.videoSequenceDuration; exports.videoSequenceMap = _chunkLBDC5434cjs.videoSequenceMap; exports.videoShellQuote = _chunkLBDC5434cjs.videoShellQuote; exports.videoSkinProtectionEdits = videoSkinProtectionEdits; exports.videoSkinToneWeight = _chunkLBDC5434cjs.videoSkinToneWeight; exports.videoSlowMotionRamp = _chunkLBDC5434cjs.videoSlowMotionRamp; exports.videoSnapPoints = _chunkLBDC5434cjs.videoSnapPoints; exports.videoSourceFrame = videoSourceFrame; exports.videoSourceFrameTime = videoSourceFrameTime; exports.videoSpeechRanges = videoSpeechRanges; exports.videoSpeedRampEdit = _chunkLBDC5434cjs.videoSpeedRampEdit; exports.videoSpeedRampKeys = _chunkLBDC5434cjs.videoSpeedRampKeys; exports.videoTextStyle = _chunkLBDC5434cjs.videoTextStyle; exports.videoTimeRef = videoTimeRef; exports.videoTimeRemapBreakpoints = _chunkLBDC5434cjs.videoTimeRemapBreakpoints; exports.videoTimeRemapSpan = _chunkLBDC5434cjs.videoTimeRemapSpan; exports.videoTimecodeFrames = _chunkLBDC5434cjs.videoTimecodeFrames; exports.videoTimelineTranscript = videoTimelineTranscript; exports.videoTitleFrame = _chunkLBDC5434cjs.videoTitleFrame; exports.videoTrackSyncLocked = _chunkLBDC5434cjs.videoTrackSyncLocked; exports.videoTranscriptEdit = videoTranscriptEdit; exports.videoTranscriptTrack = videoTranscriptTrack; exports.videoTransformAt = _chunkLBDC5434cjs.videoTransformAt; exports.videoTransformOfView = videoTransformOfView; exports.videoTransitionAudioCurve = _chunkLBDC5434cjs.videoTransitionAudioCurve; exports.videoTransitionEase = _chunkLBDC5434cjs.videoTransitionEase; exports.videoTransitionHasDirection = videoTransitionHasDirection; exports.videoValueAt = _chunkLBDC5434cjs.videoValueAt; exports.videoVectorscope = videoVectorscope; exports.videoVectorscopeAngle = videoVectorscopeAngle; exports.videoVectorscopeImage = videoVectorscopeImage; exports.videoVectorscopePoint = videoVectorscopePoint; exports.videoWaveformImage = videoWaveformImage; exports.videoWaveformPath = videoWaveformPath; exports.videoWipeRect = _chunkLBDC5434cjs.videoWipeRect; exports.videoWordAt = videoWordAt; exports.videoWordsRange = videoWordsRange; exports.withVideoPlayback = withVideoPlayback;
|