@openartifactsai/motion-export 0.0.0-stage → 0.23.0-rc.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/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +5 -2
- package/package.json +58 -4
- package/src/build.d.ts +17 -0
- package/src/build.js +52 -0
- package/src/captions-file.d.ts +13 -0
- package/src/captions-file.js +15 -0
- package/src/clip/in-worker.d.ts +49 -0
- package/src/clip/in-worker.js +96 -0
- package/src/clip/jobs.d.ts +28 -0
- package/src/clip/jobs.js +2 -0
- package/src/clip/part.d.ts +25 -0
- package/src/clip/part.js +112 -0
- package/src/clip/problem.d.ts +25 -0
- package/src/clip/problem.js +10 -0
- package/src/clip/worker.d.ts +2 -0
- package/src/clip/worker.js +24 -0
- package/src/engine.d.ts +46 -0
- package/src/engine.js +225 -0
- package/src/errors.d.ts +78 -0
- package/src/errors.js +102 -0
- package/src/estimate.d.ts +27 -0
- package/src/estimate.js +103 -0
- package/src/filename.d.ts +14 -0
- package/src/filename.js +44 -0
- package/src/frame-source.d.ts +57 -0
- package/src/frame-source.js +1 -0
- package/src/frames-video.d.ts +45 -0
- package/src/frames-video.js +52 -0
- package/src/frames.d.ts +36 -0
- package/src/frames.js +112 -0
- package/src/gif/encode.d.ts +23 -0
- package/src/gif/encode.js +60 -0
- package/src/gif/estimator.d.ts +50 -0
- package/src/gif/estimator.js +82 -0
- package/src/gif/surface.d.ts +8 -0
- package/src/gif/surface.js +20 -0
- package/src/index.d.ts +34 -0
- package/src/index.js +18 -0
- package/src/mov/encode.d.ts +32 -0
- package/src/mov/encode.js +69 -0
- package/src/mov/estimate.d.ts +20 -0
- package/src/mov/estimate.js +33 -0
- package/src/mov/plan.d.ts +25 -0
- package/src/mov/plan.js +14 -0
- package/src/mov/surface.d.ts +4 -0
- package/src/mov/surface.js +20 -0
- package/src/plan.d.ts +54 -0
- package/src/plan.js +76 -0
- package/src/problems.d.ts +10 -0
- package/src/problems.js +32 -0
- package/src/raster/document.d.ts +7 -0
- package/src/raster/document.js +15 -0
- package/src/raster/frame-entry.d.ts +1 -0
- package/src/raster/frame-entry.js +36 -0
- package/src/raster/host.d.ts +28 -0
- package/src/raster/host.js +191 -0
- package/src/raster/messages.d.ts +34 -0
- package/src/raster/messages.js +25 -0
- package/src/source/layout.d.ts +49 -0
- package/src/source/layout.js +83 -0
- package/src/source/names.d.ts +14 -0
- package/src/source/names.js +65 -0
- package/src/source/readme.d.ts +17 -0
- package/src/source/readme.js +43 -0
- package/src/source/zip.d.ts +27 -0
- package/src/source/zip.js +61 -0
- package/src/stage-frame.d.ts +12 -0
- package/src/stage-frame.js +61 -0
- package/src/standalone/audio-entry.d.ts +1 -0
- package/src/standalone/audio-entry.js +80 -0
- package/src/standalone/clip-footage.d.ts +4 -0
- package/src/standalone/clip-footage.js +38 -0
- package/src/standalone/html.d.ts +35 -0
- package/src/standalone/html.js +60 -0
- package/src/types.d.ts +63 -0
- package/src/types.js +1 -0
- package/src/video/attempts.d.ts +55 -0
- package/src/video/attempts.js +73 -0
- package/src/video/avc.d.ts +15 -0
- package/src/video/avc.js +158 -0
- package/src/video/encode-attempt.d.ts +39 -0
- package/src/video/encode-attempt.js +157 -0
- package/src/video/encode.d.ts +6 -0
- package/src/video/encode.js +66 -0
- package/src/video/format.d.ts +22 -0
- package/src/video/format.js +41 -0
- package/src/video/output.d.ts +12 -0
- package/src/video/output.js +38 -0
- package/src/virtual.d.ts +11 -0
- package/src/visibility.d.ts +45 -0
- package/src/visibility.js +131 -0
- package/src/vite.d.ts +8 -0
- package/src/vite.js +43 -0
- package/src/words.d.ts +37 -0
- package/src/words.js +37 -0
package/src/words.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** What an export says to people. */
|
|
2
|
+
export declare const COMPATIBILITY_ADVICE = "Try exporting from Chrome on a Mac or Windows computer for best results.";
|
|
3
|
+
export declare const ENCODER_RECOVERY_ADVICE = "Try again with GIF, or try another browser.";
|
|
4
|
+
export declare const words: {
|
|
5
|
+
readonly exportCancelled: "Export cancelled";
|
|
6
|
+
readonly videoUnsupported: "This browser can’t export video. Try Chrome on a computer.";
|
|
7
|
+
readonly encoderSilent: string;
|
|
8
|
+
readonly skippedFrames: (skipped: number, frames: number) => string;
|
|
9
|
+
readonly noCanvas: "Could not create a 2D canvas for encoding.";
|
|
10
|
+
readonly noOutput: "The encoder produced no output.";
|
|
11
|
+
readonly noFilm: "No video is loaded.";
|
|
12
|
+
readonly filmNotLoaded: "the film is not loaded";
|
|
13
|
+
readonly noFrame: (first: string) => string;
|
|
14
|
+
readonly slowFailures: (count: number, t: number, first: string) => string;
|
|
15
|
+
readonly frameTorn: "The frame came back at the wrong size.";
|
|
16
|
+
readonly rasterTimedOut: "raster timed out";
|
|
17
|
+
readonly rasterGone: "raster disposed";
|
|
18
|
+
readonly rasterFailed: "raster failed";
|
|
19
|
+
readonly snapshotTooLarge: "snapshot too large";
|
|
20
|
+
readonly snapshotOutOfRange: "snapshot size out of range";
|
|
21
|
+
readonly gifTooLarge: (mb: number) => string;
|
|
22
|
+
readonly movOutOfMemory: "This browser couldn’t hold a MOV this large, so the export stopped.";
|
|
23
|
+
readonly sourceTooLarge: (mb: number) => string;
|
|
24
|
+
readonly standaloneTooLarge: (mb: number) => string;
|
|
25
|
+
readonly assetUnreadable: (name: string) => string;
|
|
26
|
+
};
|
|
27
|
+
export declare const formatLabels: {
|
|
28
|
+
readonly avcAac: "MP4 · H.264 + AAC";
|
|
29
|
+
readonly avcOpus: "MP4 · H.264 + Opus audio";
|
|
30
|
+
readonly avcSilent: "MP4 · H.264, no audio";
|
|
31
|
+
readonly other: (codec: "vp9" | "av1", audio: boolean) => string;
|
|
32
|
+
readonly avcOpusNote: string;
|
|
33
|
+
readonly avcSilentNote: string;
|
|
34
|
+
readonly otherNote: (audio: boolean) => string;
|
|
35
|
+
readonly gif: "GIF";
|
|
36
|
+
readonly mov: "MOV";
|
|
37
|
+
};
|
package/src/words.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** What an export says to people. */
|
|
2
|
+
export const COMPATIBILITY_ADVICE = 'Try exporting from Chrome on a Mac or Windows computer for best results.';
|
|
3
|
+
export const ENCODER_RECOVERY_ADVICE = 'Try again with GIF, or try another browser.';
|
|
4
|
+
export const words = {
|
|
5
|
+
exportCancelled: 'Export cancelled',
|
|
6
|
+
videoUnsupported: 'This browser can’t export video. Try Chrome on a computer.',
|
|
7
|
+
encoderSilent: 'The video encoder didn’t respond. ' + ENCODER_RECOVERY_ADVICE,
|
|
8
|
+
skippedFrames: (skipped, frames) => `The video encoder skipped ${skipped} of ${frames} frames, so no video was saved. ${ENCODER_RECOVERY_ADVICE}`,
|
|
9
|
+
noCanvas: 'Could not create a 2D canvas for encoding.',
|
|
10
|
+
noOutput: 'The encoder produced no output.',
|
|
11
|
+
noFilm: 'No video is loaded.',
|
|
12
|
+
filmNotLoaded: 'the film is not loaded',
|
|
13
|
+
noFrame: (first) => 'No frame could be rendered. First error: ' + first,
|
|
14
|
+
slowFailures: (count, t, first) => `Frames keep failing slowly (${count} so far); stopped at ${t.toFixed(3)} s. First error: ${first}`,
|
|
15
|
+
frameTorn: 'The frame came back at the wrong size.',
|
|
16
|
+
rasterTimedOut: 'raster timed out',
|
|
17
|
+
rasterGone: 'raster disposed',
|
|
18
|
+
rasterFailed: 'raster failed',
|
|
19
|
+
snapshotTooLarge: 'snapshot too large',
|
|
20
|
+
snapshotOutOfRange: 'snapshot size out of range',
|
|
21
|
+
gifTooLarge: (mb) => `The GIF passed the ${mb} MB limit, so the export stopped.`,
|
|
22
|
+
movOutOfMemory: 'This browser couldn’t hold a MOV this large, so the export stopped.',
|
|
23
|
+
sourceTooLarge: (mb) => `The video’s pictures and clips are too big to download with its code: ${mb} MB at most.`,
|
|
24
|
+
standaloneTooLarge: (mb) => `The page would be bigger than ${mb} MB, so it was not made.`,
|
|
25
|
+
assetUnreadable: (name) => `${name} couldn’t be read, so the video’s code couldn’t be put together.`,
|
|
26
|
+
};
|
|
27
|
+
export const formatLabels = {
|
|
28
|
+
avcAac: 'MP4 · H.264 + AAC',
|
|
29
|
+
avcOpus: 'MP4 · H.264 + Opus audio',
|
|
30
|
+
avcSilent: 'MP4 · H.264, no audio',
|
|
31
|
+
other: (codec, audio) => `MP4 · ${codec === 'vp9' ? 'VP9' : 'AV1'}${audio ? ' + Opus audio' : ', no audio'}`,
|
|
32
|
+
avcOpusNote: 'This browser can’t encode audio in the most compatible format. ' + COMPATIBILITY_ADVICE,
|
|
33
|
+
avcSilentNote: 'This browser can’t encode audio, so the video will be silent. ' + COMPATIBILITY_ADVICE,
|
|
34
|
+
otherNote: (audio) => 'This browser can’t encode video in the most compatible format, so some apps may not play the file' + (audio ? '. ' : ', and it will be silent. ') + COMPATIBILITY_ADVICE,
|
|
35
|
+
gif: 'GIF',
|
|
36
|
+
mov: 'MOV',
|
|
37
|
+
};
|