remotion 3.2.16 → 3.2.20
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/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-lint.log +11 -0
- package/.turbo/turbo-test.log +405 -0
- package/README.md +28 -18
- package/dist/compress-assets.d.ts +7 -0
- package/dist/compress-assets.js +25 -0
- package/dist/config/browser-executable.d.ts +3 -0
- package/dist/config/browser-executable.js +12 -0
- package/dist/config/browser.d.ts +4 -0
- package/dist/config/browser.js +19 -0
- package/dist/config/chromium-flags.d.ts +10 -0
- package/dist/config/chromium-flags.js +34 -0
- package/dist/config/codec.d.ts +16 -0
- package/dist/config/codec.js +109 -0
- package/dist/config/concurrency.d.ts +3 -0
- package/dist/config/concurrency.js +12 -0
- package/dist/config/crf.d.ts +9 -0
- package/dist/config/crf.js +83 -0
- package/dist/config/env-file.d.ts +2 -0
- package/dist/config/env-file.js +10 -0
- package/dist/config/every-nth-frame.d.ts +3 -0
- package/dist/config/every-nth-frame.js +20 -0
- package/dist/config/ffmpeg-executable.d.ts +5 -0
- package/dist/config/ffmpeg-executable.js +21 -0
- package/dist/config/frame-range.d.ts +5 -0
- package/dist/config/frame-range.js +80 -0
- package/dist/config/image-format.d.ts +8 -0
- package/dist/config/image-format.js +37 -0
- package/dist/config/image-sequence.d.ts +3 -0
- package/dist/config/image-sequence.js +15 -0
- package/dist/config/index.d.ts +178 -0
- package/dist/config/index.js +193 -0
- package/dist/config/log.d.ts +7 -0
- package/dist/config/log.js +25 -0
- package/dist/config/max-timeline-tracks.d.ts +2 -0
- package/dist/config/max-timeline-tracks.js +24 -0
- package/dist/config/number-of-gif-loops.d.ts +4 -0
- package/dist/config/number-of-gif-loops.js +21 -0
- package/dist/config/override-webpack.d.ts +6 -0
- package/dist/config/override-webpack.js +14 -0
- package/dist/config/overwrite.d.ts +3 -0
- package/dist/config/overwrite.js +14 -0
- package/dist/config/pixel-format.d.ts +8 -0
- package/dist/config/pixel-format.js +38 -0
- package/dist/config/preview-server.d.ts +2 -0
- package/dist/config/preview-server.js +20 -0
- package/dist/config/prores-profile.d.ts +7 -0
- package/dist/config/prores-profile.js +32 -0
- package/dist/config/quality.d.ts +2 -0
- package/dist/config/quality.js +17 -0
- package/dist/config/scale.d.ts +3 -0
- package/dist/config/scale.js +15 -0
- package/dist/config/still-frame.d.ts +2 -0
- package/dist/config/still-frame.js +12 -0
- package/dist/config/timeout.d.ts +2 -0
- package/dist/config/timeout.js +17 -0
- package/dist/config/webpack-caching.d.ts +3 -0
- package/dist/config/webpack-caching.js +16 -0
- package/dist/feature-flags.d.ts +1 -0
- package/dist/feature-flags.js +7 -0
- package/dist/is-audio-codec.d.ts +2 -0
- package/dist/is-audio-codec.js +7 -0
- package/dist/perf/index.d.ts +5 -0
- package/dist/perf/index.js +35 -0
- package/dist/timeline-inout-position-state.d.ts +12 -0
- package/dist/timeline-inout-position-state.js +23 -0
- package/dist/timeout.d.ts +2 -0
- package/dist/timeout.js +12 -0
- package/dist/validation/validate-every-nth-frame.d.ts +1 -0
- package/dist/validation/validate-every-nth-frame.js +21 -0
- package/dist/validation/validate-frame.d.ts +1 -0
- package/dist/validation/validate-frame.js +24 -0
- package/dist/validation/validate-image-format.d.ts +2 -0
- package/dist/validation/validate-image-format.js +9 -0
- package/dist/validation/validate-opengl-renderer.d.ts +4 -0
- package/dist/validation/validate-opengl-renderer.js +14 -0
- package/dist/validation/validate-quality.d.ts +1 -0
- package/dist/validation/validate-quality.js +21 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/config/bundle-out-dir.d.ts +0 -2
- package/dist/config/bundle-out-dir.js +0 -12
- package/dist/config/public-path.d.ts +0 -2
- package/dist/config/public-path.js +0 -12
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getScale = exports.setScale = void 0;
|
|
4
|
+
let currentScale = 1;
|
|
5
|
+
const setScale = (newScale) => {
|
|
6
|
+
if (typeof newScale !== 'number') {
|
|
7
|
+
throw new Error('--scale flag must be a number.');
|
|
8
|
+
}
|
|
9
|
+
currentScale = newScale;
|
|
10
|
+
};
|
|
11
|
+
exports.setScale = setScale;
|
|
12
|
+
const getScale = () => {
|
|
13
|
+
return currentScale;
|
|
14
|
+
};
|
|
15
|
+
exports.getScale = getScale;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStillFrame = exports.setStillFrame = void 0;
|
|
4
|
+
const validate_frame_1 = require("../validation/validate-frame");
|
|
5
|
+
let stillFrame = 0;
|
|
6
|
+
const setStillFrame = (frame) => {
|
|
7
|
+
(0, validate_frame_1.validateFrame)(frame, Infinity);
|
|
8
|
+
stillFrame = frame;
|
|
9
|
+
};
|
|
10
|
+
exports.setStillFrame = setStillFrame;
|
|
11
|
+
const getStillFrame = () => stillFrame;
|
|
12
|
+
exports.getStillFrame = getStillFrame;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCurrentPuppeteerTimeout = exports.setPuppeteerTimeout = void 0;
|
|
4
|
+
const timeout_1 = require("../timeout");
|
|
5
|
+
let currentTimeout = timeout_1.DEFAULT_PUPPETEER_TIMEOUT;
|
|
6
|
+
const setPuppeteerTimeout = (newPuppeteerTimeout) => {
|
|
7
|
+
if (typeof newPuppeteerTimeout !== 'number') {
|
|
8
|
+
throw new Error('--timeout flag / setTimeoutInMilliseconds() must be a number, but got ' +
|
|
9
|
+
JSON.stringify(newPuppeteerTimeout));
|
|
10
|
+
}
|
|
11
|
+
currentTimeout = newPuppeteerTimeout;
|
|
12
|
+
};
|
|
13
|
+
exports.setPuppeteerTimeout = setPuppeteerTimeout;
|
|
14
|
+
const getCurrentPuppeteerTimeout = () => {
|
|
15
|
+
return currentTimeout;
|
|
16
|
+
};
|
|
17
|
+
exports.getCurrentPuppeteerTimeout = getCurrentPuppeteerTimeout;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWebpackCaching = exports.setWebpackCaching = exports.DEFAULT_WEBPACK_CACHE_ENABLED = void 0;
|
|
4
|
+
exports.DEFAULT_WEBPACK_CACHE_ENABLED = true;
|
|
5
|
+
let webpackCaching = exports.DEFAULT_WEBPACK_CACHE_ENABLED;
|
|
6
|
+
const setWebpackCaching = (flag) => {
|
|
7
|
+
if (typeof flag !== 'boolean') {
|
|
8
|
+
throw new TypeError('Caching flag must be a boolean.');
|
|
9
|
+
}
|
|
10
|
+
webpackCaching = flag;
|
|
11
|
+
};
|
|
12
|
+
exports.setWebpackCaching = setWebpackCaching;
|
|
13
|
+
const getWebpackCaching = () => {
|
|
14
|
+
return webpackCaching;
|
|
15
|
+
};
|
|
16
|
+
exports.getWebpackCaching = getWebpackCaching;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FEATURE_FLAG_FIREFOX_SUPPORT = false;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FEATURE_FLAG_FIREFOX_SUPPORT = void 0;
|
|
4
|
+
// There is no Firefox support yet, the waitForFunction method
|
|
5
|
+
// does not yet work and downloading has a bug.
|
|
6
|
+
// Disabling this for now!
|
|
7
|
+
exports.FEATURE_FLAG_FIREFOX_SUPPORT = false;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare type PerfId = 'activate-target' | 'capture' | 'save' | 'extract-frame' | 'piping';
|
|
2
|
+
export declare const startPerfMeasure: (marker: PerfId) => number;
|
|
3
|
+
export declare const stopPerfMeasure: (id: number) => void;
|
|
4
|
+
export declare const logPerf: () => void;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.logPerf = exports.stopPerfMeasure = exports.startPerfMeasure = void 0;
|
|
4
|
+
const perf = {
|
|
5
|
+
'activate-target': [],
|
|
6
|
+
capture: [],
|
|
7
|
+
save: [],
|
|
8
|
+
'extract-frame': [],
|
|
9
|
+
piping: [],
|
|
10
|
+
};
|
|
11
|
+
const map = {};
|
|
12
|
+
const startPerfMeasure = (marker) => {
|
|
13
|
+
const id = Math.random();
|
|
14
|
+
map[id] = {
|
|
15
|
+
id,
|
|
16
|
+
marker,
|
|
17
|
+
start: Date.now(),
|
|
18
|
+
};
|
|
19
|
+
return id;
|
|
20
|
+
};
|
|
21
|
+
exports.startPerfMeasure = startPerfMeasure;
|
|
22
|
+
const stopPerfMeasure = (id) => {
|
|
23
|
+
const now = Date.now();
|
|
24
|
+
const diff = now - map[id].start;
|
|
25
|
+
perf[map[id].marker].push(diff);
|
|
26
|
+
delete map[id];
|
|
27
|
+
};
|
|
28
|
+
exports.stopPerfMeasure = stopPerfMeasure;
|
|
29
|
+
const logPerf = () => {
|
|
30
|
+
console.log('Render performance:');
|
|
31
|
+
Object.keys(perf).forEach((p) => {
|
|
32
|
+
console.log(` ${p} => ${perf[p].reduce((a, b) => a + b, 0) / perf[p].length} (n = ${perf[p].length})`);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
exports.logPerf = logPerf;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export declare type TimelineInOutContextValue = {
|
|
3
|
+
inFrame: number | null;
|
|
4
|
+
outFrame: number | null;
|
|
5
|
+
};
|
|
6
|
+
export declare type SetTimelineInOutContextValue = {
|
|
7
|
+
setInAndOutFrames: (u: React.SetStateAction<TimelineInOutContextValue>) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const TimelineInOutContext: React.Context<TimelineInOutContextValue>;
|
|
10
|
+
export declare const SetTimelineInOutContext: React.Context<SetTimelineInOutContextValue>;
|
|
11
|
+
export declare const useTimelineInOutFramePosition: () => TimelineInOutContextValue;
|
|
12
|
+
export declare const useTimelineSetInOutFramePosition: () => SetTimelineInOutContextValue;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTimelineSetInOutFramePosition = exports.useTimelineInOutFramePosition = exports.SetTimelineInOutContext = exports.TimelineInOutContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
exports.TimelineInOutContext = (0, react_1.createContext)({
|
|
6
|
+
inFrame: null,
|
|
7
|
+
outFrame: null,
|
|
8
|
+
});
|
|
9
|
+
exports.SetTimelineInOutContext = (0, react_1.createContext)({
|
|
10
|
+
setInAndOutFrames: () => {
|
|
11
|
+
throw new Error('default');
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
const useTimelineInOutFramePosition = () => {
|
|
15
|
+
const state = (0, react_1.useContext)(exports.TimelineInOutContext);
|
|
16
|
+
return state;
|
|
17
|
+
};
|
|
18
|
+
exports.useTimelineInOutFramePosition = useTimelineInOutFramePosition;
|
|
19
|
+
const useTimelineSetInOutFramePosition = () => {
|
|
20
|
+
const { setInAndOutFrames } = (0, react_1.useContext)(exports.SetTimelineInOutContext);
|
|
21
|
+
return { setInAndOutFrames };
|
|
22
|
+
};
|
|
23
|
+
exports.useTimelineSetInOutFramePosition = useTimelineSetInOutFramePosition;
|
package/dist/timeout.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupPuppeteerTimeout = exports.DEFAULT_PUPPETEER_TIMEOUT = void 0;
|
|
4
|
+
exports.DEFAULT_PUPPETEER_TIMEOUT = 30000;
|
|
5
|
+
const getPuppeteerTimeout = () => {
|
|
6
|
+
const param = window.remotion_puppeteerTimeout;
|
|
7
|
+
return param ? Number(param) : exports.DEFAULT_PUPPETEER_TIMEOUT;
|
|
8
|
+
};
|
|
9
|
+
const setupPuppeteerTimeout = () => {
|
|
10
|
+
window.remotion_puppeteerTimeout = getPuppeteerTimeout();
|
|
11
|
+
};
|
|
12
|
+
exports.setupPuppeteerTimeout = setupPuppeteerTimeout;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validateEveryNthFrame: (everyNthFrame: unknown) => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateEveryNthFrame = void 0;
|
|
4
|
+
const validateEveryNthFrame = (everyNthFrame) => {
|
|
5
|
+
if (typeof everyNthFrame === 'undefined') {
|
|
6
|
+
throw new TypeError(`Argument missing for parameter "everyNthFrame"`);
|
|
7
|
+
}
|
|
8
|
+
if (typeof everyNthFrame !== 'number') {
|
|
9
|
+
throw new TypeError(`Argument passed to "everyNthFrame" is not a number: ${everyNthFrame}`);
|
|
10
|
+
}
|
|
11
|
+
if (everyNthFrame < 1) {
|
|
12
|
+
throw new RangeError(`The value for "everyNthFrame" cannot be below 1, but is ${everyNthFrame}`);
|
|
13
|
+
}
|
|
14
|
+
if (!Number.isFinite(everyNthFrame)) {
|
|
15
|
+
throw new RangeError(`"everyNthFrame" ${everyNthFrame} is not finite`);
|
|
16
|
+
}
|
|
17
|
+
if (everyNthFrame % 1 !== 0) {
|
|
18
|
+
throw new RangeError(`Argument for everyNthFrame must be an integer, but got ${everyNthFrame}`);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.validateEveryNthFrame = validateEveryNthFrame;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validateFrame: (frame: number, durationInFrames: number) => void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateFrame = void 0;
|
|
4
|
+
const validateFrame = (frame, durationInFrames) => {
|
|
5
|
+
if (typeof frame === 'undefined') {
|
|
6
|
+
throw new TypeError(`Argument missing for parameter "frame"`);
|
|
7
|
+
}
|
|
8
|
+
if (typeof frame !== 'number') {
|
|
9
|
+
throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
|
|
10
|
+
}
|
|
11
|
+
if (frame < 0) {
|
|
12
|
+
throw new RangeError(`Frame ${frame} cannot be negative`);
|
|
13
|
+
}
|
|
14
|
+
if (!Number.isFinite(frame)) {
|
|
15
|
+
throw new RangeError(`Frame ${frame} is not finite`);
|
|
16
|
+
}
|
|
17
|
+
if (frame % 1 !== 0) {
|
|
18
|
+
throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
|
|
19
|
+
}
|
|
20
|
+
if (frame > durationInFrames - 1) {
|
|
21
|
+
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.validateFrame = validateFrame;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateNonNullImageFormat = void 0;
|
|
4
|
+
const validateNonNullImageFormat = (imageFormat) => {
|
|
5
|
+
if (imageFormat !== 'jpeg' && imageFormat !== 'png') {
|
|
6
|
+
throw new TypeError('Image format should be either "png" or "jpeg"');
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
exports.validateNonNullImageFormat = validateNonNullImageFormat;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateOpenGlRenderer = void 0;
|
|
4
|
+
const validRenderers = ['swangle', 'angle', 'egl', 'swiftshader'];
|
|
5
|
+
const validateOpenGlRenderer = (option) => {
|
|
6
|
+
if (option === null) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
if (!validRenderers.includes(option)) {
|
|
10
|
+
throw new TypeError(`${option} is not a valid GL backend. Accepted values: ${validRenderers.join(', ')}`);
|
|
11
|
+
}
|
|
12
|
+
return option;
|
|
13
|
+
};
|
|
14
|
+
exports.validateOpenGlRenderer = validateOpenGlRenderer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validateQuality: (q: number | undefined) => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateQuality = void 0;
|
|
4
|
+
const validateQuality = (q) => {
|
|
5
|
+
if (typeof q !== 'undefined' && typeof q !== 'number') {
|
|
6
|
+
throw new Error(`Quality option must be a number or undefined. Got ${typeof q} (${JSON.stringify(q)})`);
|
|
7
|
+
}
|
|
8
|
+
if (typeof q === 'undefined') {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (!Number.isFinite(q)) {
|
|
12
|
+
throw new RangeError(`Quality must be a finite number, but is ${q}`);
|
|
13
|
+
}
|
|
14
|
+
if (Number.isNaN(q)) {
|
|
15
|
+
throw new RangeError(`Quality is NaN, but must be a real number`);
|
|
16
|
+
}
|
|
17
|
+
if (q > 100 || q < 0) {
|
|
18
|
+
throw new RangeError('Quality option must be between 0 and 100.');
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.validateQuality = validateQuality;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.2.
|
|
1
|
+
export declare const VERSION = "3.2.20";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.20",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "640f36c0c2d9fb1b7768925bf9d64840cbc31bc6"
|
|
58
58
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setBundleOutDir = exports.getBundleOutDir = void 0;
|
|
4
|
-
let bundleOutDir = null;
|
|
5
|
-
const getBundleOutDir = () => {
|
|
6
|
-
return bundleOutDir;
|
|
7
|
-
};
|
|
8
|
-
exports.getBundleOutDir = getBundleOutDir;
|
|
9
|
-
const setBundleOutDir = (path) => {
|
|
10
|
-
bundleOutDir = path;
|
|
11
|
-
};
|
|
12
|
-
exports.setBundleOutDir = setBundleOutDir;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setPublicPath = exports.getPublicPath = void 0;
|
|
4
|
-
let publicPath = null;
|
|
5
|
-
const getPublicPath = () => {
|
|
6
|
-
return publicPath;
|
|
7
|
-
};
|
|
8
|
-
exports.getPublicPath = getPublicPath;
|
|
9
|
-
const setPublicPath = (path) => {
|
|
10
|
-
publicPath = path;
|
|
11
|
-
};
|
|
12
|
-
exports.setPublicPath = setPublicPath;
|