@remotion/renderer 4.0.51 → 4.0.53
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/assets/convert-assets-to-file-urls.d.ts +4 -1
- package/dist/assets/convert-assets-to-file-urls.js +3 -1
- package/dist/assets/download-and-map-assets-to-file.d.ts +7 -2
- package/dist/assets/download-and-map-assets-to-file.js +6 -2
- package/dist/assets/download-file.d.ts +3 -0
- package/dist/assets/download-file.js +2 -0
- package/dist/browser/BrowserFetcher.d.ts +5 -1
- package/dist/browser/BrowserFetcher.js +3 -1
- package/dist/client.d.ts +2 -2
- package/dist/get-compositions.js +2 -1
- package/dist/get-local-browser-executable.d.ts +6 -1
- package/dist/get-local-browser-executable.js +2 -2
- package/dist/get-silent-parts.d.ts +1 -1
- package/dist/index.d.ts +37 -24
- package/dist/index.js +2 -0
- package/dist/is-audio-codec.d.ts +1 -1
- package/dist/logger.d.ts +1 -1
- package/dist/offthread-video-server.js +1 -1
- package/dist/open-browser.js +6 -2
- package/dist/options/gl.d.ts +1 -1
- package/dist/options/index.d.ts +1 -1
- package/dist/render-frames.d.ts +1 -0
- package/dist/render-frames.js +10 -3
- package/dist/render-media.js +5 -3
- package/dist/render-still.js +3 -1
- package/dist/select-composition.js +2 -1
- package/dist/stitch-frames-to-video.d.ts +0 -1
- package/dist/stitch-frames-to-video.js +6 -5
- package/dist/test-gpu.d.ts +14 -0
- package/dist/test-gpu.js +40 -0
- package/dist/types.d.ts +1 -0
- package/dist/validate-opengl-renderer.d.ts +4 -0
- package/dist/validate-opengl-renderer.js +21 -0
- package/package.json +10 -10
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { TRenderAsset } from 'remotion';
|
|
2
|
+
import type { LogLevel } from '../log-level';
|
|
2
3
|
import type { RenderMediaOnDownload } from './download-and-map-assets-to-file';
|
|
3
4
|
import type { DownloadMap } from './download-map';
|
|
4
|
-
export declare const convertAssetsToFileUrls: ({ assets, onDownload, downloadMap, }: {
|
|
5
|
+
export declare const convertAssetsToFileUrls: ({ assets, onDownload, downloadMap, indent, logLevel, }: {
|
|
5
6
|
assets: TRenderAsset[][];
|
|
6
7
|
onDownload: RenderMediaOnDownload;
|
|
7
8
|
downloadMap: DownloadMap;
|
|
9
|
+
indent: boolean;
|
|
10
|
+
logLevel: LogLevel;
|
|
8
11
|
}) => Promise<TRenderAsset[][]>;
|
|
@@ -9,7 +9,7 @@ const chunk = (input, size) => {
|
|
|
9
9
|
: [...arr.slice(0, -1), [...arr.slice(-1)[0], item]];
|
|
10
10
|
}, []);
|
|
11
11
|
};
|
|
12
|
-
const convertAssetsToFileUrls = async ({ assets, onDownload, downloadMap, }) => {
|
|
12
|
+
const convertAssetsToFileUrls = async ({ assets, onDownload, downloadMap, indent, logLevel, }) => {
|
|
13
13
|
const chunks = chunk(assets, 1000);
|
|
14
14
|
const results = [];
|
|
15
15
|
for (const ch of chunks) {
|
|
@@ -19,6 +19,8 @@ const convertAssetsToFileUrls = async ({ assets, onDownload, downloadMap, }) =>
|
|
|
19
19
|
renderAsset: a,
|
|
20
20
|
onDownload,
|
|
21
21
|
downloadMap,
|
|
22
|
+
indent,
|
|
23
|
+
logLevel,
|
|
22
24
|
});
|
|
23
25
|
}));
|
|
24
26
|
}));
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import type { TRenderAsset } from 'remotion';
|
|
2
|
+
import type { LogLevel } from '../log-level';
|
|
2
3
|
import type { DownloadMap } from './download-map';
|
|
3
4
|
export type RenderMediaOnDownload = (src: string) => ((progress: {
|
|
4
5
|
percent: number | null;
|
|
5
6
|
downloaded: number;
|
|
6
7
|
totalSize: number | null;
|
|
7
8
|
}) => void) | undefined | void;
|
|
8
|
-
export declare const downloadAsset: ({ src, downloadMap, }: {
|
|
9
|
+
export declare const downloadAsset: ({ src, downloadMap, indent, logLevel, }: {
|
|
9
10
|
src: string;
|
|
10
11
|
downloadMap: DownloadMap;
|
|
12
|
+
indent: boolean;
|
|
13
|
+
logLevel: LogLevel;
|
|
11
14
|
}) => Promise<string>;
|
|
12
15
|
export declare const markAllAssetsAsDownloaded: (downloadMap: DownloadMap) => void;
|
|
13
16
|
export declare const getSanitizedFilenameForAssetUrl: ({ src, downloadDir, contentDisposition, contentType, }: {
|
|
@@ -16,9 +19,11 @@ export declare const getSanitizedFilenameForAssetUrl: ({ src, downloadDir, conte
|
|
|
16
19
|
contentDisposition: string | null;
|
|
17
20
|
contentType: string | null;
|
|
18
21
|
}) => string;
|
|
19
|
-
export declare const downloadAndMapAssetsToFileUrl: ({ renderAsset, onDownload, downloadMap, }: {
|
|
22
|
+
export declare const downloadAndMapAssetsToFileUrl: ({ renderAsset, onDownload, downloadMap, logLevel, indent, }: {
|
|
20
23
|
renderAsset: TRenderAsset;
|
|
21
24
|
onDownload: RenderMediaOnDownload | null;
|
|
22
25
|
downloadMap: DownloadMap;
|
|
26
|
+
logLevel: LogLevel;
|
|
27
|
+
indent: boolean;
|
|
23
28
|
}) => Promise<TRenderAsset>;
|
|
24
29
|
export declare const attachDownloadListenerToEmitter: (downloadMap: DownloadMap, onDownload: RenderMediaOnDownload | null) => () => void;
|
|
@@ -115,7 +115,7 @@ function validateBufferEncoding(potentialEncoding, dataUrl) {
|
|
|
115
115
|
throw new TypeError(errMessage);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
const downloadAsset = async ({ src, downloadMap, }) => {
|
|
118
|
+
const downloadAsset = async ({ src, downloadMap, indent, logLevel, }) => {
|
|
119
119
|
var _a, _b, _c;
|
|
120
120
|
if ((0, compress_assets_1.isAssetCompressed)(src)) {
|
|
121
121
|
return src;
|
|
@@ -183,6 +183,8 @@ const downloadAsset = async ({ src, downloadMap, }) => {
|
|
|
183
183
|
src,
|
|
184
184
|
contentType,
|
|
185
185
|
}),
|
|
186
|
+
indent,
|
|
187
|
+
logLevel,
|
|
186
188
|
});
|
|
187
189
|
notifyAssetIsDownloaded({ src, downloadMap, downloadDir, to });
|
|
188
190
|
return to;
|
|
@@ -241,11 +243,13 @@ const getSanitizedFilenameForAssetUrl = ({ src, downloadDir, contentDisposition,
|
|
|
241
243
|
return node_path_1.default.join(downloadDir, (0, sanitize_filepath_1.sanitizeFilePath)(filename));
|
|
242
244
|
};
|
|
243
245
|
exports.getSanitizedFilenameForAssetUrl = getSanitizedFilenameForAssetUrl;
|
|
244
|
-
const downloadAndMapAssetsToFileUrl = async ({ renderAsset, onDownload, downloadMap, }) => {
|
|
246
|
+
const downloadAndMapAssetsToFileUrl = async ({ renderAsset, onDownload, downloadMap, logLevel, indent, }) => {
|
|
245
247
|
const cleanup = (0, exports.attachDownloadListenerToEmitter)(downloadMap, onDownload);
|
|
246
248
|
const newSrc = await (0, exports.downloadAsset)({
|
|
247
249
|
src: renderAsset.src,
|
|
248
250
|
downloadMap,
|
|
251
|
+
indent,
|
|
252
|
+
logLevel,
|
|
249
253
|
});
|
|
250
254
|
cleanup();
|
|
251
255
|
return {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LogLevel } from '../log-level';
|
|
1
2
|
type Response = {
|
|
2
3
|
sizeInBytes: number;
|
|
3
4
|
to: string;
|
|
@@ -10,6 +11,8 @@ type Options = {
|
|
|
10
11
|
downloaded: number;
|
|
11
12
|
totalSize: number | null;
|
|
12
13
|
}) => void) | undefined;
|
|
14
|
+
logLevel: LogLevel;
|
|
15
|
+
indent: boolean;
|
|
13
16
|
};
|
|
14
17
|
export declare const downloadFile: (options: Options, retries?: number, attempt?: number) => Promise<Response>;
|
|
15
18
|
export {};
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.downloadFile = void 0;
|
|
4
4
|
const node_fs_1 = require("node:fs");
|
|
5
5
|
const ensure_output_directory_1 = require("../ensure-output-directory");
|
|
6
|
+
const logger_1 = require("../logger");
|
|
6
7
|
const read_file_1 = require("./read-file");
|
|
7
8
|
const incorrectContentLengthToken = 'Download finished with';
|
|
8
9
|
const downloadFileWithoutRetries = ({ onProgress, url, to: toFn }) => {
|
|
@@ -99,6 +100,7 @@ const downloadFile = async (options, retries = 2, attempt = 1) => {
|
|
|
99
100
|
if (retries === 0) {
|
|
100
101
|
throw err;
|
|
101
102
|
}
|
|
103
|
+
logger_1.Log.warnAdvanced({ indent: options.indent, logLevel: options.logLevel }, `Downloading ${options.url} failed (will retry): ${message}`);
|
|
102
104
|
const backoffInSeconds = (attempt + 1) ** 2;
|
|
103
105
|
await new Promise((resolve) => {
|
|
104
106
|
setTimeout(() => resolve(), backoffInSeconds * 1000);
|
|
@@ -13,12 +13,16 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { LogLevel } from '../log-level';
|
|
16
17
|
interface BrowserFetcherRevisionInfo {
|
|
17
18
|
folderPath: string;
|
|
18
19
|
executablePath: string;
|
|
19
20
|
url: string;
|
|
20
21
|
local: boolean;
|
|
21
22
|
}
|
|
22
|
-
export declare const downloadBrowser: (
|
|
23
|
+
export declare const downloadBrowser: (options: {
|
|
24
|
+
logLevel: LogLevel;
|
|
25
|
+
indent: boolean;
|
|
26
|
+
}) => Promise<BrowserFetcherRevisionInfo | undefined>;
|
|
23
27
|
export declare const getRevisionInfo: () => BrowserFetcherRevisionInfo;
|
|
24
28
|
export {};
|
|
@@ -89,7 +89,7 @@ const destination = '.thorium';
|
|
|
89
89
|
const getDownloadsFolder = () => {
|
|
90
90
|
return path.join((0, get_download_destination_1.getDownloadsCacheDir)(), destination);
|
|
91
91
|
};
|
|
92
|
-
const downloadBrowser = async () => {
|
|
92
|
+
const downloadBrowser = async (options) => {
|
|
93
93
|
const platform = getPlatform();
|
|
94
94
|
const downloadURL = getThoriumDownloadUrl(platform);
|
|
95
95
|
const fileName = downloadURL.split('/').pop();
|
|
@@ -123,6 +123,8 @@ const downloadBrowser = async () => {
|
|
|
123
123
|
logger_1.Log.info(`Downloading Thorium - ${toMegabytes(progress.downloaded)}/${toMegabytes(progress.totalSize)}`);
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
|
+
indent: options.indent,
|
|
127
|
+
logLevel: options.logLevel,
|
|
126
128
|
});
|
|
127
129
|
await install({ archivePath, folderPath: outputPath });
|
|
128
130
|
}
|
package/dist/client.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const BrowserSafeApis: {
|
|
|
5
5
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
6
6
|
getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
|
|
7
7
|
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
|
|
8
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
8
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
|
|
9
9
|
proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
|
|
10
10
|
x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
11
11
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
@@ -311,7 +311,7 @@ export declare const BrowserSafeApis: {
|
|
|
311
311
|
cliFlag: string;
|
|
312
312
|
docLink: string;
|
|
313
313
|
name: string;
|
|
314
|
-
type: "
|
|
314
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
315
315
|
ssrName: string;
|
|
316
316
|
description: () => JSX.Element;
|
|
317
317
|
};
|
package/dist/get-compositions.js
CHANGED
|
@@ -59,7 +59,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
|
|
|
59
59
|
});
|
|
60
60
|
const res = result;
|
|
61
61
|
return res.map((r) => {
|
|
62
|
-
const { width, durationInFrames, fps, height, id } = r;
|
|
62
|
+
const { width, durationInFrames, fps, height, id, defaultCodec } = r;
|
|
63
63
|
return {
|
|
64
64
|
id,
|
|
65
65
|
width,
|
|
@@ -68,6 +68,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
|
|
|
68
68
|
durationInFrames,
|
|
69
69
|
props: remotion_1.Internals.deserializeJSONWithCustomFields(r.serializedResolvedPropsWithCustomSchema),
|
|
70
70
|
defaultProps: remotion_1.Internals.deserializeJSONWithCustomFields(r.serializedDefaultPropsWithCustomSchema),
|
|
71
|
+
defaultCodec,
|
|
71
72
|
};
|
|
72
73
|
});
|
|
73
74
|
};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { BrowserExecutable } from './browser-executable';
|
|
2
|
-
|
|
2
|
+
import type { LogLevel } from './log-level';
|
|
3
|
+
export declare const ensureLocalBrowser: ({ indent, logLevel, preferredBrowserExecutable, }: {
|
|
4
|
+
preferredBrowserExecutable: BrowserExecutable;
|
|
5
|
+
logLevel: LogLevel;
|
|
6
|
+
indent: boolean;
|
|
7
|
+
}) => Promise<void>;
|
|
3
8
|
export declare const getLocalBrowserExecutable: (preferredBrowserExecutable: BrowserExecutable) => string;
|
|
@@ -68,11 +68,11 @@ const getBrowserStatus = (browserExecutablePath) => {
|
|
|
68
68
|
}
|
|
69
69
|
return { type: 'no-browser' };
|
|
70
70
|
};
|
|
71
|
-
const ensureLocalBrowser = async (preferredBrowserExecutable) => {
|
|
71
|
+
const ensureLocalBrowser = async ({ indent, logLevel, preferredBrowserExecutable, }) => {
|
|
72
72
|
const status = getBrowserStatus(preferredBrowserExecutable);
|
|
73
73
|
if (status.type === 'no-browser') {
|
|
74
74
|
logger_1.Log.info('No local browser could be found. Downloading Thorium https://www.remotion.dev/docs/miscellaneous/thorium-browser');
|
|
75
|
-
await (0, BrowserFetcher_1.downloadBrowser)();
|
|
75
|
+
await (0, BrowserFetcher_1.downloadBrowser)({ indent, logLevel });
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
exports.ensureLocalBrowser = ensureLocalBrowser;
|
|
@@ -3,6 +3,6 @@ import type { LogLevel } from './log-level';
|
|
|
3
3
|
export declare const getSilentParts: ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, }: {
|
|
4
4
|
src: string;
|
|
5
5
|
minDurationInSeconds?: number | undefined;
|
|
6
|
-
logLevel?: "
|
|
6
|
+
logLevel?: "verbose" | "info" | "warn" | "error" | undefined;
|
|
7
7
|
noiseThresholdInDecibels?: number | undefined;
|
|
8
8
|
}) => Promise<GetSilentPartsResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import execa from 'execa';
|
|
4
2
|
import { HeadlessBrowser } from './browser/Browser';
|
|
5
3
|
import { SymbolicateableError } from './error-handling/symbolicateable-error';
|
|
@@ -42,14 +40,18 @@ export { OnStartData, RenderFramesOutput } from './types';
|
|
|
42
40
|
export { validateOutputFilename } from './validate-output-filename';
|
|
43
41
|
export { X264Preset } from './x264-preset';
|
|
44
42
|
export declare const RenderInternals: {
|
|
45
|
-
ensureLocalBrowser: (preferredBrowserExecutable:
|
|
43
|
+
ensureLocalBrowser: ({ indent, logLevel, preferredBrowserExecutable, }: {
|
|
44
|
+
preferredBrowserExecutable: import("./browser-executable").BrowserExecutable;
|
|
45
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
46
|
+
indent: boolean;
|
|
47
|
+
}) => Promise<void>;
|
|
46
48
|
getActualConcurrency: (userPreference: string | number | null) => number;
|
|
47
49
|
serveStatic: (path: string | null, options: {
|
|
48
50
|
port: number | null;
|
|
49
51
|
downloadMap: import("./assets/download-map").DownloadMap;
|
|
50
52
|
remotionRoot: string;
|
|
51
53
|
concurrency: number;
|
|
52
|
-
logLevel: "
|
|
54
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
53
55
|
indent: boolean;
|
|
54
56
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
55
57
|
}) => Promise<{
|
|
@@ -79,6 +81,8 @@ export declare const RenderInternals: {
|
|
|
79
81
|
downloaded: number;
|
|
80
82
|
totalSize: number | null;
|
|
81
83
|
}) => void) | undefined;
|
|
84
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
85
|
+
indent: boolean;
|
|
82
86
|
}, retries?: number, attempt?: number) => Promise<{
|
|
83
87
|
sizeInBytes: number;
|
|
84
88
|
to: string;
|
|
@@ -130,16 +134,16 @@ export declare const RenderInternals: {
|
|
|
130
134
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
131
135
|
DEFAULT_BROWSER: "chrome";
|
|
132
136
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
133
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
134
|
-
validateOpenGlRenderer: (option: "
|
|
137
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
138
|
+
validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
135
139
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
136
140
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
137
141
|
validateJpegQuality: (q: number | undefined) => void;
|
|
138
142
|
DEFAULT_TIMEOUT: number;
|
|
139
143
|
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
140
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
144
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
|
|
141
145
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
142
|
-
isEqualOrBelowLogLevel: (currentLevel: "
|
|
146
|
+
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
143
147
|
isValidLogLevel: (level: string) => boolean;
|
|
144
148
|
perf: typeof perf;
|
|
145
149
|
convertToPositiveFrameIndex: ({ frame, durationInFrames, }: {
|
|
@@ -320,8 +324,8 @@ export declare const RenderInternals: {
|
|
|
320
324
|
};
|
|
321
325
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
322
326
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
323
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
324
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
327
|
+
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
328
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
|
|
325
329
|
DEFAULT_JPEG_QUALITY: number;
|
|
326
330
|
chalk: {
|
|
327
331
|
enabled: () => boolean;
|
|
@@ -377,30 +381,30 @@ export declare const RenderInternals: {
|
|
|
377
381
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
378
382
|
verboseAdvanced: (options: {
|
|
379
383
|
indent: boolean;
|
|
380
|
-
logLevel: "
|
|
384
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
381
385
|
} & {
|
|
382
386
|
tag?: string | undefined;
|
|
383
387
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
384
388
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
385
389
|
infoAdvanced: (options: {
|
|
386
390
|
indent: boolean;
|
|
387
|
-
logLevel: "
|
|
391
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
388
392
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
389
393
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
390
394
|
warnAdvanced: (options: {
|
|
391
395
|
indent: boolean;
|
|
392
|
-
logLevel: "
|
|
396
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
393
397
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
394
398
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
395
399
|
errorAdvanced: (options: {
|
|
396
400
|
indent: boolean;
|
|
397
|
-
logLevel: "
|
|
401
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
398
402
|
} & {
|
|
399
403
|
tag?: string | undefined;
|
|
400
404
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
401
405
|
};
|
|
402
|
-
getLogLevel: () => "
|
|
403
|
-
setLogLevel: (newLogLevel: "
|
|
406
|
+
getLogLevel: () => "verbose" | "info" | "warn" | "error";
|
|
407
|
+
setLogLevel: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
|
|
404
408
|
INDENT_TOKEN: string;
|
|
405
409
|
isColorSupported: () => boolean;
|
|
406
410
|
HeadlessBrowser: typeof HeadlessBrowser;
|
|
@@ -409,7 +413,7 @@ export declare const RenderInternals: {
|
|
|
409
413
|
port: number | null;
|
|
410
414
|
remotionRoot: string;
|
|
411
415
|
concurrency: number;
|
|
412
|
-
logLevel: "
|
|
416
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
413
417
|
indent: boolean;
|
|
414
418
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
415
419
|
}) => Promise<import("./prepare-server").RemotionServer>;
|
|
@@ -418,7 +422,7 @@ export declare const RenderInternals: {
|
|
|
418
422
|
port: number | null;
|
|
419
423
|
remotionRoot: string;
|
|
420
424
|
concurrency: number;
|
|
421
|
-
logLevel: "
|
|
425
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
422
426
|
indent: boolean;
|
|
423
427
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
424
428
|
}, { onDownload, onError, }: {
|
|
@@ -434,7 +438,7 @@ export declare const RenderInternals: {
|
|
|
434
438
|
frame: number;
|
|
435
439
|
serializedInputPropsWithCustomSchema: string;
|
|
436
440
|
serializedResolvedPropsWithCustomSchema: string;
|
|
437
|
-
imageFormat: "
|
|
441
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
438
442
|
jpegQuality: number;
|
|
439
443
|
puppeteerInstance: HeadlessBrowser | null;
|
|
440
444
|
envVariables: Record<string, string>;
|
|
@@ -448,7 +452,7 @@ export declare const RenderInternals: {
|
|
|
448
452
|
cancelSignal: import("./make-cancel-signal").CancelSignal | null;
|
|
449
453
|
indent: boolean;
|
|
450
454
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
451
|
-
logLevel: "
|
|
455
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
452
456
|
serveUrl: string;
|
|
453
457
|
port: number | null;
|
|
454
458
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
@@ -469,7 +473,7 @@ export declare const RenderInternals: {
|
|
|
469
473
|
viewport: import("./browser/PuppeteerViewport").Viewport | null;
|
|
470
474
|
indent: boolean;
|
|
471
475
|
browser: "chrome";
|
|
472
|
-
logLevel: "
|
|
476
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
473
477
|
}) => Promise<HeadlessBrowser>;
|
|
474
478
|
internalSelectComposition: (options: {
|
|
475
479
|
serializedInputPropsWithCustomSchema: string;
|
|
@@ -482,7 +486,7 @@ export declare const RenderInternals: {
|
|
|
482
486
|
port: number | null;
|
|
483
487
|
indent: boolean;
|
|
484
488
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
485
|
-
logLevel: "
|
|
489
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
486
490
|
serveUrl: string;
|
|
487
491
|
id: string;
|
|
488
492
|
} & import("./options/option").ToOptions<readonly [{
|
|
@@ -507,7 +511,7 @@ export declare const RenderInternals: {
|
|
|
507
511
|
port: number | null;
|
|
508
512
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
509
513
|
indent: boolean;
|
|
510
|
-
logLevel: "
|
|
514
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
511
515
|
serveUrlOrWebpackUrl: string;
|
|
512
516
|
} & import("./options/option").ToOptions<readonly [{
|
|
513
517
|
name: string;
|
|
@@ -523,6 +527,15 @@ export declare const RenderInternals: {
|
|
|
523
527
|
slowestFrames: import("./render-media").SlowFrame[];
|
|
524
528
|
}>;
|
|
525
529
|
validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
526
|
-
copyImageToClipboard: (src: string, logLevel: "
|
|
530
|
+
copyImageToClipboard: (src: string, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
|
|
527
531
|
isIpV6Supported: () => boolean;
|
|
532
|
+
getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, }: {
|
|
533
|
+
browserExecutable: import("./browser-executable").BrowserExecutable;
|
|
534
|
+
indent: boolean;
|
|
535
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
536
|
+
chromiumOptions: import("./open-browser").ChromiumOptions;
|
|
537
|
+
}) => Promise<{
|
|
538
|
+
feature: string;
|
|
539
|
+
status: string;
|
|
540
|
+
}[]>;
|
|
528
541
|
};
|
package/dist/index.js
CHANGED
|
@@ -78,6 +78,7 @@ const render_still_1 = require("./render-still");
|
|
|
78
78
|
const select_composition_1 = require("./select-composition");
|
|
79
79
|
const is_path_inside_1 = require("./serve-handler/is-path-inside");
|
|
80
80
|
const serve_static_1 = require("./serve-static");
|
|
81
|
+
const test_gpu_1 = require("./test-gpu");
|
|
81
82
|
const tmp_dir_1 = require("./tmp-dir");
|
|
82
83
|
const validate_concurrency_1 = require("./validate-concurrency");
|
|
83
84
|
const validate_even_dimensions_with_codec_1 = require("./validate-even-dimensions-with-codec");
|
|
@@ -193,6 +194,7 @@ exports.RenderInternals = {
|
|
|
193
194
|
validOpenGlRenderers: gl_1.validOpenGlRenderers,
|
|
194
195
|
copyImageToClipboard: copy_to_clipboard_1.copyImageToClipboard,
|
|
195
196
|
isIpV6Supported: is_ipv6_supported_1.isIpV6Supported,
|
|
197
|
+
getChromiumGpuInformation: test_gpu_1.getChromiumGpuInformation,
|
|
196
198
|
};
|
|
197
199
|
// Warn of potential performance issues with Apple Silicon (M1 chip under Rosetta)
|
|
198
200
|
(0, check_apple_silicon_1.checkNodeVersionAndWarnAboutRosetta)();
|
package/dist/is-audio-codec.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Codec } from './codec';
|
|
2
|
-
export declare const isAudioCodec: (codec: Codec | undefined) => boolean;
|
|
2
|
+
export declare const isAudioCodec: (codec: Codec | undefined | null) => boolean;
|
package/dist/logger.d.ts
CHANGED
|
@@ -19,6 +19,6 @@ export declare const Log: {
|
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
errorAdvanced: (options: VerboseLogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
21
21
|
};
|
|
22
|
-
export declare const getLogLevel: () => "
|
|
22
|
+
export declare const getLogLevel: () => "verbose" | "info" | "warn" | "error";
|
|
23
23
|
export declare const setLogLevel: (newLogLevel: LogLevel) => void;
|
|
24
24
|
export {};
|
|
@@ -88,7 +88,7 @@ const startOffthreadVideoServer = ({ downloadMap, concurrency, logLevel, indent,
|
|
|
88
88
|
closed = true;
|
|
89
89
|
});
|
|
90
90
|
let extractStart = Date.now();
|
|
91
|
-
(0, download_and_map_assets_to_file_1.downloadAsset)({ src, downloadMap })
|
|
91
|
+
(0, download_and_map_assets_to_file_1.downloadAsset)({ src, downloadMap, indent, logLevel })
|
|
92
92
|
.then((to) => {
|
|
93
93
|
return new Promise((resolve, reject) => {
|
|
94
94
|
if (closed) {
|
package/dist/open-browser.js
CHANGED
|
@@ -13,7 +13,7 @@ const getOpenGlRenderer = (option) => {
|
|
|
13
13
|
return [`--use-gl=angle`, `--use-angle=swiftshader`];
|
|
14
14
|
}
|
|
15
15
|
if (renderer === 'angle-egl') {
|
|
16
|
-
return [`--use-gl=angle`, `--use-angle=egl`];
|
|
16
|
+
return [`--use-gl=angle`, `--use-angle=gl-egl`];
|
|
17
17
|
}
|
|
18
18
|
if (renderer === 'vulkan') {
|
|
19
19
|
return [
|
|
@@ -45,7 +45,11 @@ const internalOpenBrowser = async ({ browser, browserExecutable, chromiumOptions
|
|
|
45
45
|
if (browser === 'firefox') {
|
|
46
46
|
throw new TypeError('Firefox supported is not yet turned on. Stay tuned for the future.');
|
|
47
47
|
}
|
|
48
|
-
await (0, get_local_browser_executable_1.ensureLocalBrowser)(
|
|
48
|
+
await (0, get_local_browser_executable_1.ensureLocalBrowser)({
|
|
49
|
+
preferredBrowserExecutable: browserExecutable,
|
|
50
|
+
logLevel,
|
|
51
|
+
indent,
|
|
52
|
+
});
|
|
49
53
|
const executablePath = (0, get_local_browser_executable_1.getLocalBrowserExecutable)(browserExecutable);
|
|
50
54
|
const customGlRenderer = getOpenGlRenderer((_a = chromiumOptions.gl) !== null && _a !== void 0 ? _a : null);
|
|
51
55
|
const browserInstance = await node_1.puppeteer.launch({
|
package/dist/options/gl.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const glOption: {
|
|
|
4
4
|
cliFlag: string;
|
|
5
5
|
docLink: string;
|
|
6
6
|
name: string;
|
|
7
|
-
type: "
|
|
7
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
8
8
|
ssrName: string;
|
|
9
9
|
description: () => JSX.Element;
|
|
10
10
|
};
|
package/dist/options/index.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ export declare const allOptions: {
|
|
|
116
116
|
cliFlag: string;
|
|
117
117
|
docLink: string;
|
|
118
118
|
name: string;
|
|
119
|
-
type: "
|
|
119
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
120
120
|
ssrName: string;
|
|
121
121
|
description: () => JSX.Element;
|
|
122
122
|
};
|
package/dist/render-frames.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export type InternalRenderFramesOptions = {
|
|
|
41
41
|
logLevel: LogLevel;
|
|
42
42
|
serializedInputPropsWithCustomSchema: string;
|
|
43
43
|
serializedResolvedPropsWithCustomSchema: string;
|
|
44
|
+
parallelEncodingEnabled: boolean;
|
|
44
45
|
} & ToOptions<typeof optionsMap.renderFrames>;
|
|
45
46
|
export type RenderFramesOptions = {
|
|
46
47
|
onStart: (data: OnStartData) => void;
|
package/dist/render-frames.js
CHANGED
|
@@ -37,7 +37,7 @@ const validate_1 = require("./validate");
|
|
|
37
37
|
const validate_scale_1 = require("./validate-scale");
|
|
38
38
|
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
39
39
|
const MAX_RETRIES_PER_FRAME = 1;
|
|
40
|
-
const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, jpegQuality, imageFormat, frameRange, onError, envVariables, onBrowserLog, onFrameBuffer, onDownload, pagesArray, serveUrl, composition, timeoutInMilliseconds, scale, actualConcurrency, everyNthFrame, proxyPort, cancelSignal, downloadMap, muted, makeBrowser, browserReplacer, compositor, sourcemapContext, logLevel, indent, }) => {
|
|
40
|
+
const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, jpegQuality, imageFormat, frameRange, onError, envVariables, onBrowserLog, onFrameBuffer, onDownload, pagesArray, serveUrl, composition, timeoutInMilliseconds, scale, actualConcurrency, everyNthFrame, proxyPort, cancelSignal, downloadMap, muted, makeBrowser, browserReplacer, compositor, sourcemapContext, logLevel, indent, parallelEncodingEnabled, }) => {
|
|
41
41
|
if (outputDir) {
|
|
42
42
|
if (!node_fs_1.default.existsSync(outputDir)) {
|
|
43
43
|
node_fs_1.default.mkdirSync(outputDir, {
|
|
@@ -86,7 +86,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
86
86
|
});
|
|
87
87
|
await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
|
|
88
88
|
// eslint-disable-next-line max-params
|
|
89
|
-
pageFunction: (id, props, durationInFrames, fps, height, width) => {
|
|
89
|
+
pageFunction: (id, props, durationInFrames, fps, height, width, defaultCodec) => {
|
|
90
90
|
window.remotion_setBundleMode({
|
|
91
91
|
type: 'composition',
|
|
92
92
|
compositionName: id,
|
|
@@ -95,6 +95,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
95
95
|
compositionFps: fps,
|
|
96
96
|
compositionHeight: height,
|
|
97
97
|
compositionWidth: width,
|
|
98
|
+
compositionDefaultCodec: defaultCodec,
|
|
98
99
|
});
|
|
99
100
|
},
|
|
100
101
|
args: [
|
|
@@ -104,6 +105,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
104
105
|
composition.fps,
|
|
105
106
|
composition.height,
|
|
106
107
|
composition.width,
|
|
108
|
+
composition.defaultCodec,
|
|
107
109
|
],
|
|
108
110
|
frame: null,
|
|
109
111
|
page,
|
|
@@ -131,6 +133,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
131
133
|
const poolPromise = getPool(sourcemapContext);
|
|
132
134
|
onStart === null || onStart === void 0 ? void 0 : onStart({
|
|
133
135
|
frameCount: framesToRender.length,
|
|
136
|
+
parallelEncoding: parallelEncodingEnabled,
|
|
134
137
|
});
|
|
135
138
|
const assets = new Array(framesToRender.length).fill(undefined);
|
|
136
139
|
let stopped = false;
|
|
@@ -206,6 +209,8 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
206
209
|
renderAsset,
|
|
207
210
|
onDownload,
|
|
208
211
|
downloadMap,
|
|
212
|
+
indent,
|
|
213
|
+
logLevel,
|
|
209
214
|
}).catch((err) => {
|
|
210
215
|
onError(new Error(`Error while downloading asset: ${err.stack}`));
|
|
211
216
|
});
|
|
@@ -301,7 +306,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
301
306
|
await Promise.all(downloadPromises);
|
|
302
307
|
return result;
|
|
303
308
|
};
|
|
304
|
-
const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOptions, composition, concurrency, envVariables, everyNthFrame, frameRange, imageFormat, indent, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, onFrameUpdate, onStart, outputDir, port, puppeteerInstance, scale, server, timeoutInMilliseconds, logLevel, webpackBundleOrServeUrl, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, }) => {
|
|
309
|
+
const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOptions, composition, concurrency, envVariables, everyNthFrame, frameRange, imageFormat, indent, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, onFrameUpdate, onStart, outputDir, port, puppeteerInstance, scale, server, timeoutInMilliseconds, logLevel, webpackBundleOrServeUrl, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, parallelEncodingEnabled, }) => {
|
|
305
310
|
(0, validate_1.validateDimension)(composition.height, 'height', 'in the `config` object passed to `renderFrames()`');
|
|
306
311
|
(0, validate_1.validateDimension)(composition.width, 'width', 'in the `config` object passed to `renderFrames()`');
|
|
307
312
|
(0, validate_1.validateFps)(composition.fps, 'in the `config` object of `renderFrames()`', false);
|
|
@@ -385,6 +390,7 @@ const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOpti
|
|
|
385
390
|
indent,
|
|
386
391
|
serializedInputPropsWithCustomSchema,
|
|
387
392
|
serializedResolvedPropsWithCustomSchema,
|
|
393
|
+
parallelEncodingEnabled,
|
|
388
394
|
});
|
|
389
395
|
}),
|
|
390
396
|
])
|
|
@@ -475,6 +481,7 @@ const renderFrames = (options) => {
|
|
|
475
481
|
webpackBundleOrServeUrl: serveUrl,
|
|
476
482
|
server: undefined,
|
|
477
483
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
|
|
484
|
+
parallelEncodingEnabled: false,
|
|
478
485
|
});
|
|
479
486
|
};
|
|
480
487
|
exports.renderFrames = renderFrames;
|
package/dist/render-media.js
CHANGED
|
@@ -150,14 +150,15 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
150
150
|
});
|
|
151
151
|
const realFrameRange = (0, get_frame_to_render_1.getRealFrameRange)(composition.durationInFrames, frameRange);
|
|
152
152
|
const callUpdate = () => {
|
|
153
|
+
const encoded = Math.round(0.8 * encodedFrames + 0.2 * muxedFrames);
|
|
153
154
|
onProgress === null || onProgress === void 0 ? void 0 : onProgress({
|
|
154
155
|
encodedDoneIn,
|
|
155
|
-
encodedFrames:
|
|
156
|
+
encodedFrames: encoded,
|
|
156
157
|
renderedDoneIn,
|
|
157
158
|
renderedFrames,
|
|
158
159
|
stitchStage,
|
|
159
|
-
progress: Math.round((70 * renderedFrames +
|
|
160
|
-
|
|
160
|
+
progress: Math.round((70 * renderedFrames + 30 * encoded) / totalFramesToRender) /
|
|
161
|
+
100,
|
|
161
162
|
});
|
|
162
163
|
};
|
|
163
164
|
const cancelRenderFrames = (0, make_cancel_signal_1.makeCancelSignal)();
|
|
@@ -311,6 +312,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
311
312
|
server,
|
|
312
313
|
serializedResolvedPropsWithCustomSchema,
|
|
313
314
|
offthreadVideoCacheSizeInBytes,
|
|
315
|
+
parallelEncodingEnabled: parallelEncoding,
|
|
314
316
|
});
|
|
315
317
|
return renderFramesProc;
|
|
316
318
|
})
|
package/dist/render-still.js
CHANGED
|
@@ -151,7 +151,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
151
151
|
});
|
|
152
152
|
await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
|
|
153
153
|
// eslint-disable-next-line max-params
|
|
154
|
-
pageFunction: (id, props, durationInFrames, fps, height, width) => {
|
|
154
|
+
pageFunction: (id, props, durationInFrames, fps, height, width, defaultCodec) => {
|
|
155
155
|
window.remotion_setBundleMode({
|
|
156
156
|
type: 'composition',
|
|
157
157
|
compositionName: id,
|
|
@@ -160,6 +160,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
160
160
|
compositionFps: fps,
|
|
161
161
|
compositionHeight: height,
|
|
162
162
|
compositionWidth: width,
|
|
163
|
+
compositionDefaultCodec: defaultCodec,
|
|
163
164
|
});
|
|
164
165
|
},
|
|
165
166
|
args: [
|
|
@@ -169,6 +170,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
169
170
|
composition.fps,
|
|
170
171
|
composition.height,
|
|
171
172
|
composition.width,
|
|
173
|
+
composition.defaultCodec,
|
|
172
174
|
],
|
|
173
175
|
frame: null,
|
|
174
176
|
page,
|
|
@@ -69,7 +69,7 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
|
|
|
69
69
|
logLevel,
|
|
70
70
|
}, `calculateMetadata() took ${Date.now() - time}ms`);
|
|
71
71
|
const res = result;
|
|
72
|
-
const { width, durationInFrames, fps, height } = res;
|
|
72
|
+
const { width, durationInFrames, fps, height, defaultCodec } = res;
|
|
73
73
|
return {
|
|
74
74
|
metadata: {
|
|
75
75
|
id,
|
|
@@ -79,6 +79,7 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
|
|
|
79
79
|
durationInFrames,
|
|
80
80
|
props: remotion_1.Internals.deserializeJSONWithCustomFields(res.serializedResolvedPropsWithCustomSchema),
|
|
81
81
|
defaultProps: remotion_1.Internals.deserializeJSONWithCustomFields(res.serializedDefaultPropsWithCustomSchema),
|
|
82
|
+
defaultCodec,
|
|
82
83
|
},
|
|
83
84
|
propsSize: size,
|
|
84
85
|
};
|
|
@@ -65,6 +65,8 @@ const getAssetsData = async ({ assets, onDownload, fps, expectedFrames, logLevel
|
|
|
65
65
|
assets,
|
|
66
66
|
onDownload: onDownload !== null && onDownload !== void 0 ? onDownload : (() => () => undefined),
|
|
67
67
|
downloadMap,
|
|
68
|
+
indent,
|
|
69
|
+
logLevel,
|
|
68
70
|
});
|
|
69
71
|
(0, download_and_map_assets_to_file_1.markAllAssetsAsDownloaded)(downloadMap);
|
|
70
72
|
const assetPositions = (0, calculate_asset_positions_1.calculateAssetPositions)(fileUrlAssets);
|
|
@@ -167,9 +169,8 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
167
169
|
});
|
|
168
170
|
(0, pixel_format_1.validateSelectedPixelFormatAndCodecCombination)(pixelFormat, codec);
|
|
169
171
|
const expectedFrames = assetsInfo.assets.length;
|
|
170
|
-
const updateProgress = (
|
|
171
|
-
|
|
172
|
-
onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.round(totalFrameProgress));
|
|
172
|
+
const updateProgress = (muxProgress) => {
|
|
173
|
+
onProgress === null || onProgress === void 0 ? void 0 : onProgress(muxProgress);
|
|
173
174
|
};
|
|
174
175
|
const audio = shouldRenderAudio
|
|
175
176
|
? await getAssetsData({
|
|
@@ -178,7 +179,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
178
179
|
fps,
|
|
179
180
|
expectedFrames,
|
|
180
181
|
logLevel,
|
|
181
|
-
onProgress: (
|
|
182
|
+
onProgress: () => updateProgress(0),
|
|
182
183
|
downloadMap: assetsInfo.downloadMap,
|
|
183
184
|
remotionRoot,
|
|
184
185
|
indent,
|
|
@@ -306,7 +307,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
306
307
|
isFinished = true;
|
|
307
308
|
}
|
|
308
309
|
}
|
|
309
|
-
updateProgress(
|
|
310
|
+
updateProgress(parsed);
|
|
310
311
|
}
|
|
311
312
|
}
|
|
312
313
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BrowserExecutable } from './browser-executable';
|
|
2
|
+
import type { LogLevel } from './log-level';
|
|
3
|
+
import type { ChromiumOptions } from './open-browser';
|
|
4
|
+
type Item = {
|
|
5
|
+
feature: string;
|
|
6
|
+
status: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, }: {
|
|
9
|
+
browserExecutable: BrowserExecutable;
|
|
10
|
+
indent: boolean;
|
|
11
|
+
logLevel: LogLevel;
|
|
12
|
+
chromiumOptions: ChromiumOptions;
|
|
13
|
+
}) => Promise<Item[]>;
|
|
14
|
+
export {};
|
package/dist/test-gpu.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getChromiumGpuInformation = void 0;
|
|
4
|
+
const get_browser_instance_1 = require("./get-browser-instance");
|
|
5
|
+
const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
6
|
+
const getChromiumGpuInformation = async ({ browserExecutable, indent, logLevel, chromiumOptions, }) => {
|
|
7
|
+
const { page, cleanup } = await (0, get_browser_instance_1.getPageAndCleanupFn)({
|
|
8
|
+
passedInInstance: undefined,
|
|
9
|
+
browserExecutable,
|
|
10
|
+
chromiumOptions,
|
|
11
|
+
context: null,
|
|
12
|
+
forceDeviceScaleFactor: undefined,
|
|
13
|
+
indent,
|
|
14
|
+
logLevel,
|
|
15
|
+
});
|
|
16
|
+
await page.goto({ url: 'chrome://gpu', timeout: 12000 });
|
|
17
|
+
const { value } = await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
|
|
18
|
+
pageFunction: () => {
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
const statuses = [];
|
|
21
|
+
const items = (_c = (_b = (_a = document
|
|
22
|
+
.querySelector('info-view')) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('ul')) === null || _c === void 0 ? void 0 : _c.querySelectorAll('li');
|
|
23
|
+
[].forEach.call(items, (item) => {
|
|
24
|
+
// do whatever
|
|
25
|
+
const [feature, status] = item.innerText.split(': ');
|
|
26
|
+
statuses.push({
|
|
27
|
+
feature,
|
|
28
|
+
status,
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
return statuses;
|
|
32
|
+
},
|
|
33
|
+
frame: null,
|
|
34
|
+
args: [],
|
|
35
|
+
page,
|
|
36
|
+
});
|
|
37
|
+
cleanup();
|
|
38
|
+
return value;
|
|
39
|
+
};
|
|
40
|
+
exports.getChromiumGpuInformation = getChromiumGpuInformation;
|
package/dist/types.d.ts
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan"];
|
|
2
|
+
export type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
|
|
3
|
+
export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
|
|
4
|
+
export declare const validateOpenGlRenderer: (option: OpenGlRenderer | null) => OpenGlRenderer | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateOpenGlRenderer = exports.DEFAULT_OPENGL_RENDERER = exports.validOpenGlRenderers = void 0;
|
|
4
|
+
exports.validOpenGlRenderers = [
|
|
5
|
+
'swangle',
|
|
6
|
+
'angle',
|
|
7
|
+
'egl',
|
|
8
|
+
'swiftshader',
|
|
9
|
+
'vulkan',
|
|
10
|
+
];
|
|
11
|
+
exports.DEFAULT_OPENGL_RENDERER = null;
|
|
12
|
+
const validateOpenGlRenderer = (option) => {
|
|
13
|
+
if (option === null) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
if (!exports.validOpenGlRenderers.includes(option)) {
|
|
17
|
+
throw new TypeError(`${option} is not a valid GL backend. Accepted values: ${exports.validOpenGlRenderers.join(', ')}`);
|
|
18
|
+
}
|
|
19
|
+
return option;
|
|
20
|
+
};
|
|
21
|
+
exports.validateOpenGlRenderer = validateOpenGlRenderer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.53",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.7.0",
|
|
21
|
-
"remotion": "4.0.
|
|
21
|
+
"remotion": "4.0.53"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/node": "18.14.6",
|
|
32
32
|
"@types/progress": "2.0.5",
|
|
33
33
|
"@types/react": "18.0.26",
|
|
34
|
-
"@types/react-dom": "18.0.
|
|
34
|
+
"@types/react-dom": "18.0.11",
|
|
35
35
|
"eslint": "8.42.0",
|
|
36
36
|
"prettier": "3.0.2",
|
|
37
37
|
"prettier-plugin-organize-imports": "^3.2.2",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"vitest": "0.31.1"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
44
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
45
|
-
"@remotion/compositor-linux-
|
|
46
|
-
"@remotion/compositor-
|
|
47
|
-
"@remotion/compositor-linux-
|
|
48
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
49
|
-
"@remotion/compositor-
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.53",
|
|
44
|
+
"@remotion/compositor-darwin-x64": "4.0.53",
|
|
45
|
+
"@remotion/compositor-linux-x64-musl": "4.0.53",
|
|
46
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.53",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.53",
|
|
48
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.53",
|
|
49
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.53"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|