@remotion/cli 4.0.51 → 4.0.52
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 -8
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/log.d.ts +1 -1
- package/dist/editor/components/CurrentComposition.d.ts +0 -1
- package/dist/editor/components/Modals.js +1 -1
- package/dist/editor/components/NewComposition/RemInput.d.ts +2 -2
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/RenderButton.js +2 -19
- package/dist/editor/components/RenderModal/RenderModal.d.ts +2 -6
- package/dist/editor/components/RenderModal/RenderModal.js +25 -1
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/SidebarRenderButton.js +3 -28
- package/dist/editor/components/UpdateCheck.d.ts +0 -1
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/editor/helpers/render-modal-sections.d.ts +0 -1
- package/dist/editor/state/modals.d.ts +2 -6
- package/dist/get-cli-options.d.ts +2 -2
- package/dist/get-cli-options.js +12 -3
- package/dist/get-final-output-codec.d.ts +2 -1
- package/dist/get-final-output-codec.js +4 -1
- package/dist/gpu.d.ts +2 -0
- package/dist/gpu.js +43 -0
- package/dist/index.d.ts +15 -14
- package/dist/index.js +4 -0
- package/dist/list-of-remotion-packages.js +1 -0
- package/dist/log.d.ts +4 -4
- package/dist/make-on-download.d.ts +3 -1
- package/dist/make-on-download.js +3 -1
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
- package/dist/preview-server/render-queue/get-default-video-contexts.d.ts +8 -4
- package/dist/preview-server/render-queue/get-default-video-contexts.js +21 -5
- package/dist/preview-server/render-queue/make-retry-payload.js +6 -28
- package/dist/preview-server/routes.d.ts +0 -1
- package/dist/print-help.js +37 -66
- package/dist/progress-bar.d.ts +2 -1
- package/dist/progress-bar.js +4 -3
- package/dist/render-flows/render.js +8 -1
- package/dist/render-flows/still.js +18 -4
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -35,6 +35,7 @@ const get_cli_options_1 = require("./get-cli-options");
|
|
|
35
35
|
const get_composition_with_dimension_override_1 = require("./get-composition-with-dimension-override");
|
|
36
36
|
const get_config_file_name_1 = require("./get-config-file-name");
|
|
37
37
|
const get_final_output_codec_1 = require("./get-final-output-codec");
|
|
38
|
+
const gpu_1 = require("./gpu");
|
|
38
39
|
const image_formats_1 = require("./image-formats");
|
|
39
40
|
const initialize_cli_1 = require("./initialize-cli");
|
|
40
41
|
const lambda_command_1 = require("./lambda-command");
|
|
@@ -103,6 +104,9 @@ const cli = async () => {
|
|
|
103
104
|
else if (command === 'ffmpeg') {
|
|
104
105
|
(0, ffmpeg_1.ffmpegCommand)(remotionRoot, process.argv.slice(3));
|
|
105
106
|
}
|
|
107
|
+
else if (command === 'gpu') {
|
|
108
|
+
await (0, gpu_1.gpuCommand)(remotionRoot);
|
|
109
|
+
}
|
|
106
110
|
else if (command === 'ffprobe') {
|
|
107
111
|
(0, ffmpeg_1.ffprobeCommand)(remotionRoot, process.argv.slice(3));
|
|
108
112
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.listOfRemotionPackages = void 0;
|
|
4
4
|
// Keep in sync with create-video
|
|
5
5
|
exports.listOfRemotionPackages = [
|
|
6
|
+
'@remotion/layout-utils',
|
|
6
7
|
'@remotion/bundler',
|
|
7
8
|
'@remotion/cli',
|
|
8
9
|
'@remotion/cloudrun',
|
package/dist/log.d.ts
CHANGED
|
@@ -2,24 +2,24 @@ export declare const Log: {
|
|
|
2
2
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
3
3
|
verboseAdvanced: (options: {
|
|
4
4
|
indent: boolean;
|
|
5
|
-
logLevel: "
|
|
5
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
6
6
|
} & {
|
|
7
7
|
tag?: string | undefined;
|
|
8
8
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
9
9
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
10
10
|
infoAdvanced: (options: {
|
|
11
11
|
indent: boolean;
|
|
12
|
-
logLevel: "
|
|
12
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
13
13
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
14
14
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
15
15
|
warnAdvanced: (options: {
|
|
16
16
|
indent: boolean;
|
|
17
|
-
logLevel: "
|
|
17
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
18
18
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
errorAdvanced: (options: {
|
|
21
21
|
indent: boolean;
|
|
22
|
-
logLevel: "
|
|
22
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
23
23
|
} & {
|
|
24
24
|
tag?: string | undefined;
|
|
25
25
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { LogLevel, RenderMediaOnDownload } from '@remotion/renderer';
|
|
2
2
|
import type { DownloadProgress } from './progress-types';
|
|
3
|
-
export declare const makeOnDownload: ({ indent, logLevel, updatesDontOverwrite, downloads, updateRenderProgress, }: {
|
|
3
|
+
export declare const makeOnDownload: ({ indent, logLevel, updatesDontOverwrite, downloads, updateRenderProgress, isUsingParallelEncoding, }: {
|
|
4
4
|
indent: boolean;
|
|
5
5
|
logLevel: LogLevel;
|
|
6
6
|
updatesDontOverwrite: boolean;
|
|
7
7
|
downloads: DownloadProgress[];
|
|
8
|
+
isUsingParallelEncoding: boolean;
|
|
8
9
|
updateRenderProgress: (progress: {
|
|
9
10
|
newline: boolean;
|
|
10
11
|
printToConsole: boolean;
|
|
12
|
+
isUsingParallelEncoding: boolean;
|
|
11
13
|
}) => void;
|
|
12
14
|
}) => RenderMediaOnDownload;
|
package/dist/make-on-download.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.makeOnDownload = void 0;
|
|
4
4
|
const format_bytes_1 = require("./format-bytes");
|
|
5
5
|
const log_1 = require("./log");
|
|
6
|
-
const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, updateRenderProgress, }) => {
|
|
6
|
+
const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, updateRenderProgress, isUsingParallelEncoding, }) => {
|
|
7
7
|
return (src) => {
|
|
8
8
|
const id = Math.random();
|
|
9
9
|
const download = {
|
|
@@ -19,6 +19,7 @@ const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, upd
|
|
|
19
19
|
updateRenderProgress({
|
|
20
20
|
newline: false,
|
|
21
21
|
printToConsole: !updatesDontOverwrite,
|
|
22
|
+
isUsingParallelEncoding,
|
|
22
23
|
});
|
|
23
24
|
let lastUpdate = Date.now();
|
|
24
25
|
return ({ percent, downloaded, totalSize }) => {
|
|
@@ -33,6 +34,7 @@ const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, upd
|
|
|
33
34
|
updateRenderProgress({
|
|
34
35
|
newline: false,
|
|
35
36
|
printToConsole: !updatesDontOverwrite,
|
|
37
|
+
isUsingParallelEncoding,
|
|
36
38
|
});
|
|
37
39
|
};
|
|
38
40
|
};
|
|
@@ -11,5 +11,5 @@ type Range = {
|
|
|
11
11
|
type Ranges = Range[] & {
|
|
12
12
|
type?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare function parseRange(size: number, str: string | string[]): -1 |
|
|
14
|
+
export declare function parseRange(size: number, str: string | string[]): -1 | -2 | Ranges;
|
|
15
15
|
export {};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type { Codec } from '@remotion/renderer';
|
|
1
|
+
import type { AudioCodec, Codec } from '@remotion/renderer';
|
|
2
2
|
import type { RenderType } from '../../editor/components/RenderModal/RenderModalAdvanced';
|
|
3
|
-
export declare const getDefaultCodecs: ({
|
|
4
|
-
|
|
3
|
+
export declare const getDefaultCodecs: ({ defaultConfigurationVideoCodec, compositionDefaultVideoCodec, renderType, defaultConfigurationAudioCodec, }: {
|
|
4
|
+
defaultConfigurationVideoCodec: Codec | null;
|
|
5
|
+
defaultConfigurationAudioCodec: AudioCodec | null;
|
|
6
|
+
compositionDefaultVideoCodec: Codec | null;
|
|
5
7
|
renderType: RenderType;
|
|
6
8
|
}) => {
|
|
7
|
-
initialAudioCodec:
|
|
9
|
+
initialAudioCodec: AudioCodec;
|
|
8
10
|
initialVideoCodec: Codec;
|
|
9
11
|
initialRenderType: RenderType;
|
|
12
|
+
initialVideoCodecForAudioTab: Codec;
|
|
13
|
+
initialVideoCodecForVideoTab: Codec;
|
|
10
14
|
};
|
|
@@ -2,12 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getDefaultCodecs = void 0;
|
|
4
4
|
const client_1 = require("@remotion/renderer/client");
|
|
5
|
-
const getDefaultCodecs = ({
|
|
6
|
-
|
|
5
|
+
const getDefaultCodecs = ({ defaultConfigurationVideoCodec, compositionDefaultVideoCodec, renderType, defaultConfigurationAudioCodec, }) => {
|
|
6
|
+
var _a;
|
|
7
|
+
const userPreferredVideoCodec = (_a = compositionDefaultVideoCodec !== null && compositionDefaultVideoCodec !== void 0 ? compositionDefaultVideoCodec : defaultConfigurationVideoCodec) !== null && _a !== void 0 ? _a : 'h264';
|
|
8
|
+
const isVideoCodecAnAudioCodec = client_1.BrowserSafeApis.isAudioCodec(userPreferredVideoCodec);
|
|
9
|
+
if (isVideoCodecAnAudioCodec) {
|
|
10
|
+
return {
|
|
11
|
+
initialAudioCodec: userPreferredVideoCodec,
|
|
12
|
+
initialRenderType: 'audio',
|
|
13
|
+
initialVideoCodec: userPreferredVideoCodec,
|
|
14
|
+
initialVideoCodecForAudioTab: userPreferredVideoCodec,
|
|
15
|
+
initialVideoCodecForVideoTab: client_1.BrowserSafeApis.isAudioCodec(defaultConfigurationVideoCodec)
|
|
16
|
+
? 'h264'
|
|
17
|
+
: defaultConfigurationVideoCodec,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const suitableAudioCodecForVideoCodec = client_1.BrowserSafeApis.defaultAudioCodecs[userPreferredVideoCodec].compressed;
|
|
7
21
|
return {
|
|
8
|
-
initialAudioCodec:
|
|
9
|
-
initialVideoCodec:
|
|
10
|
-
initialRenderType:
|
|
22
|
+
initialAudioCodec: defaultConfigurationAudioCodec !== null && defaultConfigurationAudioCodec !== void 0 ? defaultConfigurationAudioCodec : suitableAudioCodecForVideoCodec,
|
|
23
|
+
initialVideoCodec: userPreferredVideoCodec,
|
|
24
|
+
initialRenderType: renderType,
|
|
25
|
+
initialVideoCodecForAudioTab: userPreferredVideoCodec,
|
|
26
|
+
initialVideoCodecForVideoTab: userPreferredVideoCodec,
|
|
11
27
|
};
|
|
12
28
|
};
|
|
13
29
|
exports.getDefaultCodecs = getDefaultCodecs;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeRetryPayload = void 0;
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
|
-
const get_default_video_contexts_1 = require("./get-default-video-contexts");
|
|
6
5
|
const makeRetryPayload = (job) => {
|
|
7
6
|
var _a, _b, _c, _d, _e;
|
|
8
7
|
const defaults = window.remotion_renderDefaults;
|
|
@@ -10,10 +9,6 @@ const makeRetryPayload = (job) => {
|
|
|
10
9
|
throw new Error('defaults not set');
|
|
11
10
|
}
|
|
12
11
|
if (job.type === 'still') {
|
|
13
|
-
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
14
|
-
defaultCodec: defaults.codec,
|
|
15
|
-
renderType: 'still',
|
|
16
|
-
});
|
|
17
12
|
return {
|
|
18
13
|
type: 'render',
|
|
19
14
|
compositionId: job.compositionId,
|
|
@@ -21,12 +16,8 @@ const makeRetryPayload = (job) => {
|
|
|
21
16
|
initialStillImageFormat: job.imageFormat,
|
|
22
17
|
initialVideoImageFormat: defaults.videoImageFormat,
|
|
23
18
|
initialJpegQuality: (_a = job.jpegQuality) !== null && _a !== void 0 ? _a : defaults.jpegQuality,
|
|
24
|
-
initialOutName: job.outName,
|
|
25
19
|
initialScale: job.scale,
|
|
26
20
|
initialVerbose: job.verbose,
|
|
27
|
-
initialVideoCodecForAudioTab: initialAudioCodec,
|
|
28
|
-
initialRenderType,
|
|
29
|
-
initialVideoCodecForVideoTab: initialVideoCodec,
|
|
30
21
|
initialConcurrency: defaults.concurrency,
|
|
31
22
|
maxConcurrency: defaults.maxConcurrency,
|
|
32
23
|
minConcurrency: defaults.minConcurrency,
|
|
@@ -40,7 +31,7 @@ const makeRetryPayload = (job) => {
|
|
|
40
31
|
initialEveryNthFrame: defaults.everyNthFrame,
|
|
41
32
|
initialNumberOfGifLoops: defaults.numberOfGifLoops,
|
|
42
33
|
initialDelayRenderTimeout: job.delayRenderTimeout,
|
|
43
|
-
|
|
34
|
+
defaultConfigurationAudioCodec: defaults.audioCodec,
|
|
44
35
|
initialEnvVariables: job.envVariables,
|
|
45
36
|
initialDisableWebSecurity: job.chromiumOptions.disableWebSecurity,
|
|
46
37
|
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
@@ -52,25 +43,18 @@ const makeRetryPayload = (job) => {
|
|
|
52
43
|
initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
53
44
|
initialColorSpace: defaults.colorSpace,
|
|
54
45
|
initialMultiProcessOnLinux: job.multiProcessOnLinux,
|
|
46
|
+
defaultConfigurationVideoCodec: defaults.codec,
|
|
55
47
|
};
|
|
56
48
|
}
|
|
57
49
|
if (job.type === 'sequence') {
|
|
58
|
-
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
59
|
-
defaultCodec: defaults.codec,
|
|
60
|
-
renderType: 'sequence',
|
|
61
|
-
});
|
|
62
50
|
return {
|
|
63
51
|
type: 'render',
|
|
64
52
|
initialFrame: 0,
|
|
65
53
|
compositionId: job.compositionId,
|
|
66
54
|
initialVideoImageFormat: defaults.videoImageFormat,
|
|
67
55
|
initialJpegQuality: (_b = job.jpegQuality) !== null && _b !== void 0 ? _b : defaults.jpegQuality,
|
|
68
|
-
initialOutName: job.outName,
|
|
69
56
|
initialScale: job.scale,
|
|
70
57
|
initialVerbose: job.verbose,
|
|
71
|
-
initialVideoCodecForAudioTab: initialAudioCodec,
|
|
72
|
-
initialRenderType,
|
|
73
|
-
initialVideoCodecForVideoTab: initialVideoCodec,
|
|
74
58
|
initialConcurrency: defaults.concurrency,
|
|
75
59
|
maxConcurrency: defaults.maxConcurrency,
|
|
76
60
|
minConcurrency: defaults.minConcurrency,
|
|
@@ -84,7 +68,6 @@ const makeRetryPayload = (job) => {
|
|
|
84
68
|
initialEveryNthFrame: defaults.everyNthFrame,
|
|
85
69
|
initialNumberOfGifLoops: defaults.numberOfGifLoops,
|
|
86
70
|
initialDelayRenderTimeout: job.delayRenderTimeout,
|
|
87
|
-
initialAudioCodec: defaults.audioCodec,
|
|
88
71
|
initialEnvVariables: job.envVariables,
|
|
89
72
|
initialDisableWebSecurity: job.chromiumOptions.disableWebSecurity,
|
|
90
73
|
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
@@ -97,20 +80,17 @@ const makeRetryPayload = (job) => {
|
|
|
97
80
|
initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
98
81
|
initialColorSpace: defaults.colorSpace,
|
|
99
82
|
initialMultiProcessOnLinux: job.multiProcessOnLinux,
|
|
83
|
+
defaultConfigurationVideoCodec: defaults.codec,
|
|
84
|
+
defaultConfigurationAudioCodec: defaults.audioCodec,
|
|
100
85
|
};
|
|
101
86
|
}
|
|
102
87
|
if (job.type === 'video') {
|
|
103
|
-
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
104
|
-
defaultCodec: job.codec,
|
|
105
|
-
renderType: 'video',
|
|
106
|
-
});
|
|
107
88
|
return {
|
|
108
89
|
type: 'render',
|
|
109
90
|
compositionId: job.compositionId,
|
|
110
91
|
initialStillImageFormat: defaults.stillImageFormat,
|
|
111
92
|
initialVideoImageFormat: job.imageFormat,
|
|
112
93
|
initialJpegQuality: (_c = job.jpegQuality) !== null && _c !== void 0 ? _c : defaults.jpegQuality,
|
|
113
|
-
initialOutName: job.outName,
|
|
114
94
|
initialScale: job.scale,
|
|
115
95
|
initialVerbose: job.verbose,
|
|
116
96
|
initialFrame: 0,
|
|
@@ -118,10 +98,7 @@ const makeRetryPayload = (job) => {
|
|
|
118
98
|
maxConcurrency: defaults.maxConcurrency,
|
|
119
99
|
minConcurrency: defaults.minConcurrency,
|
|
120
100
|
initialMuted: job.muted,
|
|
121
|
-
initialVideoCodecForAudioTab: initialAudioCodec,
|
|
122
101
|
initialEnforceAudioTrack: job.enforceAudioTrack,
|
|
123
|
-
initialRenderType,
|
|
124
|
-
initialVideoCodecForVideoTab: initialVideoCodec,
|
|
125
102
|
initialProResProfile: (_d = job.proResProfile) !== null && _d !== void 0 ? _d : defaults.proResProfile,
|
|
126
103
|
initialx264Preset: (_e = job.x264Preset) !== null && _e !== void 0 ? _e : defaults.x264Preset,
|
|
127
104
|
initialPixelFormat: job.pixelFormat,
|
|
@@ -130,7 +107,6 @@ const makeRetryPayload = (job) => {
|
|
|
130
107
|
initialEveryNthFrame: job.everyNthFrame,
|
|
131
108
|
initialNumberOfGifLoops: job.numberOfGifLoops,
|
|
132
109
|
initialDelayRenderTimeout: job.delayRenderTimeout,
|
|
133
|
-
initialAudioCodec: job.audioCodec,
|
|
134
110
|
initialEnvVariables: job.envVariables,
|
|
135
111
|
initialDisableWebSecurity: job.chromiumOptions.disableWebSecurity,
|
|
136
112
|
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
@@ -142,6 +118,8 @@ const makeRetryPayload = (job) => {
|
|
|
142
118
|
initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
|
|
143
119
|
initialColorSpace: job.colorSpace,
|
|
144
120
|
initialMultiProcessOnLinux: job.multiProcessOnLinux,
|
|
121
|
+
defaultConfigurationVideoCodec: defaults.codec,
|
|
122
|
+
defaultConfigurationAudioCodec: job.audioCodec,
|
|
145
123
|
};
|
|
146
124
|
}
|
|
147
125
|
throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
2
|
import type { LiveEventsServer } from './live-events';
|
|
4
3
|
export declare const handleRoutes: ({ staticHash, staticHashPrefix, outputHash, outputHashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }: {
|
package/dist/print-help.js
CHANGED
|
@@ -2,79 +2,50 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.printHelp = void 0;
|
|
4
4
|
const chalk_1 = require("./chalk");
|
|
5
|
+
const gpu_1 = require("./gpu");
|
|
5
6
|
const log_1 = require("./log");
|
|
6
7
|
const versions_1 = require("./versions");
|
|
7
8
|
const packagejson = require('../package.json');
|
|
8
|
-
const printFlags = (flags) => {
|
|
9
|
-
flags.forEach(([flag, description]) => {
|
|
10
|
-
log_1.Log.info(chalk_1.chalk.blue(`${flag.padEnd(22, ' ')} ${description}`));
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
9
|
const printHelp = () => {
|
|
14
|
-
log_1.Log.info(`@remotion/cli ${packagejson.version}
|
|
10
|
+
log_1.Log.info(`@remotion/cli ${packagejson.version}`);
|
|
11
|
+
log_1.Log.info(`© ${new Date().getFullYear()} The Remotion AG`);
|
|
15
12
|
log_1.Log.info();
|
|
16
13
|
log_1.Log.info('Available commands:');
|
|
17
14
|
log_1.Log.info('');
|
|
18
|
-
log_1.Log.info('remotion studio <entry-point.ts>');
|
|
19
|
-
log_1.Log.info(
|
|
20
|
-
|
|
21
|
-
log_1.Log.info();
|
|
22
|
-
log_1.Log.info('remotion render
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
log_1.Log.info();
|
|
45
|
-
log_1.Log.info('remotion
|
|
46
|
-
log_1.Log.info(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
['--jpeg-quality', 'Quality for rendered frames, JPEG only, 0-100'],
|
|
53
|
-
['--overwrite', 'Overwrite if file exists, default true'],
|
|
54
|
-
['--browser-executable', 'Custom path for browser executable'],
|
|
55
|
-
['--bundle-cache', 'Cache webpack bundle, boolean, default true'],
|
|
56
|
-
['--log', 'Log level, "error", "warning", "verbose", "info" (default)'],
|
|
57
|
-
['--port', 'Custom port to use for the HTTP server'],
|
|
58
|
-
['--env-file', 'Specify a location for a dotenv file'],
|
|
59
|
-
]);
|
|
60
|
-
log_1.Log.info();
|
|
61
|
-
log_1.Log.info('remotion compositions <index-file.ts>');
|
|
62
|
-
log_1.Log.info(chalk_1.chalk.gray('Prints the available compositions.'));
|
|
63
|
-
log_1.Log.info();
|
|
64
|
-
log_1.Log.info('remotion benchmark <index-file.ts> <list-of-compositions>');
|
|
65
|
-
log_1.Log.info(chalk_1.chalk.gray('Benchmarks rendering a composition. Same options as for render.'));
|
|
66
|
-
log_1.Log.info();
|
|
67
|
-
log_1.Log.info('remotion ' + versions_1.VERSIONS_COMMAND);
|
|
68
|
-
log_1.Log.info(chalk_1.chalk.gray('Prints and validates versions of all Remotion packages.'));
|
|
69
|
-
log_1.Log.info();
|
|
70
|
-
log_1.Log.info('remotion upgrade');
|
|
71
|
-
log_1.Log.info(chalk_1.chalk.gray('Ensure Remotion is on the newest version.'));
|
|
72
|
-
printFlags([
|
|
73
|
-
[
|
|
74
|
-
'--package-manager',
|
|
75
|
-
'Force a specific package manager, defaults to use from lockfile',
|
|
76
|
-
],
|
|
77
|
-
]);
|
|
15
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion studio') + chalk_1.chalk.gray(' <entry-point.ts>'));
|
|
16
|
+
log_1.Log.info('Start the Remotion studio.');
|
|
17
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/studio'));
|
|
18
|
+
log_1.Log.info();
|
|
19
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion render') +
|
|
20
|
+
chalk_1.chalk.gray(' <entry-point.ts> <comp-id> <output-file.mp4>'));
|
|
21
|
+
log_1.Log.info('Render video, audio or an image sequence.');
|
|
22
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/render'));
|
|
23
|
+
log_1.Log.info();
|
|
24
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion still') +
|
|
25
|
+
chalk_1.chalk.gray(' <entry-point.ts> <comp-id> <still.png>'));
|
|
26
|
+
log_1.Log.info('Render a still frame and save it as an image.');
|
|
27
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/still'));
|
|
28
|
+
log_1.Log.info();
|
|
29
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion compositions') + chalk_1.chalk.gray(' <index-file.ts>'));
|
|
30
|
+
log_1.Log.info('Prints the available compositions.');
|
|
31
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/compositions'));
|
|
32
|
+
log_1.Log.info();
|
|
33
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion benchmark') +
|
|
34
|
+
chalk_1.chalk.gray(' <index-file.ts> <list-of-compositions>'));
|
|
35
|
+
log_1.Log.info('Benchmarks rendering a composition. Same options as for render.');
|
|
36
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/benchmark'));
|
|
37
|
+
log_1.Log.info();
|
|
38
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion ' + versions_1.VERSIONS_COMMAND));
|
|
39
|
+
log_1.Log.info('Prints and validates versions of all Remotion packages.');
|
|
40
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/versions'));
|
|
41
|
+
log_1.Log.info();
|
|
42
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion ' + gpu_1.GPU_COMMAND));
|
|
43
|
+
log_1.Log.info('Prints information about how Chrome uses the CPU.');
|
|
44
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/gpu'));
|
|
45
|
+
log_1.Log.info();
|
|
46
|
+
log_1.Log.info(chalk_1.chalk.blue('remotion upgrade'));
|
|
47
|
+
log_1.Log.info('Ensure Remotion is on the newest version.');
|
|
48
|
+
log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/upgrade'));
|
|
78
49
|
log_1.Log.info();
|
|
79
50
|
log_1.Log.info('Visit https://www.remotion.dev/docs/cli for browsable CLI documentation.');
|
|
80
51
|
};
|
package/dist/progress-bar.d.ts
CHANGED
|
@@ -25,10 +25,11 @@ export declare const makeBundlingAndCopyProgress: ({ bundling, copying, symLinks
|
|
|
25
25
|
copying: CopyingState;
|
|
26
26
|
symLinks: SymbolicLinksState;
|
|
27
27
|
}, bundlingStep: number, steps: number) => string;
|
|
28
|
-
export declare const makeRenderingAndStitchingProgress: ({ prog, steps, stitchingStep, }: {
|
|
28
|
+
export declare const makeRenderingAndStitchingProgress: ({ prog, steps, stitchingStep, isUsingParallelEncoding, }: {
|
|
29
29
|
prog: AggregateRenderProgress;
|
|
30
30
|
steps: number;
|
|
31
31
|
stitchingStep: number;
|
|
32
|
+
isUsingParallelEncoding: boolean;
|
|
32
33
|
}) => {
|
|
33
34
|
output: string;
|
|
34
35
|
progress: number;
|
package/dist/progress-bar.js
CHANGED
|
@@ -122,7 +122,7 @@ const makeRenderingProgress = ({ frames, totalFrames, steps, concurrency, doneIn
|
|
|
122
122
|
.filter(truthy_1.truthy)
|
|
123
123
|
.join(' ');
|
|
124
124
|
};
|
|
125
|
-
const makeStitchingProgress = ({ stitchingProgress, steps, stitchingStep, }) => {
|
|
125
|
+
const makeStitchingProgress = ({ stitchingProgress, steps, stitchingStep, isUsingParallelEncoding, }) => {
|
|
126
126
|
const { frames, totalFrames, doneIn, stage, codec } = stitchingProgress;
|
|
127
127
|
const progress = frames / totalFrames;
|
|
128
128
|
const mediaType = codec === 'gif'
|
|
@@ -133,7 +133,7 @@ const makeStitchingProgress = ({ stitchingProgress, steps, stitchingStep, }) =>
|
|
|
133
133
|
return [
|
|
134
134
|
`(${stitchingStep + 1}/${steps})`,
|
|
135
135
|
(0, make_progress_bar_1.makeProgressBar)(progress),
|
|
136
|
-
stage === 'muxing' &&
|
|
136
|
+
stage === 'muxing' && isUsingParallelEncoding
|
|
137
137
|
? `${doneIn ? 'Muxed' : 'Muxing'} ${mediaType}`
|
|
138
138
|
: `${doneIn ? 'Encoded' : 'Encoding'} ${mediaType}`,
|
|
139
139
|
doneIn === null ? `${frames}/${totalFrames}` : chalk_1.chalk.gray(`${doneIn}ms`),
|
|
@@ -141,7 +141,7 @@ const makeStitchingProgress = ({ stitchingProgress, steps, stitchingStep, }) =>
|
|
|
141
141
|
.filter(truthy_1.truthy)
|
|
142
142
|
.join(' ');
|
|
143
143
|
};
|
|
144
|
-
const makeRenderingAndStitchingProgress = ({ prog, steps, stitchingStep, }) => {
|
|
144
|
+
const makeRenderingAndStitchingProgress = ({ prog, steps, stitchingStep, isUsingParallelEncoding, }) => {
|
|
145
145
|
const { rendering, stitching, downloads, bundling } = prog;
|
|
146
146
|
const output = [
|
|
147
147
|
rendering ? makeRenderingProgress(rendering) : null,
|
|
@@ -152,6 +152,7 @@ const makeRenderingAndStitchingProgress = ({ prog, steps, stitchingStep, }) => {
|
|
|
152
152
|
stitchingProgress: stitching,
|
|
153
153
|
steps,
|
|
154
154
|
stitchingStep,
|
|
155
|
+
isUsingParallelEncoding,
|
|
155
156
|
}),
|
|
156
157
|
]
|
|
157
158
|
.filter(truthy_1.truthy)
|
|
@@ -62,6 +62,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
62
62
|
viewport: null,
|
|
63
63
|
logLevel,
|
|
64
64
|
});
|
|
65
|
+
let isUsingParallelEncoding = false;
|
|
65
66
|
const updatesDontOverwrite = (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel });
|
|
66
67
|
const renderProgress = (0, progress_bar_1.createOverwriteableCliOutput)({
|
|
67
68
|
quiet,
|
|
@@ -96,6 +97,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
96
97
|
prog: aggregateRenderProgress,
|
|
97
98
|
steps: steps.length,
|
|
98
99
|
stitchingStep: steps.indexOf('stitching'),
|
|
100
|
+
isUsingParallelEncoding,
|
|
99
101
|
});
|
|
100
102
|
onProgress({ message, value: progress, ...aggregateRenderProgress });
|
|
101
103
|
if (printToConsole) {
|
|
@@ -127,6 +129,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
127
129
|
logLevel,
|
|
128
130
|
updateRenderProgress,
|
|
129
131
|
updatesDontOverwrite,
|
|
132
|
+
isUsingParallelEncoding,
|
|
130
133
|
});
|
|
131
134
|
const puppeteerInstance = await browserInstance;
|
|
132
135
|
addCleanupCallback(() => puppeteerInstance.close(false, logLevel, indent));
|
|
@@ -165,6 +168,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
165
168
|
downloadName: null,
|
|
166
169
|
outName: (0, user_passed_output_location_1.getUserPassedOutputLocation)(argsAfterComposition, outputLocationFromUI),
|
|
167
170
|
uiCodec,
|
|
171
|
+
compositionCodec: config.defaultCodec,
|
|
168
172
|
});
|
|
169
173
|
renderer_1.RenderInternals.validateEvenDimensionsWithCodec({
|
|
170
174
|
width: config.width,
|
|
@@ -217,7 +221,9 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
217
221
|
renderingProgress.frames = rendered;
|
|
218
222
|
updateRenderProgress({ newline: false, printToConsole: true });
|
|
219
223
|
},
|
|
220
|
-
onStart: () =>
|
|
224
|
+
onStart: ({ parallelEncoding }) => {
|
|
225
|
+
isUsingParallelEncoding = parallelEncoding;
|
|
226
|
+
},
|
|
221
227
|
onDownload,
|
|
222
228
|
cancelSignal: cancelSignal !== null && cancelSignal !== void 0 ? cancelSignal : undefined,
|
|
223
229
|
outputDir,
|
|
@@ -246,6 +252,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
246
252
|
data: config.props,
|
|
247
253
|
}).serializedString,
|
|
248
254
|
offthreadVideoCacheSizeInBytes,
|
|
255
|
+
parallelEncodingEnabled: isUsingParallelEncoding,
|
|
249
256
|
});
|
|
250
257
|
updateRenderProgress({ newline: true, printToConsole: true });
|
|
251
258
|
log_1.Log.infoAdvanced({ indent, logLevel }, chalk_1.chalk.blue(`▶ ${absoluteOutputFile}`));
|
|
@@ -38,11 +38,12 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
38
38
|
renderer_1.RenderInternals.isServeUrl(fullEntryPoint) ? null : 'bundling',
|
|
39
39
|
'rendering',
|
|
40
40
|
].filter(truthy_1.truthy);
|
|
41
|
-
const updateRenderProgress = ({ newline, printToConsole, }) => {
|
|
41
|
+
const updateRenderProgress = ({ newline, printToConsole, isUsingParallelEncoding, }) => {
|
|
42
42
|
const { output, progress, message } = (0, progress_bar_1.makeRenderingAndStitchingProgress)({
|
|
43
43
|
prog: aggregate,
|
|
44
44
|
steps: steps.length,
|
|
45
45
|
stitchingStep: steps.indexOf('stitching'),
|
|
46
|
+
isUsingParallelEncoding,
|
|
46
47
|
});
|
|
47
48
|
if (printToConsole) {
|
|
48
49
|
renderProgress.update(updatesDontOverwrite ? message : output, newline);
|
|
@@ -69,7 +70,11 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
69
70
|
onProgress: ({ copying, bundling }) => {
|
|
70
71
|
aggregate.bundling = bundling;
|
|
71
72
|
aggregate.copyingState = copying;
|
|
72
|
-
updateRenderProgress({
|
|
73
|
+
updateRenderProgress({
|
|
74
|
+
newline: false,
|
|
75
|
+
printToConsole: true,
|
|
76
|
+
isUsingParallelEncoding: false,
|
|
77
|
+
});
|
|
73
78
|
},
|
|
74
79
|
indentOutput: indent,
|
|
75
80
|
logLevel,
|
|
@@ -142,13 +147,18 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
142
147
|
steps,
|
|
143
148
|
totalFrames: 1,
|
|
144
149
|
};
|
|
145
|
-
updateRenderProgress({
|
|
150
|
+
updateRenderProgress({
|
|
151
|
+
newline: false,
|
|
152
|
+
printToConsole: true,
|
|
153
|
+
isUsingParallelEncoding: false,
|
|
154
|
+
});
|
|
146
155
|
const onDownload = (0, make_on_download_1.makeOnDownload)({
|
|
147
156
|
downloads: aggregate.downloads,
|
|
148
157
|
indent,
|
|
149
158
|
logLevel,
|
|
150
159
|
updateRenderProgress,
|
|
151
160
|
updatesDontOverwrite,
|
|
161
|
+
isUsingParallelEncoding: false,
|
|
152
162
|
});
|
|
153
163
|
await renderer_1.RenderInternals.internalRenderStill({
|
|
154
164
|
composition: config,
|
|
@@ -186,7 +196,11 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
186
196
|
steps,
|
|
187
197
|
totalFrames: 1,
|
|
188
198
|
};
|
|
189
|
-
updateRenderProgress({
|
|
199
|
+
updateRenderProgress({
|
|
200
|
+
newline: true,
|
|
201
|
+
printToConsole: true,
|
|
202
|
+
isUsingParallelEncoding: false,
|
|
203
|
+
});
|
|
190
204
|
log_1.Log.infoAdvanced({ indent, logLevel }, chalk_1.chalk.blue(`${exists ? '○' : '+'} ${absoluteOutputLocation}`));
|
|
191
205
|
};
|
|
192
206
|
exports.renderStillFlow = renderStillFlow;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.52",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"prompts": "2.4.1",
|
|
36
36
|
"semver": "7.5.3",
|
|
37
37
|
"source-map": "0.6.1",
|
|
38
|
-
"@remotion/bundler": "4.0.
|
|
39
|
-
"@remotion/
|
|
40
|
-
"@remotion/
|
|
41
|
-
"@remotion/
|
|
42
|
-
"remotion": "4.0.
|
|
38
|
+
"@remotion/bundler": "4.0.52",
|
|
39
|
+
"@remotion/renderer": "4.0.52",
|
|
40
|
+
"@remotion/media-utils": "4.0.52",
|
|
41
|
+
"@remotion/player": "4.0.52",
|
|
42
|
+
"remotion": "4.0.52"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"react-dom": "^18.0.0",
|
|
66
66
|
"vitest": "0.31.1",
|
|
67
67
|
"zod": "^3.22.3",
|
|
68
|
-
"@remotion/zod-types": "4.0.
|
|
69
|
-
"@remotion/tailwind": "4.0.
|
|
68
|
+
"@remotion/zod-types": "4.0.52",
|
|
69
|
+
"@remotion/tailwind": "4.0.52"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
72
|
"remotion",
|