@remotion/cli 3.3.41 → 3.3.43
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/config/audio-codec.d.ts +3 -0
- package/dist/config/audio-codec.js +20 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +4 -0
- package/dist/editor/components/Modals.js +1 -1
- package/dist/editor/components/RenderButton.js +8 -29
- package/dist/editor/components/RenderModal/CrfSetting.d.ts +2 -2
- package/dist/editor/components/RenderModal/CrfSetting.js +24 -11
- package/dist/editor/components/RenderModal/RenderModal.d.ts +5 -19
- package/dist/editor/components/RenderModal/RenderModal.js +181 -225
- package/dist/editor/components/RenderModal/ScaleSetting.js +18 -2
- package/dist/editor/components/RenderModal/layout.d.ts +0 -1
- package/dist/editor/components/RenderModal/layout.js +2 -8
- package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.js +1 -2
- package/dist/editor/components/RenderQueue/actions.d.ts +2 -15
- package/dist/editor/components/RenderQueue/actions.js +1 -14
- package/dist/editor/components/RenderToolbarIcon.js +8 -30
- package/dist/editor/components/SegmentedControl.js +1 -1
- package/dist/editor/components/SidebarContent.js +1 -2
- package/dist/get-audio-codec.d.ts +2 -0
- package/dist/get-audio-codec.js +10 -0
- package/dist/get-filename.d.ts +1 -3
- package/dist/get-filename.js +5 -23
- package/dist/get-final-output-codec.js +23 -31
- package/dist/get-render-media-options.js +3 -0
- package/dist/parse-command-line.d.ts +2 -1
- package/dist/preview-server/render-queue/get-default-video-contexts.d.ts +1 -1
- package/dist/preview-server/render-queue/job.d.ts +1 -27
- package/dist/preview-server/render-queue/make-retry-payload.js +10 -52
- package/dist/preview-server/render-queue/process-video.js +9 -16
- package/dist/preview-server/routes/add-render.js +0 -13
- package/dist/render-flows/render.d.ts +4 -14
- package/dist/render-flows/render.js +13 -40
- package/dist/render.js +3 -2
- package/package.json +7 -7
- package/dist/editor/components/RenderModal/EveryNthFrameSetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/EveryNthFrameSetting.js +0 -9
- package/dist/editor/components/RenderModal/NumberOfLoopsSetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/NumberOfLoopsSetting.js +0 -26
- package/dist/editor/components/RenderModal/NumberSetting.d.ts +0 -9
- package/dist/editor/components/RenderModal/NumberSetting.js +0 -26
- package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +0 -11
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +0 -15
- package/dist/editor/components/RenderModal/RenderModalAudio.d.ts +0 -13
- package/dist/editor/components/RenderModal/RenderModalAudio.js +0 -22
- package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +0 -22
- package/dist/editor/components/RenderModal/RenderModalBasic.js +0 -70
- package/dist/editor/components/RenderModal/RenderModalGeneral.d.ts +0 -0
- package/dist/editor/components/RenderModal/RenderModalGeneral.js +0 -1
- package/dist/editor/components/RenderModal/RenderModalGif.d.ts +0 -9
- package/dist/editor/components/RenderModal/RenderModalGif.js +0 -16
- package/dist/editor/components/RenderModal/RenderModalHr.d.ts +0 -2
- package/dist/editor/components/RenderModal/RenderModalHr.js +0 -18
- package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +0 -28
- package/dist/editor/components/RenderModal/RenderModalPicture.js +0 -51
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +0 -2
- package/dist/editor/components/RenderModal/human-readable-codec.js +0 -36
- package/dist/editor/icons/audio.d.ts +0 -2
- package/dist/editor/icons/audio.js +0 -6
- package/dist/editor/icons/file.d.ts +0 -2
- package/dist/editor/icons/file.js +0 -6
- package/dist/editor/icons/frame.d.ts +0 -2
- package/dist/editor/icons/frame.js +0 -6
- package/dist/editor/icons/gear.d.ts +0 -2
- package/dist/editor/icons/gear.js +0 -6
- package/dist/editor/icons/gif.d.ts +0 -2
- package/dist/editor/icons/gif.js +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Codec,
|
|
1
|
+
import type { Codec, StillImageFormat } from '@remotion/renderer';
|
|
2
2
|
import type { ApiRoutes } from '../../../preview-server/api-types';
|
|
3
3
|
import type { RenderJob } from '../../../preview-server/render-queue/job';
|
|
4
4
|
export declare const callApi: <Endpoint extends keyof ApiRoutes>(endpoint: Endpoint, body: ApiRoutes[Endpoint]["Request"]) => Promise<ApiRoutes[Endpoint]["Response"]>;
|
|
@@ -11,7 +11,7 @@ export declare const addStillRenderJob: ({ compositionId, outName, imageFormat,
|
|
|
11
11
|
scale: number;
|
|
12
12
|
verbose: boolean;
|
|
13
13
|
}) => Promise<undefined>;
|
|
14
|
-
export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, quality, scale, verbose, codec,
|
|
14
|
+
export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, quality, scale, verbose, codec, }: {
|
|
15
15
|
compositionId: string;
|
|
16
16
|
outName: string;
|
|
17
17
|
imageFormat: StillImageFormat;
|
|
@@ -19,19 +19,6 @@ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat,
|
|
|
19
19
|
scale: number;
|
|
20
20
|
verbose: boolean;
|
|
21
21
|
codec: Codec;
|
|
22
|
-
concurrency: number;
|
|
23
|
-
crf: number | null;
|
|
24
|
-
startFrame: number;
|
|
25
|
-
endFrame: number;
|
|
26
|
-
muted: boolean;
|
|
27
|
-
enforceAudioTrack: boolean;
|
|
28
|
-
proResProfile: ProResProfile | null;
|
|
29
|
-
pixelFormat: PixelFormat;
|
|
30
|
-
audioBitrate: string | null;
|
|
31
|
-
videoBitrate: string | null;
|
|
32
|
-
everyNthFrame: number;
|
|
33
|
-
numberOfGifLoops: number | null;
|
|
34
|
-
delayRenderTimeout: number;
|
|
35
22
|
}) => Promise<undefined>;
|
|
36
23
|
export declare const unsubscribeFromFileExistenceWatcher: ({ file, clientId, }: {
|
|
37
24
|
file: string;
|
|
@@ -38,7 +38,7 @@ const addStillRenderJob = ({ compositionId, outName, imageFormat, quality, frame
|
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
40
|
exports.addStillRenderJob = addStillRenderJob;
|
|
41
|
-
const addVideoRenderJob = ({ compositionId, outName, imageFormat, quality, scale, verbose, codec,
|
|
41
|
+
const addVideoRenderJob = ({ compositionId, outName, imageFormat, quality, scale, verbose, codec, }) => {
|
|
42
42
|
return (0, exports.callApi)('/api/render', {
|
|
43
43
|
compositionId,
|
|
44
44
|
type: 'video',
|
|
@@ -48,19 +48,6 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, quality, scale
|
|
|
48
48
|
scale,
|
|
49
49
|
verbose,
|
|
50
50
|
codec,
|
|
51
|
-
concurrency,
|
|
52
|
-
crf,
|
|
53
|
-
endFrame,
|
|
54
|
-
startFrame,
|
|
55
|
-
muted,
|
|
56
|
-
enforceAudioTrack,
|
|
57
|
-
proResProfile,
|
|
58
|
-
pixelFormat,
|
|
59
|
-
audioBitrate,
|
|
60
|
-
videoBitrate,
|
|
61
|
-
everyNthFrame,
|
|
62
|
-
numberOfGifLoops,
|
|
63
|
-
delayRenderTimeout,
|
|
64
51
|
});
|
|
65
52
|
};
|
|
66
53
|
exports.addVideoRenderJob = addVideoRenderJob;
|
|
@@ -5,7 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const get_default_out_name_1 = require("../../get-default-out-name");
|
|
8
|
-
const get_default_video_contexts_1 = require("../../preview-server/render-queue/get-default-video-contexts");
|
|
9
8
|
const client_id_1 = require("../helpers/client-id");
|
|
10
9
|
const render_1 = require("../icons/render");
|
|
11
10
|
const modals_1 = require("../state/modals");
|
|
@@ -26,48 +25,27 @@ const RenderStillButton = () => {
|
|
|
26
25
|
const video = remotion_1.Internals.useVideo();
|
|
27
26
|
const frame = (0, remotion_1.useCurrentFrame)();
|
|
28
27
|
const onClick = (0, react_1.useCallback)(() => {
|
|
29
|
-
var _a, _b;
|
|
28
|
+
var _a, _b, _c, _d, _e;
|
|
30
29
|
if (!video) {
|
|
31
30
|
return null;
|
|
32
31
|
}
|
|
33
32
|
const isVideo = video.durationInFrames > 1;
|
|
34
|
-
const defaults = window.remotion_renderDefaults;
|
|
35
|
-
if (!defaults) {
|
|
36
|
-
throw new TypeError('Expected defaults');
|
|
37
|
-
}
|
|
38
|
-
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
39
|
-
defaultCodec: defaults.codec,
|
|
40
|
-
isStill: !isVideo,
|
|
41
|
-
});
|
|
42
33
|
setSelectedModal({
|
|
43
34
|
type: 'render',
|
|
44
35
|
compositionId: video.id,
|
|
45
36
|
initialFrame: frame,
|
|
46
|
-
|
|
47
|
-
initialVideoImageFormat: defaults.videoImageFormat,
|
|
37
|
+
initialImageFormat: isVideo ? 'jpeg' : 'png',
|
|
48
38
|
initialOutName: (0, get_default_out_name_1.getDefaultOutLocation)({
|
|
49
39
|
compositionName: video.id,
|
|
50
40
|
defaultExtension: isVideo ? 'mp4' : 'png',
|
|
51
41
|
type: 'asset',
|
|
52
42
|
}),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
initialRenderType,
|
|
58
|
-
|
|
59
|
-
initialConcurrency: defaults.concurrency,
|
|
60
|
-
maxConcurrency: defaults.maxConcurrency,
|
|
61
|
-
minConcurrency: defaults.minConcurrency,
|
|
62
|
-
initialMuted: defaults.muted,
|
|
63
|
-
initialEnforceAudioTrack: defaults.enforceAudioTrack,
|
|
64
|
-
initialProResProfile: defaults.proResProfile,
|
|
65
|
-
initialPixelFormat: defaults.pixelFormat,
|
|
66
|
-
initialAudioBitrate: defaults.audioBitrate,
|
|
67
|
-
initialVideoBitrate: defaults.videoBitrate,
|
|
68
|
-
initialEveryNthFrame: defaults.everyNthFrame,
|
|
69
|
-
initialNumberOfGifLoops: defaults.numberOfGifLoops,
|
|
70
|
-
initialDelayRenderTimeout: defaults.delayRenderTimeout,
|
|
43
|
+
// TODO: Determine defaults from config file
|
|
44
|
+
initialQuality: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.quality) !== null && _b !== void 0 ? _b : 80,
|
|
45
|
+
initialScale: (_d = (_c = window.remotion_renderDefaults) === null || _c === void 0 ? void 0 : _c.scale) !== null && _d !== void 0 ? _d : 1,
|
|
46
|
+
initialVerbose: ((_e = window.remotion_renderDefaults) === null || _e === void 0 ? void 0 : _e.logLevel) === 'verbose',
|
|
47
|
+
initialRenderType: isVideo ? 'video' : 'still',
|
|
48
|
+
initialCodec: 'h264',
|
|
71
49
|
});
|
|
72
50
|
}, [video, frame, setSelectedModal]);
|
|
73
51
|
if (!video) {
|
|
@@ -5,7 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
7
|
const CompositionSelector_1 = require("./CompositionSelector");
|
|
8
|
-
const CurrentCompositionSideEffects_1 = require("./CurrentCompositionSideEffects");
|
|
9
8
|
const RenderQueue_1 = require("./RenderQueue");
|
|
10
9
|
const context_1 = require("./RenderQueue/context");
|
|
11
10
|
const RendersTab_1 = require("./RendersTab");
|
|
@@ -47,6 +46,6 @@ const SidebarContent = () => {
|
|
|
47
46
|
},
|
|
48
47
|
};
|
|
49
48
|
}, []);
|
|
50
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [shouldRender ? ((0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'compositions', onClick: onCompositionsSelected, children: "Compositions" }), (0, jsx_runtime_1.jsx)(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })] }) })) : null, panel === 'renders' && shouldRender ? ((0, jsx_runtime_1.jsx)(RenderQueue_1.RenderQueue, {})) : ((0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {}))
|
|
49
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [shouldRender ? ((0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'compositions', onClick: onCompositionsSelected, children: "Compositions" }), (0, jsx_runtime_1.jsx)(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })] }) })) : null, panel === 'renders' && shouldRender ? ((0, jsx_runtime_1.jsx)(RenderQueue_1.RenderQueue, {})) : ((0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {}))] }));
|
|
51
50
|
};
|
|
52
51
|
exports.SidebarContent = SidebarContent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getResolvedAudioCodec = void 0;
|
|
4
|
+
const config_1 = require("./config");
|
|
5
|
+
const parse_command_line_1 = require("./parse-command-line");
|
|
6
|
+
const getResolvedAudioCodec = () => {
|
|
7
|
+
var _a;
|
|
8
|
+
return (_a = parse_command_line_1.parsedCli['audio-codec']) !== null && _a !== void 0 ? _a : config_1.ConfigInternals.getAudioCodec();
|
|
9
|
+
};
|
|
10
|
+
exports.getResolvedAudioCodec = getResolvedAudioCodec;
|
package/dist/get-filename.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const getOutputFilename: ({ codec, imageSequence, compositionName, defaultExtension, args, }: {
|
|
3
|
-
codec: Codec;
|
|
1
|
+
export declare const getOutputFilename: ({ imageSequence, compositionName, defaultExtension, args, }: {
|
|
4
2
|
imageSequence: boolean;
|
|
5
3
|
compositionName: string;
|
|
6
4
|
defaultExtension: string;
|
package/dist/get-filename.js
CHANGED
|
@@ -4,14 +4,14 @@ exports.getOutputFilename = void 0;
|
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const log_1 = require("./log");
|
|
6
6
|
const user_passed_output_location_1 = require("./user-passed-output-location");
|
|
7
|
-
const getOutputFilename = ({
|
|
8
|
-
|
|
7
|
+
const getOutputFilename = ({ imageSequence, compositionName, defaultExtension, args, }) => {
|
|
8
|
+
const filename = (0, user_passed_output_location_1.getOutputLocation)({
|
|
9
9
|
compositionId: compositionName,
|
|
10
10
|
defaultExtension,
|
|
11
11
|
args,
|
|
12
12
|
type: imageSequence ? 'sequence' : 'asset',
|
|
13
13
|
});
|
|
14
|
-
|
|
14
|
+
const extension = renderer_1.RenderInternals.getExtensionOfFilename(filename);
|
|
15
15
|
if (imageSequence) {
|
|
16
16
|
if (extension !== null) {
|
|
17
17
|
log_1.Log.error('The output directory of the image sequence cannot have an extension. Got: ' +
|
|
@@ -21,26 +21,8 @@ const getOutputFilename = ({ codec, imageSequence, compositionName, defaultExten
|
|
|
21
21
|
return filename;
|
|
22
22
|
}
|
|
23
23
|
if (extension === null && !imageSequence) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
filename += '.mp4';
|
|
27
|
-
extension = 'mp4';
|
|
28
|
-
}
|
|
29
|
-
if (codec === 'h264-mkv') {
|
|
30
|
-
log_1.Log.warn('No file extension specified, adding .mkv automatically.');
|
|
31
|
-
filename += '.mkv';
|
|
32
|
-
extension = 'mkv';
|
|
33
|
-
}
|
|
34
|
-
if (codec === 'vp8' || codec === 'vp9') {
|
|
35
|
-
log_1.Log.warn('No file extension specified, adding .webm automatically.');
|
|
36
|
-
filename += '.webm';
|
|
37
|
-
extension = 'webm';
|
|
38
|
-
}
|
|
39
|
-
if (codec === 'prores') {
|
|
40
|
-
log_1.Log.warn('No file extension specified, adding .mov automatically.');
|
|
41
|
-
filename += '.mov';
|
|
42
|
-
extension = 'mov';
|
|
43
|
-
}
|
|
24
|
+
log_1.Log.warn(`No file extension specified, adding ${defaultExtension} automatically.`);
|
|
25
|
+
return `${filename}.${defaultExtension}`;
|
|
44
26
|
}
|
|
45
27
|
return filename;
|
|
46
28
|
};
|
|
@@ -2,55 +2,47 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFinalOutputCodec = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
hevc: ['h265'],
|
|
8
|
-
mp3: ['mp3'],
|
|
9
|
-
mov: ['prores'],
|
|
10
|
-
wav: ['wav'],
|
|
11
|
-
aac: ['aac'],
|
|
12
|
-
mkv: ['h264-mkv'],
|
|
13
|
-
gif: ['gif'],
|
|
14
|
-
mp4: ['h264'],
|
|
15
|
-
m4a: ['aac'],
|
|
16
|
-
};
|
|
17
|
-
const deriveExtensionFromFilename = (extension) => {
|
|
18
|
-
var _a;
|
|
5
|
+
const deriveCodecsFromFilename = (extension) => {
|
|
6
|
+
var _a, _b;
|
|
19
7
|
if (extension === null) {
|
|
20
|
-
return [];
|
|
8
|
+
return { possible: [], default: null };
|
|
21
9
|
}
|
|
22
|
-
return
|
|
10
|
+
return {
|
|
11
|
+
default: (_a = renderer_1.RenderInternals.defaultCodecsForFileExtension[extension]) !== null && _a !== void 0 ? _a : null,
|
|
12
|
+
possible: (_b = renderer_1.RenderInternals.makeFileExtensionMap()[extension]) !== null && _b !== void 0 ? _b : [],
|
|
13
|
+
};
|
|
23
14
|
};
|
|
24
15
|
const getFinalOutputCodec = ({ cliFlag, configFile, downloadName, outName, }) => {
|
|
25
16
|
const downloadNameExtension = renderer_1.RenderInternals.getExtensionOfFilename(downloadName);
|
|
26
17
|
const outNameExtension = renderer_1.RenderInternals.getExtensionOfFilename(outName);
|
|
27
|
-
const derivedDownloadCodecs =
|
|
28
|
-
const derivedOutNameCodecs =
|
|
29
|
-
if (derivedDownloadCodecs.length > 0 &&
|
|
30
|
-
derivedOutNameCodecs.length > 0 &&
|
|
31
|
-
derivedDownloadCodecs.join('') !==
|
|
18
|
+
const derivedDownloadCodecs = deriveCodecsFromFilename(downloadNameExtension);
|
|
19
|
+
const derivedOutNameCodecs = deriveCodecsFromFilename(outNameExtension);
|
|
20
|
+
if (derivedDownloadCodecs.possible.length > 0 &&
|
|
21
|
+
derivedOutNameCodecs.possible.length > 0 &&
|
|
22
|
+
derivedDownloadCodecs.possible.join('') !==
|
|
23
|
+
derivedOutNameCodecs.possible.join('')) {
|
|
32
24
|
throw new TypeError(`The download name is ${downloadName} but the output name is ${outName}. The file extensions must match`);
|
|
33
25
|
}
|
|
34
26
|
if (cliFlag) {
|
|
35
|
-
if (derivedDownloadCodecs.length > 0 &&
|
|
36
|
-
derivedDownloadCodecs.indexOf(cliFlag) === -1) {
|
|
37
|
-
throw new TypeError(`The download name is ${downloadName} but --codec=${cliFlag} was passed. The download name implies a codec of ${derivedDownloadCodecs.join(' or ')} which does not align with the --codec flag.`);
|
|
27
|
+
if (derivedDownloadCodecs.possible.length > 0 &&
|
|
28
|
+
derivedDownloadCodecs.possible.indexOf(cliFlag) === -1) {
|
|
29
|
+
throw new TypeError(`The download name is ${downloadName} but --codec=${cliFlag} was passed. The download name implies a codec of ${derivedDownloadCodecs.possible.join(' or ')} which does not align with the --codec flag.`);
|
|
38
30
|
}
|
|
39
|
-
if (derivedOutNameCodecs.length > 0 &&
|
|
40
|
-
derivedOutNameCodecs.indexOf(cliFlag) === -1) {
|
|
41
|
-
throw new TypeError(`The out name is ${outName} but --codec=${cliFlag} was passed. The out name implies a codec of ${derivedOutNameCodecs.join(' or ')} which does not align with the --codec flag.`);
|
|
31
|
+
if (derivedOutNameCodecs.possible.length > 0 &&
|
|
32
|
+
derivedOutNameCodecs.possible.indexOf(cliFlag) === -1) {
|
|
33
|
+
throw new TypeError(`The out name is ${outName} but --codec=${cliFlag} was passed. The out name implies a codec of ${derivedOutNameCodecs.possible.join(' or ')} which does not align with the --codec flag.`);
|
|
42
34
|
}
|
|
43
35
|
return { codec: cliFlag, reason: 'from --codec flag' };
|
|
44
36
|
}
|
|
45
|
-
if (derivedDownloadCodecs.length > 0) {
|
|
37
|
+
if (derivedDownloadCodecs.possible.length > 0) {
|
|
46
38
|
return {
|
|
47
|
-
codec: derivedDownloadCodecs
|
|
39
|
+
codec: derivedDownloadCodecs.default,
|
|
48
40
|
reason: 'derived from download name',
|
|
49
41
|
};
|
|
50
42
|
}
|
|
51
|
-
if (derivedOutNameCodecs.length > 0) {
|
|
43
|
+
if (derivedOutNameCodecs.possible.length > 0) {
|
|
52
44
|
return {
|
|
53
|
-
codec: derivedOutNameCodecs
|
|
45
|
+
codec: derivedOutNameCodecs.default,
|
|
54
46
|
reason: 'derived from out name',
|
|
55
47
|
};
|
|
56
48
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getRenderMediaOptions = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const config_1 = require("./config");
|
|
6
|
+
const get_audio_codec_1 = require("./get-audio-codec");
|
|
6
7
|
const get_cli_options_1 = require("./get-cli-options");
|
|
7
8
|
const image_formats_1 = require("./image-formats");
|
|
8
9
|
const getRenderMediaOptions = async ({ outputLocation, config, serveUrl, codec, remotionRoot, }) => {
|
|
@@ -12,6 +13,7 @@ const getRenderMediaOptions = async ({ outputLocation, config, serveUrl, codec,
|
|
|
12
13
|
remotionRoot,
|
|
13
14
|
});
|
|
14
15
|
const imageFormat = (0, image_formats_1.getImageFormat)(codec);
|
|
16
|
+
const audioCodec = (0, get_audio_codec_1.getResolvedAudioCodec)();
|
|
15
17
|
return {
|
|
16
18
|
outputLocation,
|
|
17
19
|
composition: {
|
|
@@ -47,6 +49,7 @@ const getRenderMediaOptions = async ({ outputLocation, config, serveUrl, codec,
|
|
|
47
49
|
codec,
|
|
48
50
|
audioBitrate,
|
|
49
51
|
videoBitrate,
|
|
52
|
+
audioCodec,
|
|
50
53
|
};
|
|
51
54
|
};
|
|
52
55
|
exports.getRenderMediaOptions = getRenderMediaOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BrowserExecutable, Codec, FfmpegExecutable, ImageFormat, OpenGlRenderer, PixelFormat, ProResProfile } from '@remotion/renderer';
|
|
1
|
+
import type { AudioCodec, BrowserExecutable, Codec, FfmpegExecutable, ImageFormat, OpenGlRenderer, PixelFormat, ProResProfile } from '@remotion/renderer';
|
|
2
2
|
export declare type CommandLineOptions = {
|
|
3
3
|
['browser-executable']: BrowserExecutable;
|
|
4
4
|
['ffmpeg-executable']: FfmpegExecutable;
|
|
@@ -20,6 +20,7 @@ export declare type CommandLineOptions = {
|
|
|
20
20
|
['public-dir']: string;
|
|
21
21
|
['audio-bitrate']: string;
|
|
22
22
|
['video-bitrate']: string;
|
|
23
|
+
['audio-codec']: AudioCodec;
|
|
23
24
|
crf: number;
|
|
24
25
|
force: boolean;
|
|
25
26
|
overwrite: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Codec } from '@remotion/renderer';
|
|
2
|
-
import type { RenderType } from '../../editor/components/RenderModal/
|
|
2
|
+
import type { RenderType } from '../../editor/components/RenderModal/RenderModal';
|
|
3
3
|
export declare const getDefaultCodecs: ({ defaultCodec, isStill, }: {
|
|
4
4
|
defaultCodec: Codec;
|
|
5
5
|
isStill: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Codec, makeCancelSignal,
|
|
1
|
+
import type { Codec, makeCancelSignal, StillImageFormat } from '@remotion/renderer';
|
|
2
2
|
declare type RenderJobDynamicStatus = {
|
|
3
3
|
status: 'done';
|
|
4
4
|
} | {
|
|
@@ -30,19 +30,6 @@ declare type RenderJobDynamicFields = {
|
|
|
30
30
|
quality: number | null;
|
|
31
31
|
scale: number;
|
|
32
32
|
codec: Codec;
|
|
33
|
-
concurrency: number;
|
|
34
|
-
crf: number | null;
|
|
35
|
-
startFrame: number;
|
|
36
|
-
endFrame: number;
|
|
37
|
-
muted: boolean;
|
|
38
|
-
enforceAudioTrack: boolean;
|
|
39
|
-
proResProfile: ProResProfile | null;
|
|
40
|
-
pixelFormat: PixelFormat;
|
|
41
|
-
audioBitrate: string | null;
|
|
42
|
-
videoBitrate: string | null;
|
|
43
|
-
everyNthFrame: number;
|
|
44
|
-
numberOfGifLoops: number | null;
|
|
45
|
-
delayRenderTimeout: number;
|
|
46
33
|
};
|
|
47
34
|
export declare type RenderJob = {
|
|
48
35
|
startedAt: number;
|
|
@@ -70,19 +57,6 @@ declare type AddRenderRequestDynamicFields = {
|
|
|
70
57
|
quality: number | null;
|
|
71
58
|
scale: number;
|
|
72
59
|
verbose: boolean;
|
|
73
|
-
concurrency: number;
|
|
74
|
-
crf: number | null;
|
|
75
|
-
startFrame: number;
|
|
76
|
-
endFrame: number;
|
|
77
|
-
muted: boolean;
|
|
78
|
-
enforceAudioTrack: boolean;
|
|
79
|
-
proResProfile: ProResProfile | null;
|
|
80
|
-
pixelFormat: PixelFormat;
|
|
81
|
-
audioBitrate: string | null;
|
|
82
|
-
videoBitrate: string | null;
|
|
83
|
-
everyNthFrame: number;
|
|
84
|
-
numberOfGifLoops: number | null;
|
|
85
|
-
delayRenderTimeout: number;
|
|
86
60
|
};
|
|
87
61
|
export declare type CancelRenderRequest = {
|
|
88
62
|
jobId: string;
|
|
@@ -1,77 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeRetryPayload = void 0;
|
|
4
|
-
const get_default_video_contexts_1 = require("./get-default-video-contexts");
|
|
5
4
|
const makeRetryPayload = (job) => {
|
|
6
|
-
var _a, _b, _c;
|
|
7
|
-
const defaults = window.remotion_renderDefaults;
|
|
8
|
-
if (!defaults) {
|
|
9
|
-
throw new Error('defaults not set');
|
|
10
|
-
}
|
|
11
5
|
if (job.type === 'still') {
|
|
12
|
-
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
13
|
-
defaultCodec: defaults.codec,
|
|
14
|
-
isStill: true,
|
|
15
|
-
});
|
|
16
6
|
return {
|
|
17
7
|
type: 'render',
|
|
18
8
|
compositionId: job.compositionId,
|
|
19
9
|
initialFrame: job.frame,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
initialVideoImageFormat: 'jpeg',
|
|
23
|
-
initialQuality: (_a = job.quality) !== null && _a !== void 0 ? _a : defaults.quality,
|
|
10
|
+
initialImageFormat: job.imageFormat,
|
|
11
|
+
initialQuality: job.quality,
|
|
24
12
|
initialOutName: job.outName,
|
|
25
13
|
initialScale: job.scale,
|
|
26
14
|
initialVerbose: job.verbose,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
initialConcurrency: defaults.concurrency,
|
|
31
|
-
maxConcurrency: defaults.maxConcurrency,
|
|
32
|
-
minConcurrency: defaults.minConcurrency,
|
|
33
|
-
initialMuted: defaults.muted,
|
|
34
|
-
initialEnforceAudioTrack: defaults.enforceAudioTrack,
|
|
35
|
-
initialProResProfile: defaults.proResProfile,
|
|
36
|
-
initialPixelFormat: defaults.pixelFormat,
|
|
37
|
-
initialAudioBitrate: defaults.audioBitrate,
|
|
38
|
-
initialVideoBitrate: defaults.videoBitrate,
|
|
39
|
-
initialEveryNthFrame: defaults.everyNthFrame,
|
|
40
|
-
initialNumberOfGifLoops: defaults.numberOfGifLoops,
|
|
41
|
-
initialDelayRenderTimeout: defaults.delayRenderTimeout,
|
|
15
|
+
initialRenderType: 'still',
|
|
16
|
+
// TODO: take initial codec from config file
|
|
17
|
+
initialCodec: 'h264',
|
|
42
18
|
};
|
|
43
19
|
}
|
|
44
20
|
if (job.type === 'video') {
|
|
45
|
-
|
|
46
|
-
defaultCodec: defaults.codec,
|
|
47
|
-
isStill: false,
|
|
48
|
-
});
|
|
21
|
+
// TODO: Implement correct retry mechanism for video
|
|
49
22
|
return {
|
|
50
23
|
type: 'render',
|
|
51
24
|
compositionId: job.compositionId,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
initialVideoImageFormat: job.imageFormat,
|
|
55
|
-
initialQuality: (_b = job.quality) !== null && _b !== void 0 ? _b : defaults.quality,
|
|
25
|
+
initialImageFormat: job.imageFormat,
|
|
26
|
+
initialQuality: job.quality,
|
|
56
27
|
initialOutName: job.outName,
|
|
57
28
|
initialScale: job.scale,
|
|
58
29
|
initialVerbose: job.verbose,
|
|
59
30
|
initialFrame: 0,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
minConcurrency: defaults.minConcurrency,
|
|
63
|
-
initialMuted: job.muted,
|
|
64
|
-
initialAudioCodec,
|
|
65
|
-
initialEnforceAudioTrack: job.enforceAudioTrack,
|
|
66
|
-
initialRenderType,
|
|
67
|
-
initialVideoCodec,
|
|
68
|
-
initialProResProfile: (_c = job.proResProfile) !== null && _c !== void 0 ? _c : defaults.proResProfile,
|
|
69
|
-
initialPixelFormat: job.pixelFormat,
|
|
70
|
-
initialAudioBitrate: job.audioBitrate,
|
|
71
|
-
initialVideoBitrate: job.videoBitrate,
|
|
72
|
-
initialEveryNthFrame: job.everyNthFrame,
|
|
73
|
-
initialNumberOfGifLoops: job.numberOfGifLoops,
|
|
74
|
-
initialDelayRenderTimeout: job.delayRenderTimeout,
|
|
31
|
+
initialRenderType: 'video',
|
|
32
|
+
initialCodec: job.codec,
|
|
75
33
|
};
|
|
76
34
|
}
|
|
77
35
|
throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
|
|
@@ -5,12 +5,11 @@ const convert_entry_point_to_serve_url_1 = require("../../convert-entry-point-to
|
|
|
5
5
|
const get_cli_options_1 = require("../../get-cli-options");
|
|
6
6
|
const render_1 = require("../../render-flows/render");
|
|
7
7
|
const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addCleanupCallback, }) => {
|
|
8
|
-
var _a
|
|
8
|
+
var _a;
|
|
9
9
|
if (job.type !== 'video') {
|
|
10
10
|
throw new Error('Expected video job');
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
const { publicDir, browserExecutable, ffmpegExecutable, ffprobeExecutable, chromiumOptions, envVariables, inputProps, port, browser, ffmpegOverride, } = await (0, get_cli_options_1.getCliOptions)({
|
|
12
|
+
const { publicDir, browserExecutable, ffmpegExecutable, ffprobeExecutable, chromiumOptions, envVariables, inputProps, port, browser, puppeteerTimeout, } = await (0, get_cli_options_1.getCliOptions)({
|
|
14
13
|
isLambda: false,
|
|
15
14
|
type: 'still',
|
|
16
15
|
remotionRoot,
|
|
@@ -31,7 +30,7 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
|
|
|
31
30
|
overwrite: true,
|
|
32
31
|
port,
|
|
33
32
|
publicDir,
|
|
34
|
-
puppeteerTimeout
|
|
33
|
+
puppeteerTimeout,
|
|
35
34
|
quality: (_a = job.quality) !== null && _a !== void 0 ? _a : undefined,
|
|
36
35
|
remainingArgs: [],
|
|
37
36
|
scale: job.scale,
|
|
@@ -41,9 +40,12 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
|
|
|
41
40
|
logLevel: job.verbose ? 'verbose' : 'info',
|
|
42
41
|
onProgress,
|
|
43
42
|
indent: true,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
// TODO: Make configurable
|
|
44
|
+
concurrency: null,
|
|
45
|
+
// TODO: Make configurable
|
|
46
|
+
everyNthFrame: 1,
|
|
47
|
+
// TODO: Make configurable
|
|
48
|
+
frameRange: null,
|
|
47
49
|
quiet: false,
|
|
48
50
|
shouldOutputImageSequence: false,
|
|
49
51
|
addCleanupCallback,
|
|
@@ -51,15 +53,6 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
|
|
|
51
53
|
uiCodec: job.codec,
|
|
52
54
|
uiImageFormat: job.imageFormat,
|
|
53
55
|
cancelSignal: job.cancelToken.cancelSignal,
|
|
54
|
-
crf: job.crf,
|
|
55
|
-
ffmpegOverride,
|
|
56
|
-
audioBitrate: job.audioBitrate,
|
|
57
|
-
muted: job.muted,
|
|
58
|
-
enforceAudioTrack: job.enforceAudioTrack,
|
|
59
|
-
proResProfile: (_b = job.proResProfile) !== null && _b !== void 0 ? _b : undefined,
|
|
60
|
-
pixelFormat: job.pixelFormat,
|
|
61
|
-
videoBitrate: job.videoBitrate,
|
|
62
|
-
numberOfGifLoops: job.numberOfGifLoops,
|
|
63
56
|
});
|
|
64
57
|
// TODO: Accept CLI options
|
|
65
58
|
};
|
|
@@ -24,19 +24,6 @@ const handleAddRender = ({ input, entryPoint, remotionRoot, }) => {
|
|
|
24
24
|
startedAt: Date.now(),
|
|
25
25
|
verbose: input.verbose,
|
|
26
26
|
cancelToken: (0, renderer_1.makeCancelSignal)(),
|
|
27
|
-
concurrency: input.concurrency,
|
|
28
|
-
crf: input.crf,
|
|
29
|
-
endFrame: input.endFrame,
|
|
30
|
-
startFrame: input.startFrame,
|
|
31
|
-
muted: input.muted,
|
|
32
|
-
enforceAudioTrack: input.enforceAudioTrack,
|
|
33
|
-
proResProfile: input.proResProfile,
|
|
34
|
-
pixelFormat: input.pixelFormat,
|
|
35
|
-
audioBitrate: input.audioBitrate,
|
|
36
|
-
videoBitrate: input.videoBitrate,
|
|
37
|
-
everyNthFrame: input.everyNthFrame,
|
|
38
|
-
numberOfGifLoops: input.numberOfGifLoops,
|
|
39
|
-
delayRenderTimeout: input.delayRenderTimeout,
|
|
40
27
|
},
|
|
41
28
|
});
|
|
42
29
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { Browser, BrowserExecutable, CancelSignal, ChromiumOptions, Codec,
|
|
2
|
-
import type { Loop } from '../config/number-of-gif-loops';
|
|
1
|
+
import type { Browser, BrowserExecutable, CancelSignal, ChromiumOptions, Codec, FfmpegExecutable, FrameRange, ImageFormat, LogLevel } from '@remotion/renderer';
|
|
3
2
|
import type { JobProgressCallback } from '../preview-server/render-queue/job';
|
|
4
|
-
export declare const renderCompFlow: ({ remotionRoot, fullEntryPoint, ffmpegExecutable, ffprobeExecutable, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, inputProps, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, configFileImageFormat, outputLocationFromUI, quality, onProgress, addCleanupCallback,
|
|
3
|
+
export declare const renderCompFlow: ({ remotionRoot, fullEntryPoint, ffmpegExecutable, ffprobeExecutable, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, inputProps, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, configFileImageFormat, outputLocationFromUI, quality, onProgress, addCleanupCallback, uiCodec, uiImageFormat, cancelSignal, }: {
|
|
5
4
|
remotionRoot: string;
|
|
6
5
|
fullEntryPoint: string;
|
|
7
6
|
entryPointReason: string;
|
|
@@ -33,16 +32,7 @@ export declare const renderCompFlow: ({ remotionRoot, fullEntryPoint, ffmpegExec
|
|
|
33
32
|
quality: number | undefined;
|
|
34
33
|
onProgress: JobProgressCallback;
|
|
35
34
|
addCleanupCallback: (cb: () => Promise<void>) => void;
|
|
36
|
-
crf: Crf | null;
|
|
37
|
-
cancelSignal: CancelSignal | null;
|
|
38
35
|
uiCodec: Codec | null;
|
|
39
|
-
uiImageFormat:
|
|
40
|
-
|
|
41
|
-
audioBitrate: string | null;
|
|
42
|
-
videoBitrate: string | null;
|
|
43
|
-
muted: boolean;
|
|
44
|
-
enforceAudioTrack: boolean;
|
|
45
|
-
proResProfile: ProResProfile | undefined;
|
|
46
|
-
pixelFormat: PixelFormat;
|
|
47
|
-
numberOfGifLoops: Loop;
|
|
36
|
+
uiImageFormat: ImageFormat | null;
|
|
37
|
+
cancelSignal: CancelSignal | null;
|
|
48
38
|
}) => Promise<void>;
|