@remotion/cli 4.0.0-alpha5 → 4.0.0-alpha7
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/benchmark.js +9 -4
- package/dist/better-opn/index.js +3 -3
- package/dist/chalk/index.d.ts +45 -54
- package/dist/chalk/index.js +2 -135
- package/dist/codemods/stringify-with-path.d.ts +5 -0
- package/dist/codemods/stringify-with-path.js +44 -0
- package/dist/codemods/update-default-props.d.ts +3 -1
- package/dist/codemods/update-default-props.js +3 -17
- package/dist/color-math.js +3 -1
- package/dist/compositions.js +1 -0
- package/dist/config/log.d.ts +1 -3
- package/dist/config/log.js +2 -9
- package/dist/convert-entry-point-to-serve-url.js +2 -2
- package/dist/download-progress.d.ts +1 -1
- package/dist/download-progress.js +1 -5
- package/dist/editor/components/MenuToolbar.js +15 -3
- package/dist/editor/components/NewComposition/ComboBox.js +2 -2
- package/dist/editor/components/NewComposition/MenuContent.js +1 -1
- package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/RenderModal/CliCopyButton.js +42 -9
- package/dist/editor/components/RenderModal/InfoTooltip.js +2 -1
- package/dist/editor/components/RenderModal/OptionExplainer.js +13 -3
- package/dist/editor/components/RenderModal/RenderModalData.js +21 -7
- package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.d.ts +2 -2
- package/dist/editor/components/RenderModal/RenderModalPicture.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +3 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +8 -8
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +5 -5
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +3 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +3 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +4 -4
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +9 -6
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +40 -7
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStaticFileEditor.d.ts +16 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +73 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +5 -5
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +4 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/extract-enum-json-paths.d.ts +3 -0
- package/dist/editor/components/RenderModal/SchemaEditor/extract-enum-json-paths.js +126 -0
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.d.ts +12 -0
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.js +32 -0
- package/dist/editor/components/RenderModal/get-render-modal-warnings.d.ts +3 -2
- package/dist/editor/components/RenderModal/get-render-modal-warnings.js +9 -2
- package/dist/editor/components/RenderQueue/actions.d.ts +2 -1
- package/dist/editor/components/RenderQueue/actions.js +8 -4
- package/dist/editor/components/SidebarCollapserControls.js +12 -6
- package/dist/editor/components/Timeline/TimelineSequence.js +6 -4
- package/dist/editor/helpers/calculate-timeline.js +1 -1
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/editor/helpers/colors.js +1 -1
- package/dist/entry-point.js +17 -17
- package/dist/ffmpeg.js +12 -3
- package/dist/file-watcher.js +5 -5
- package/dist/get-cli-options.js +4 -4
- package/dist/get-config-file-name.js +6 -6
- package/dist/get-env.js +10 -10
- package/dist/get-input-props.js +9 -9
- package/dist/get-network-address.js +2 -2
- package/dist/handle-common-errors.d.ts +2 -1
- package/dist/handle-common-errors.js +2 -2
- package/dist/index.d.ts +9 -5
- package/dist/index.js +4 -1
- package/dist/load-config.js +8 -8
- package/dist/log.d.ts +5 -5
- package/dist/log.js +3 -42
- package/dist/parse-command-line.d.ts +1 -0
- package/dist/preview-server/api-types.d.ts +1 -1
- package/dist/preview-server/dev-middleware/compatible-api.d.ts +2 -2
- package/dist/preview-server/dev-middleware/middleware.d.ts +1 -1
- package/dist/preview-server/dev-middleware/middleware.js +7 -7
- package/dist/preview-server/dev-middleware/setup-hooks.js +2 -2
- package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.js +5 -5
- package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.js +17 -17
- package/dist/preview-server/file-existence-watchers.js +3 -3
- package/dist/preview-server/get-absolute-public-dir.js +3 -3
- package/dist/preview-server/get-package-manager.js +3 -3
- package/dist/preview-server/handler.d.ts +1 -1
- package/dist/preview-server/hot-middleware/index.d.ts +1 -1
- package/dist/preview-server/hot-middleware/index.js +2 -2
- package/dist/preview-server/live-events.d.ts +1 -1
- package/dist/preview-server/parse-body.d.ts +1 -1
- package/dist/preview-server/project-info.js +5 -5
- package/dist/preview-server/public-folder.js +8 -8
- package/dist/preview-server/render-queue/job.d.ts +2 -0
- package/dist/preview-server/render-queue/open-directory-in-finder.js +8 -8
- package/dist/preview-server/render-queue/queue.js +4 -3
- package/dist/preview-server/routes/can-update-default-props.js +3 -2
- package/dist/preview-server/routes/update-default-props.js +7 -6
- package/dist/preview-server/routes.d.ts +1 -1
- package/dist/preview-server/routes.js +8 -8
- package/dist/preview-server/serve-static.d.ts +1 -1
- package/dist/preview-server/serve-static.js +7 -7
- package/dist/preview-server/start-server.js +2 -2
- package/dist/preview.js +4 -4
- package/dist/print-error.d.ts +2 -1
- package/dist/print-error.js +8 -5
- package/dist/progress-bar.d.ts +5 -4
- package/dist/progress-bar.js +42 -29
- package/dist/render-flows/render.js +50 -23
- package/dist/render-flows/still.js +20 -15
- package/dist/resolve-from.js +5 -5
- package/dist/setup-cache.d.ts +2 -1
- package/dist/setup-cache.js +8 -4
- package/dist/should-use-non-overlaying-logger.d.ts +4 -0
- package/dist/should-use-non-overlaying-logger.js +12 -0
- package/dist/upgrade.js +2 -2
- package/dist/user-passed-output-location.js +7 -2
- package/dist/versions.js +2 -2
- package/package.json +7 -7
- package/dist/ansi/ansi-regex.d.ts +0 -2
- package/dist/ansi/ansi-regex.js +0 -18
- package/dist/config/ffmpeg-executable.d.ts +0 -5
- package/dist/config/ffmpeg-executable.js +0 -21
- package/dist/config/quality.d.ts +0 -2
- package/dist/config/quality.js +0 -17
- package/dist/editor/components/ClipboardIcon.d.ts +0 -2
- package/dist/editor/components/ClipboardIcon.js +0 -12
- package/dist/editor/components/CollapsedCompositionSelector.d.ts +0 -4
- package/dist/editor/components/CollapsedCompositionSelector.js +0 -39
- package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.d.ts +0 -6
- package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.js +0 -24
- package/dist/editor/components/RichTimelineToggle.d.ts +0 -2
- package/dist/editor/components/RichTimelineToggle.js +0 -29
- package/dist/editor/components/Thumbnail.d.ts +0 -8
- package/dist/editor/components/Thumbnail.js +0 -76
- package/dist/editor/helpers/use-compact-ui.d.ts +0 -1
- package/dist/editor/helpers/use-compact-ui.js +0 -18
- package/dist/editor/icons/film.d.ts +0 -3
- package/dist/editor/icons/film.js +0 -8
- package/dist/editor/icons/timeline.d.ts +0 -3
- package/dist/editor/icons/timeline.js +0 -9
- package/dist/editor/state/rich-timeline.d.ts +0 -9
- package/dist/editor/state/rich-timeline.js +0 -17
- package/dist/get-render-media-options.d.ts +0 -8
- package/dist/get-render-media-options.js +0 -55
- package/dist/install.d.ts +0 -2
- package/dist/install.js +0 -36
- package/dist/is-javascript.d.ts +0 -2
- package/dist/is-javascript.js +0 -9
- package/dist/preview-server/dev-middleware/is-color-supported.d.ts +0 -1
- package/dist/preview-server/dev-middleware/is-color-supported.js +0 -37
- package/dist/preview-server/hot-middleware/strip-ansi.d.ts +0 -1
- package/dist/preview-server/hot-middleware/strip-ansi.js +0 -21
package/dist/setup-cache.js
CHANGED
|
@@ -7,7 +7,8 @@ const config_1 = require("./config");
|
|
|
7
7
|
const log_1 = require("./log");
|
|
8
8
|
const parse_command_line_1 = require("./parse-command-line");
|
|
9
9
|
const progress_bar_1 = require("./progress-bar");
|
|
10
|
-
const
|
|
10
|
+
const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
|
|
11
|
+
const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, }) => {
|
|
11
12
|
if (renderer_1.RenderInternals.isServeUrl(fullPath)) {
|
|
12
13
|
return {
|
|
13
14
|
urlOrBundle: fullPath,
|
|
@@ -24,6 +25,7 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
|
|
|
24
25
|
bundlingStep,
|
|
25
26
|
steps,
|
|
26
27
|
onDirectoryCreated,
|
|
28
|
+
quietProgress,
|
|
27
29
|
});
|
|
28
30
|
return {
|
|
29
31
|
urlOrBundle: bundled,
|
|
@@ -31,7 +33,7 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
|
|
|
31
33
|
};
|
|
32
34
|
};
|
|
33
35
|
exports.bundleOnCliOrTakeServeUrl = bundleOnCliOrTakeServeUrl;
|
|
34
|
-
const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, }) => {
|
|
36
|
+
const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, }) => {
|
|
35
37
|
var _a;
|
|
36
38
|
const shouldCache = config_1.ConfigInternals.getWebpackCaching();
|
|
37
39
|
const symlinkState = {
|
|
@@ -54,7 +56,7 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
|
|
|
54
56
|
bundling: bundlingState,
|
|
55
57
|
copying: copyingState,
|
|
56
58
|
symLinks: symlinkState,
|
|
57
|
-
},
|
|
59
|
+
}, bundlingStep, steps), newline);
|
|
58
60
|
onProgressCallback({
|
|
59
61
|
bundling: bundlingState,
|
|
60
62
|
copying: copyingState,
|
|
@@ -100,8 +102,10 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
|
|
|
100
102
|
}
|
|
101
103
|
const bundleStartTime = Date.now();
|
|
102
104
|
const bundlingProgress = (0, progress_bar_1.createOverwriteableCliOutput)({
|
|
103
|
-
quiet: (0, parse_command_line_1.quietFlagProvided)(),
|
|
105
|
+
quiet: quietProgress || (0, parse_command_line_1.quietFlagProvided)(),
|
|
104
106
|
cancelSignal: null,
|
|
107
|
+
updatesDontOverwrite: (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel }),
|
|
108
|
+
indent,
|
|
105
109
|
});
|
|
106
110
|
let bundlingState = {
|
|
107
111
|
progress: 0,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Should not use a logger that uses ANSI Diffing if
|
|
3
|
+
// - using verbose logging (intersection of Chrome + Remotion + compositor logs)
|
|
4
|
+
// - using a non-interactive terminal such as CI
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.shouldUseNonOverlayingLogger = void 0;
|
|
7
|
+
const renderer_1 = require("@remotion/renderer");
|
|
8
|
+
const shouldUseNonOverlayingLogger = ({ logLevel, }) => {
|
|
9
|
+
return (renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose') ||
|
|
10
|
+
!process.stdout.isTTY);
|
|
11
|
+
};
|
|
12
|
+
exports.shouldUseNonOverlayingLogger = shouldUseNonOverlayingLogger;
|
package/dist/upgrade.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.upgrade = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
-
const
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const config_1 = require("./config");
|
|
10
10
|
const get_latest_remotion_version_1 = require("./get-latest-remotion-version");
|
|
11
11
|
const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
|
|
@@ -22,7 +22,7 @@ const getUpgradeCommand = ({ manager, packages, version, }) => {
|
|
|
22
22
|
};
|
|
23
23
|
const upgrade = async (remotionRoot, packageManager) => {
|
|
24
24
|
var _a, _b, _c, _d;
|
|
25
|
-
const packageJsonFilePath =
|
|
25
|
+
const packageJsonFilePath = node_path_1.default.join(remotionRoot, 'package.json');
|
|
26
26
|
const packageJson = require(packageJsonFilePath);
|
|
27
27
|
const dependencies = Object.keys(packageJson.dependencies);
|
|
28
28
|
const devDependencies = Object.keys((_a = packageJson.devDependencies) !== null && _a !== void 0 ? _a : {});
|
|
@@ -3,14 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getOutputLocation = exports.getUserPassedOutputLocation = void 0;
|
|
4
4
|
const config_1 = require("./config");
|
|
5
5
|
const get_default_out_name_1 = require("./get-default-out-name");
|
|
6
|
+
const parse_command_line_1 = require("./parse-command-line");
|
|
6
7
|
const getUserPassedOutputLocation = (args) => {
|
|
7
|
-
var _a;
|
|
8
|
-
const filename = (_a = args[0]) !== null && _a !== void 0 ? _a : config_1.ConfigInternals.getOutputLocation();
|
|
8
|
+
var _a, _b;
|
|
9
|
+
const filename = (_b = (_a = args[0]) !== null && _a !== void 0 ? _a : parse_command_line_1.parsedCli.output) !== null && _b !== void 0 ? _b : config_1.ConfigInternals.getOutputLocation();
|
|
9
10
|
return filename;
|
|
10
11
|
};
|
|
11
12
|
exports.getUserPassedOutputLocation = getUserPassedOutputLocation;
|
|
12
13
|
const getOutputLocation = ({ compositionId, defaultExtension, args, type, }) => {
|
|
13
14
|
var _a;
|
|
15
|
+
if (typeof args[0] !== 'undefined' &&
|
|
16
|
+
typeof parse_command_line_1.parsedCli.output !== 'undefined') {
|
|
17
|
+
throw new Error('Both an output flag (--output) and an output location as a positional argument were passed. Please choose only one of the ways.');
|
|
18
|
+
}
|
|
14
19
|
return ((_a = (0, exports.getUserPassedOutputLocation)(args)) !== null && _a !== void 0 ? _a : (0, get_default_out_name_1.getDefaultOutLocation)({
|
|
15
20
|
compositionName: compositionId,
|
|
16
21
|
defaultExtension,
|
package/dist/versions.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.versionsCommand = exports.validateVersionsBeforeCommand = exports.VERSIONS_COMMAND = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
-
const
|
|
8
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
9
|
const config_1 = require("./config");
|
|
10
10
|
const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
|
|
11
11
|
const log_1 = require("./log");
|
|
@@ -14,7 +14,7 @@ const resolve_from_1 = require("./resolve-from");
|
|
|
14
14
|
const getVersion = async (remotionRoot, p) => {
|
|
15
15
|
try {
|
|
16
16
|
const remotionPkgJson = (0, resolve_from_1.resolveFrom)(remotionRoot, `${p}/package.json`);
|
|
17
|
-
const file = await
|
|
17
|
+
const file = await node_fs_1.default.promises.readFile(remotionPkgJson, 'utf-8');
|
|
18
18
|
const packageJson = JSON.parse(file);
|
|
19
19
|
return packageJson.version;
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-alpha7",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
29
29
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@remotion/bundler": "4.0.0-
|
|
32
|
-
"@remotion/media-utils": "4.0.0-
|
|
33
|
-
"@remotion/player": "4.0.0-
|
|
34
|
-
"@remotion/renderer": "4.0.0-
|
|
31
|
+
"@remotion/bundler": "4.0.0-alpha7",
|
|
32
|
+
"@remotion/media-utils": "4.0.0-alpha7",
|
|
33
|
+
"@remotion/player": "4.0.0-alpha7",
|
|
34
|
+
"@remotion/renderer": "4.0.0-alpha7",
|
|
35
35
|
"dotenv": "9.0.2",
|
|
36
36
|
"memfs": "3.4.3",
|
|
37
37
|
"minimist": "1.2.6",
|
|
38
38
|
"open": "^8.4.2",
|
|
39
39
|
"prompts": "2.4.1",
|
|
40
|
-
"remotion": "4.0.0-
|
|
40
|
+
"remotion": "4.0.0-alpha7",
|
|
41
41
|
"semver": "7.3.5",
|
|
42
42
|
"source-map": "0.6.1"
|
|
43
43
|
},
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@types/semver": "^7.3.4",
|
|
57
57
|
"@typescript-eslint/eslint-plugin": "5.18.0",
|
|
58
58
|
"@typescript-eslint/parser": "5.18.0",
|
|
59
|
-
"@remotion/zod-types": "4.0.0-
|
|
59
|
+
"@remotion/zod-types": "4.0.0-alpha7",
|
|
60
60
|
"eslint": "8.25.0",
|
|
61
61
|
"eslint-plugin-10x": "1.5.2",
|
|
62
62
|
"eslint-plugin-react": "7.29.4",
|
package/dist/ansi/ansi-regex.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stripAnsi = exports.ansiRegex = void 0;
|
|
4
|
-
const ansiRegex = () => {
|
|
5
|
-
const pattern = [
|
|
6
|
-
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
|
|
7
|
-
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))',
|
|
8
|
-
].join('|');
|
|
9
|
-
return new RegExp(pattern, 'g');
|
|
10
|
-
};
|
|
11
|
-
exports.ansiRegex = ansiRegex;
|
|
12
|
-
const stripAnsi = (str) => {
|
|
13
|
-
if (typeof str !== 'string') {
|
|
14
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof str}\``);
|
|
15
|
-
}
|
|
16
|
-
return str.replace((0, exports.ansiRegex)(), '');
|
|
17
|
-
};
|
|
18
|
-
exports.stripAnsi = stripAnsi;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { FfmpegExecutable } from '@remotion/renderer';
|
|
2
|
-
export declare const setFfmpegExecutable: (ffmpegPath: FfmpegExecutable) => void;
|
|
3
|
-
export declare const getCustomFfmpegExecutable: () => FfmpegExecutable;
|
|
4
|
-
export declare const setFfprobeExecutable: (ffprobePath: FfmpegExecutable) => void;
|
|
5
|
-
export declare const getCustomFfprobeExecutable: () => FfmpegExecutable;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCustomFfprobeExecutable = exports.setFfprobeExecutable = exports.getCustomFfmpegExecutable = exports.setFfmpegExecutable = void 0;
|
|
4
|
-
let currentFfmpegExecutablePath = null;
|
|
5
|
-
let currentFfprobeExecutablePath = null;
|
|
6
|
-
const setFfmpegExecutable = (ffmpegPath) => {
|
|
7
|
-
currentFfmpegExecutablePath = ffmpegPath;
|
|
8
|
-
};
|
|
9
|
-
exports.setFfmpegExecutable = setFfmpegExecutable;
|
|
10
|
-
const getCustomFfmpegExecutable = () => {
|
|
11
|
-
return currentFfmpegExecutablePath;
|
|
12
|
-
};
|
|
13
|
-
exports.getCustomFfmpegExecutable = getCustomFfmpegExecutable;
|
|
14
|
-
const setFfprobeExecutable = (ffprobePath) => {
|
|
15
|
-
currentFfprobeExecutablePath = ffprobePath;
|
|
16
|
-
};
|
|
17
|
-
exports.setFfprobeExecutable = setFfprobeExecutable;
|
|
18
|
-
const getCustomFfprobeExecutable = () => {
|
|
19
|
-
return currentFfprobeExecutablePath;
|
|
20
|
-
};
|
|
21
|
-
exports.getCustomFfprobeExecutable = getCustomFfprobeExecutable;
|
package/dist/config/quality.d.ts
DELETED
package/dist/config/quality.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getQuality = exports.setQuality = void 0;
|
|
4
|
-
const renderer_1 = require("@remotion/renderer");
|
|
5
|
-
const defaultValue = undefined;
|
|
6
|
-
let quality = defaultValue;
|
|
7
|
-
const setQuality = (q) => {
|
|
8
|
-
renderer_1.RenderInternals.validateQuality(q);
|
|
9
|
-
if (q === 0 || q === undefined) {
|
|
10
|
-
quality = defaultValue;
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
quality = q;
|
|
14
|
-
};
|
|
15
|
-
exports.setQuality = setQuality;
|
|
16
|
-
const getQuality = () => quality;
|
|
17
|
-
exports.getQuality = getQuality;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ClipboardIcon = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const ClipboardIcon = () => {
|
|
6
|
-
return ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "far", "data-icon": "clipboard", className: "svg-inline--fa fa-clipboard fa-w-12", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 384 512", style: {
|
|
7
|
-
height: 16,
|
|
8
|
-
verticalAlign: 'middle',
|
|
9
|
-
marginTop: -3,
|
|
10
|
-
}, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z" }) }));
|
|
11
|
-
};
|
|
12
|
-
exports.ClipboardIcon = ClipboardIcon;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CollapsedCompositionSelector = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const colors_1 = require("../helpers/colors");
|
|
7
|
-
const caret_1 = require("../icons/caret");
|
|
8
|
-
const z_index_1 = require("../state/z-index");
|
|
9
|
-
const CollapsedCompositionSelector = ({ onExpand }) => {
|
|
10
|
-
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
11
|
-
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
12
|
-
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
13
|
-
setHovered(true);
|
|
14
|
-
}, []);
|
|
15
|
-
const onPointerLeave = (0, react_1.useCallback)(() => {
|
|
16
|
-
setHovered(false);
|
|
17
|
-
}, []);
|
|
18
|
-
const style = (0, react_1.useMemo)(() => {
|
|
19
|
-
return {
|
|
20
|
-
border: 'none',
|
|
21
|
-
borderRight: '2px solid black',
|
|
22
|
-
cursor: 'pointer',
|
|
23
|
-
color: 'white',
|
|
24
|
-
display: 'flex',
|
|
25
|
-
justifyContent: 'center',
|
|
26
|
-
alignItems: 'center',
|
|
27
|
-
paddingLeft: 7,
|
|
28
|
-
paddingRight: 4,
|
|
29
|
-
backgroundColor: (0, colors_1.getBackgroundFromHoverState)({
|
|
30
|
-
hovered,
|
|
31
|
-
selected: false,
|
|
32
|
-
}),
|
|
33
|
-
appearance: 'none',
|
|
34
|
-
WebkitAppearance: 'none',
|
|
35
|
-
};
|
|
36
|
-
}, [hovered]);
|
|
37
|
-
return ((0, jsx_runtime_1.jsx)("button", { style: style, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, type: "button", role: "button", tabIndex: tabIndex, onClick: onExpand, children: (0, jsx_runtime_1.jsx)(caret_1.CaretRight, {}) }));
|
|
38
|
-
};
|
|
39
|
-
exports.CollapsedCompositionSelector = CollapsedCompositionSelector;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare type SerializedJSONWithDate = {
|
|
2
|
-
serializedString: string;
|
|
3
|
-
customDateUsed: boolean;
|
|
4
|
-
};
|
|
5
|
-
export declare const serializeJSONWithDate: (data: unknown, indent: number | undefined) => SerializedJSONWithDate;
|
|
6
|
-
export declare const deserializeJSONWithDate: (data: string) => any;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeJSONWithDate = exports.serializeJSONWithDate = void 0;
|
|
4
|
-
const serializeJSONWithDate = (data, indent) => {
|
|
5
|
-
let customDateUsed = false;
|
|
6
|
-
const serializedString = JSON.stringify(data, function (key, value) {
|
|
7
|
-
if (this[key] instanceof Date) {
|
|
8
|
-
customDateUsed = true;
|
|
9
|
-
return `remotion-date:${this[key].toISOString()}`;
|
|
10
|
-
}
|
|
11
|
-
return value;
|
|
12
|
-
}, indent);
|
|
13
|
-
return { serializedString, customDateUsed };
|
|
14
|
-
};
|
|
15
|
-
exports.serializeJSONWithDate = serializeJSONWithDate;
|
|
16
|
-
const deserializeJSONWithDate = (data) => {
|
|
17
|
-
return JSON.parse(data, (_, value) => {
|
|
18
|
-
if (typeof value === 'string' && value.startsWith('remotion-date:')) {
|
|
19
|
-
return new Date(value.replace('remotion-date:', ''));
|
|
20
|
-
}
|
|
21
|
-
return value;
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
exports.deserializeJSONWithDate = deserializeJSONWithDate;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RichTimelineToggle = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const is_current_selected_still_1 = require("../helpers/is-current-selected-still");
|
|
7
|
-
const timeline_1 = require("../icons/timeline");
|
|
8
|
-
const rich_timeline_1 = require("../state/rich-timeline");
|
|
9
|
-
const ControlButton_1 = require("./ControlButton");
|
|
10
|
-
const tooltip = 'Enable rich timeline. Go to remotion.dev/docs/timeline for more information.';
|
|
11
|
-
const RichTimelineToggle = () => {
|
|
12
|
-
const { richTimeline, setRichTimeline } = (0, react_1.useContext)(rich_timeline_1.RichTimelineContext);
|
|
13
|
-
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
14
|
-
const onClick = (0, react_1.useCallback)(() => {
|
|
15
|
-
setRichTimeline((c) => {
|
|
16
|
-
(0, rich_timeline_1.persistRichTimelineOption)(!c);
|
|
17
|
-
return !c;
|
|
18
|
-
});
|
|
19
|
-
}, [setRichTimeline]);
|
|
20
|
-
if (isStill) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: tooltip, "aria-label": tooltip, onClick: onClick, children: (0, jsx_runtime_1.jsx)(timeline_1.TimelineIcon, { style: {
|
|
24
|
-
width: 16,
|
|
25
|
-
height: 16,
|
|
26
|
-
color: richTimeline ? 'var(--blue)' : 'white',
|
|
27
|
-
} }) }));
|
|
28
|
-
};
|
|
29
|
-
exports.RichTimelineToggle = RichTimelineToggle;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Thumbnail = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const remotion_1 = require("remotion");
|
|
7
|
-
const checkerboard_background_1 = require("../helpers/checkerboard-background");
|
|
8
|
-
const checkerboard_1 = require("../state/checkerboard");
|
|
9
|
-
const Thumbnail = ({ composition, targetHeight, targetWidth, frameToDisplay }) => {
|
|
10
|
-
const { height, width } = composition;
|
|
11
|
-
const heightRatio = targetHeight / height;
|
|
12
|
-
const widthRatio = targetWidth / width;
|
|
13
|
-
const ratio = Math.min(heightRatio, widthRatio);
|
|
14
|
-
const scale = ratio;
|
|
15
|
-
const actualWidth = width * scale;
|
|
16
|
-
const actualHeight = height * scale;
|
|
17
|
-
const correction = 0 - (1 - scale) / 2;
|
|
18
|
-
const xCorrection = correction * width;
|
|
19
|
-
const yCorrection = correction * height;
|
|
20
|
-
const [thumbnailId] = (0, react_1.useState)(() => String((0, remotion_1.random)(null)));
|
|
21
|
-
const { checkerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
22
|
-
const container = (0, react_1.useMemo)(() => {
|
|
23
|
-
return {
|
|
24
|
-
width: targetWidth,
|
|
25
|
-
height: targetHeight,
|
|
26
|
-
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
27
|
-
display: 'flex',
|
|
28
|
-
justifyContent: 'center',
|
|
29
|
-
alignItems: 'center',
|
|
30
|
-
};
|
|
31
|
-
}, [targetHeight, targetWidth]);
|
|
32
|
-
const outer = (0, react_1.useMemo)(() => {
|
|
33
|
-
return {
|
|
34
|
-
width: actualWidth,
|
|
35
|
-
height: actualHeight,
|
|
36
|
-
backgroundColor: (0, checkerboard_background_1.checkerboardBackgroundColor)(checkerboard),
|
|
37
|
-
backgroundImage: (0, checkerboard_background_1.checkerboardBackgroundImage)(checkerboard),
|
|
38
|
-
backgroundPosition: (0, checkerboard_background_1.getCheckerboardBackgroundPos)(25),
|
|
39
|
-
backgroundSize: (0, checkerboard_background_1.getCheckerboardBackgroundPos)(25),
|
|
40
|
-
};
|
|
41
|
-
}, [actualHeight, actualWidth, checkerboard]);
|
|
42
|
-
const inner = (0, react_1.useMemo)(() => {
|
|
43
|
-
return {
|
|
44
|
-
width,
|
|
45
|
-
height,
|
|
46
|
-
transform: `scale(${scale}) `,
|
|
47
|
-
overflow: 'hidden',
|
|
48
|
-
marginLeft: xCorrection,
|
|
49
|
-
marginTop: yCorrection,
|
|
50
|
-
display: 'flex',
|
|
51
|
-
color: 'black',
|
|
52
|
-
};
|
|
53
|
-
}, [height, scale, width, xCorrection, yCorrection]);
|
|
54
|
-
const timelineState = (0, react_1.useMemo)(() => {
|
|
55
|
-
return {
|
|
56
|
-
playing: false,
|
|
57
|
-
frame: frameToDisplay,
|
|
58
|
-
rootId: thumbnailId,
|
|
59
|
-
imperativePlaying: {
|
|
60
|
-
current: false,
|
|
61
|
-
},
|
|
62
|
-
playbackRate: 1,
|
|
63
|
-
setPlaybackRate: () => {
|
|
64
|
-
throw new Error('thumbnail');
|
|
65
|
-
},
|
|
66
|
-
audioAndVideoTags: { current: [] },
|
|
67
|
-
};
|
|
68
|
-
}, [frameToDisplay, thumbnailId]);
|
|
69
|
-
const props = (0, react_1.useMemo)(() => {
|
|
70
|
-
var _a;
|
|
71
|
-
return (_a = composition.defaultProps) !== null && _a !== void 0 ? _a : {};
|
|
72
|
-
}, [composition.defaultProps]);
|
|
73
|
-
const ThumbnailComponent = composition.component;
|
|
74
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)("div", { style: outer, children: (0, jsx_runtime_1.jsx)("div", { style: inner, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.Timeline.TimelineContext.Provider, { value: timelineState, children: (0, jsx_runtime_1.jsx)(ThumbnailComponent, { ...props }) }) }) }) }) }));
|
|
75
|
-
};
|
|
76
|
-
exports.Thumbnail = Thumbnail;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useCompactUI(): boolean;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useCompactUI = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const breakpoint = 1200;
|
|
6
|
-
function useCompactUI() {
|
|
7
|
-
const [compactUI, setCompactUI] = (0, react_1.useState)(window.innerWidth < breakpoint);
|
|
8
|
-
(0, react_1.useEffect)(() => {
|
|
9
|
-
function handleResize() {
|
|
10
|
-
setCompactUI(window.innerWidth < breakpoint);
|
|
11
|
-
}
|
|
12
|
-
window.addEventListener('resize', handleResize);
|
|
13
|
-
handleResize();
|
|
14
|
-
return () => window.removeEventListener('resize', handleResize);
|
|
15
|
-
}, []);
|
|
16
|
-
return compactUI;
|
|
17
|
-
}
|
|
18
|
-
exports.useCompactUI = useCompactUI;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FilmIcon = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const FilmIcon = (props) => {
|
|
6
|
-
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 512 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M488 64h-8v20c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V64H96v20c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12V64h-8C10.7 64 0 74.7 0 88v336c0 13.3 10.7 24 24 24h8v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h320v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h8c13.3 0 24-10.7 24-24V88c0-13.3-10.7-24-24-24zM96 372c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm280 208c0 6.6-5.4 12-12 12H148c-6.6 0-12-5.4-12-12V124c0-6.6 5.4-12 12-12h216c6.6 0 12 5.4 12 12v264zm104-16c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40z" }) }));
|
|
7
|
-
};
|
|
8
|
-
exports.FilmIcon = FilmIcon;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimelineIcon = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const TimelineIcon = (props) => {
|
|
6
|
-
var _a;
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "fas", "data-icon": "stream", className: "svg-inline--fa fa-stream fa-w-16", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: (_a = props.style) === null || _a === void 0 ? void 0 : _a.color, d: "M16 128h416c8.84 0 16-7.16 16-16V48c0-8.84-7.16-16-16-16H16C7.16 32 0 39.16 0 48v64c0 8.84 7.16 16 16 16zm480 80H80c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zm-64 176H16c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16z" }) }));
|
|
8
|
-
};
|
|
9
|
-
exports.TimelineIcon = TimelineIcon;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare type State = {
|
|
3
|
-
richTimeline: boolean;
|
|
4
|
-
setRichTimeline: (cb: (prevState: boolean) => boolean) => void;
|
|
5
|
-
};
|
|
6
|
-
export declare const persistRichTimelineOption: (option: boolean) => void;
|
|
7
|
-
export declare const loadRichTimelineOption: () => boolean;
|
|
8
|
-
export declare const RichTimelineContext: import("react").Context<State>;
|
|
9
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RichTimelineContext = exports.loadRichTimelineOption = exports.persistRichTimelineOption = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const persistRichTimelineOption = (option) => {
|
|
6
|
-
localStorage.setItem('richTimeline', String(option));
|
|
7
|
-
};
|
|
8
|
-
exports.persistRichTimelineOption = persistRichTimelineOption;
|
|
9
|
-
const loadRichTimelineOption = () => {
|
|
10
|
-
const item = localStorage.getItem('richTimeline');
|
|
11
|
-
return item === 'true';
|
|
12
|
-
};
|
|
13
|
-
exports.loadRichTimelineOption = loadRichTimelineOption;
|
|
14
|
-
exports.RichTimelineContext = (0, react_1.createContext)({
|
|
15
|
-
richTimeline: (0, exports.loadRichTimelineOption)(),
|
|
16
|
-
setRichTimeline: () => undefined,
|
|
17
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Codec, RenderMediaOptions } from '@remotion/renderer';
|
|
2
|
-
export declare const getRenderMediaOptions: ({ outputLocation, config, serveUrl, codec, remotionRoot, }: {
|
|
3
|
-
outputLocation: RenderMediaOptions['outputLocation'];
|
|
4
|
-
config: RenderMediaOptions['composition'];
|
|
5
|
-
serveUrl: string;
|
|
6
|
-
codec: Codec;
|
|
7
|
-
remotionRoot: string;
|
|
8
|
-
}) => Promise<RenderMediaOptions>;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRenderMediaOptions = void 0;
|
|
4
|
-
const renderer_1 = require("@remotion/renderer");
|
|
5
|
-
const config_1 = require("./config");
|
|
6
|
-
const get_audio_codec_1 = require("./get-audio-codec");
|
|
7
|
-
const get_cli_options_1 = require("./get-cli-options");
|
|
8
|
-
const image_formats_1 = require("./image-formats");
|
|
9
|
-
const getRenderMediaOptions = async ({ outputLocation, config, serveUrl, codec, remotionRoot, }) => {
|
|
10
|
-
const { proResProfile, concurrency, frameRange, overwrite, inputProps, envVariables, quality, crf, pixelFormat, browserExecutable, ffmpegExecutable, ffprobeExecutable, scale, chromiumOptions, port, numberOfGifLoops, everyNthFrame, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, height, width, } = await (0, get_cli_options_1.getCliOptions)({
|
|
11
|
-
isLambda: false,
|
|
12
|
-
type: 'series',
|
|
13
|
-
remotionRoot,
|
|
14
|
-
});
|
|
15
|
-
const imageFormat = (0, image_formats_1.getImageFormat)(codec);
|
|
16
|
-
const audioCodec = (0, get_audio_codec_1.getResolvedAudioCodec)();
|
|
17
|
-
return {
|
|
18
|
-
outputLocation,
|
|
19
|
-
composition: {
|
|
20
|
-
...config,
|
|
21
|
-
width: width !== null && width !== void 0 ? width : config.width,
|
|
22
|
-
height: height !== null && height !== void 0 ? height : config.height,
|
|
23
|
-
},
|
|
24
|
-
crf,
|
|
25
|
-
envVariables,
|
|
26
|
-
ffmpegExecutable,
|
|
27
|
-
ffprobeExecutable,
|
|
28
|
-
frameRange,
|
|
29
|
-
imageFormat,
|
|
30
|
-
inputProps,
|
|
31
|
-
overwrite,
|
|
32
|
-
pixelFormat,
|
|
33
|
-
proResProfile,
|
|
34
|
-
quality,
|
|
35
|
-
dumpBrowserLogs: renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose'),
|
|
36
|
-
chromiumOptions,
|
|
37
|
-
timeoutInMilliseconds: config_1.ConfigInternals.getCurrentPuppeteerTimeout(),
|
|
38
|
-
scale,
|
|
39
|
-
port,
|
|
40
|
-
numberOfGifLoops,
|
|
41
|
-
everyNthFrame,
|
|
42
|
-
verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose'),
|
|
43
|
-
muted,
|
|
44
|
-
enforceAudioTrack,
|
|
45
|
-
browserExecutable,
|
|
46
|
-
ffmpegOverride,
|
|
47
|
-
concurrency,
|
|
48
|
-
serveUrl,
|
|
49
|
-
codec,
|
|
50
|
-
audioBitrate,
|
|
51
|
-
videoBitrate,
|
|
52
|
-
audioCodec,
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
exports.getRenderMediaOptions = getRenderMediaOptions;
|
package/dist/install.d.ts
DELETED