@odori/cli 0.0.7 → 0.0.9
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/dist/{chunk-STVORYOF.js → chunk-TDM65HRW.js} +1575 -1074
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +52 -4
- package/dist/index.js +1 -1
- package/dist/{registry-snapshot-ADKSTGDR.js → registry-snapshot-TKH2KAC3.js} +362 -25
- package/package.json +3 -3
- package/src/audio-mix.ts +6 -1
- package/src/cli.ts +53 -4
- package/src/commands/bed.ts +224 -0
- package/src/commands/dev.ts +80 -0
- package/src/commands/doctor.ts +20 -0
- package/src/commands/exportVideo.ts +15 -0
- package/src/commands/integrations.ts +26 -0
- package/src/commands/narrate.ts +74 -0
- package/src/commands/test.ts +55 -16
- package/src/config.ts +5 -0
- package/src/jobs.ts +1 -1
- package/src/keystore.ts +76 -0
- package/src/providers.ts +173 -0
- package/src/registry-snapshot.json +362 -25
- package/src/render.ts +69 -22
- package/src/server.ts +10 -0
- package/studio/src/Studio.tsx +1 -1
- package/studio/src/components/GenerateBed.tsx +148 -0
- package/studio/src/components/Settings.tsx +266 -50
- package/studio/src/components/ui.tsx +11 -1
- package/studio/src/integrations.ts +29 -0
- package/studio/src/studio.css +276 -3
- package/studio/src/views/AssetsView.tsx +6 -0
- package/studio/src/virtual.d.ts +1 -0
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,13 @@ type OdoriConfig = {
|
|
|
49
49
|
skipUnchangedFrames?: boolean;
|
|
50
50
|
/** Reuse encoded chunks whose frames still look identical. Defaults to true. */
|
|
51
51
|
cacheChunks?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Default providers for `--generate`, by kind. The choice is committed like
|
|
54
|
+
* every other decision; the keys never are.
|
|
55
|
+
*/
|
|
56
|
+
generation?: {
|
|
57
|
+
music?: string;
|
|
58
|
+
};
|
|
52
59
|
};
|
|
53
60
|
declare const resolveChromePath: (configured?: string) => string | undefined;
|
|
54
61
|
type ResolvedConfig = OdoriConfig & {
|
|
@@ -251,15 +258,50 @@ type RenderTarget = {
|
|
|
251
258
|
durationInFrames: number;
|
|
252
259
|
}>;
|
|
253
260
|
};
|
|
261
|
+
/**
|
|
262
|
+
* Which graphics backend the render browser draws with.
|
|
263
|
+
*
|
|
264
|
+
* Not a menu of backend names. Remotion offers angle, swangle, egl, vulkan and
|
|
265
|
+
* two more, and the author has to learn ANGLE's taxonomy and then guess. The
|
|
266
|
+
* only question worth asking is whether this render is the artifact or a look
|
|
267
|
+
* at it, so that is the only question asked.
|
|
268
|
+
*
|
|
269
|
+
* `software` is ANGLE's SwiftShader: the same pixels on every machine, which
|
|
270
|
+
* is what a cache, a parallel render and a byte-for-byte test all depend on.
|
|
271
|
+
* `gpu` uses whatever the machine has.
|
|
272
|
+
*
|
|
273
|
+
* Measured on this pipeline at 1080p, 60 frames, frame skip off, and the
|
|
274
|
+
* reason both exist:
|
|
275
|
+
*
|
|
276
|
+
* five full-screen post-processing passes 86ms software 81ms gpu
|
|
277
|
+
* a raymarch that exits early on most rays 46ms software 38ms gpu
|
|
278
|
+
* 1500 fixed iterations, no early exit 507ms software 37ms gpu
|
|
279
|
+
*
|
|
280
|
+
* The GPU sits at under 40ms whatever the shader, because it is still waiting
|
|
281
|
+
* on the DOM capture and the encode rather than on itself. Software tracks the
|
|
282
|
+
* shader. So for post-processing the choice is worth nothing, and for work
|
|
283
|
+
* that is genuinely per-pixel expensive it is worth fourteen times, which is
|
|
284
|
+
* the difference between iterating and not.
|
|
285
|
+
*/
|
|
286
|
+
type Graphics = "software" | "gpu";
|
|
254
287
|
type RenderPage = {
|
|
255
288
|
browser: Browser;
|
|
256
289
|
page: Page;
|
|
257
290
|
errors: string[];
|
|
258
291
|
};
|
|
259
292
|
/** Open one video in render mode and wait for its first frame to mount. */
|
|
260
|
-
declare const openRenderPage: (origin: string, target: RenderTarget, config: ResolvedConfig) => Promise<RenderPage>;
|
|
261
|
-
/**
|
|
262
|
-
|
|
293
|
+
declare const openRenderPage: (origin: string, target: RenderTarget, config: ResolvedConfig, graphics?: Graphics) => Promise<RenderPage>;
|
|
294
|
+
/**
|
|
295
|
+
* Seek through the readiness handshake instead of guessing with timeouts.
|
|
296
|
+
*
|
|
297
|
+
* A frame that throws never publishes its marker, so the wait runs out and
|
|
298
|
+
* Playwright reports that a selector did not appear, which says nothing about
|
|
299
|
+
* why. The page errors gathered since the mount are the actual answer, and
|
|
300
|
+
* passing them in is the difference between "locator timed out" and the name
|
|
301
|
+
* of the function that threw. One malformed interpolate() call cost an
|
|
302
|
+
* afternoon to a message that had already been collected and thrown away.
|
|
303
|
+
*/
|
|
304
|
+
declare const seekTo: (page: Page, frame: number, errors?: string[]) => Promise<void>;
|
|
263
305
|
declare const readTimeline: (page: Page) => Promise<odori.CompiledTimeline | {
|
|
264
306
|
scenes: never[];
|
|
265
307
|
durationInFrames: number;
|
|
@@ -268,7 +310,7 @@ declare const readAudio: (page: Page) => Promise<odori.AudioTrack>;
|
|
|
268
310
|
declare const probeSignatures: (page: Page, frames: number[]) => Promise<string[]>;
|
|
269
311
|
/** Kept for callers that only want to know an encoder exists. */
|
|
270
312
|
declare const ensureFfmpeg: (config: ResolvedConfig) => Promise<void>;
|
|
271
|
-
declare const renderStill: (origin: string, target: RenderTarget, frame: number, output: string, config: ResolvedConfig) => Promise<string>;
|
|
313
|
+
declare const renderStill: (origin: string, target: RenderTarget, frame: number, output: string, config: ResolvedConfig, graphics?: Graphics) => Promise<string>;
|
|
272
314
|
declare const defaultConcurrency: () => number;
|
|
273
315
|
type RenderProgress = (progress: number, stage: "rendering" | "encoding") => void;
|
|
274
316
|
type RenderTimings = {
|
|
@@ -290,6 +332,8 @@ type RenderOptions = {
|
|
|
290
332
|
/** Container and codec. Defaults to H.264 in MP4. */
|
|
291
333
|
format?: VideoFormat;
|
|
292
334
|
skipUnchangedFrames?: boolean;
|
|
335
|
+
/** Which graphics backend draws the frames. Defaults to software. */
|
|
336
|
+
graphics?: Graphics;
|
|
293
337
|
/**
|
|
294
338
|
* Mix the composition's cues into the file. Defaults to true, because the
|
|
295
339
|
* score is part of the video. Set false for a silent cut: a loop for a
|
|
@@ -345,6 +389,7 @@ type JobRender = {
|
|
|
345
389
|
scale?: number;
|
|
346
390
|
preset?: string;
|
|
347
391
|
audio?: boolean;
|
|
392
|
+
graphics?: string;
|
|
348
393
|
};
|
|
349
394
|
type JobRecord = {
|
|
350
395
|
job: ExportJob;
|
|
@@ -547,6 +592,7 @@ declare const runJob: (config: ResolvedConfig, origin: string, record: JobRecord
|
|
|
547
592
|
scale?: number;
|
|
548
593
|
format?: VideoFormat;
|
|
549
594
|
audio?: boolean;
|
|
595
|
+
graphics?: Graphics;
|
|
550
596
|
skipUnchangedFrames?: boolean;
|
|
551
597
|
signal?: AbortSignal;
|
|
552
598
|
onProgress?: (job: ExportJob) => void;
|
|
@@ -561,6 +607,8 @@ declare const exportCommand: (id: string, options?: {
|
|
|
561
607
|
format?: string;
|
|
562
608
|
/** False writes the picture with no audio track. */
|
|
563
609
|
audio?: boolean;
|
|
610
|
+
/** True draws on the machine's GPU instead of the reproducible backend. */
|
|
611
|
+
fast?: boolean;
|
|
564
612
|
skipUnchangedFrames?: boolean;
|
|
565
613
|
retry?: string;
|
|
566
614
|
}) => Promise<ExportJob>;
|