@remotion/renderer 4.0.229 → 4.0.230
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/index.d.ts
CHANGED
|
@@ -353,7 +353,7 @@ export declare const RenderInternals: {
|
|
|
353
353
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
354
354
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
355
355
|
DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
|
|
356
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
356
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
|
|
357
357
|
DEFAULT_JPEG_QUALITY: number;
|
|
358
358
|
chalk: {
|
|
359
359
|
enabled: () => boolean;
|
|
@@ -3,13 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.printUsefulErrorMessage = void 0;
|
|
4
4
|
const logger_1 = require("./logger");
|
|
5
5
|
const truthy_1 = require("./truthy");
|
|
6
|
-
|
|
6
|
+
let alreadyPrintedCache = [];
|
|
7
7
|
const printUsefulErrorMessage = (err, logLevel, indent) => {
|
|
8
8
|
var _a, _b;
|
|
9
|
-
|
|
9
|
+
const errorStack = err.stack;
|
|
10
|
+
if (errorStack && alreadyPrintedCache.includes(errorStack)) {
|
|
10
11
|
return;
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
+
if (errorStack) {
|
|
14
|
+
alreadyPrintedCache.push(errorStack);
|
|
15
|
+
alreadyPrintedCache = alreadyPrintedCache.slice(-10);
|
|
16
|
+
}
|
|
13
17
|
if (err.message.includes('Could not play video with')) {
|
|
14
18
|
logger_1.Log.info({ indent, logLevel });
|
|
15
19
|
logger_1.Log.info({ indent, logLevel }, '💡 Get help for this issue at https://remotion.dev/docs/media-playback-error');
|
|
@@ -44,8 +48,14 @@ const printUsefulErrorMessage = (err, logLevel, indent) => {
|
|
|
44
48
|
}
|
|
45
49
|
if (err.message.includes('Error creating WebGL context')) {
|
|
46
50
|
logger_1.Log.info({ indent, logLevel });
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
logger_1.Log.warn({
|
|
52
|
+
indent,
|
|
53
|
+
logLevel,
|
|
54
|
+
}, '💡 You might need to set the OpenGL renderer to "angle-egl", "angle" (or "swangle" if rendering on lambda). Learn why at https://www.remotion.dev/docs/three');
|
|
55
|
+
logger_1.Log.warn({
|
|
56
|
+
indent,
|
|
57
|
+
logLevel,
|
|
58
|
+
}, "💡 Check how it's done at https://www.remotion.dev/docs/chromium-flags#--gl");
|
|
49
59
|
}
|
|
50
60
|
if (err.message.includes('The bucket does not allow ACLs')) {
|
|
51
61
|
logger_1.Log.info({ indent, logLevel });
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/renderer",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.230",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.17.1",
|
|
21
|
-
"remotion": "4.0.
|
|
22
|
-
"@remotion/streaming": "4.0.
|
|
21
|
+
"remotion": "4.0.230",
|
|
22
|
+
"@remotion/streaming": "4.0.230"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">=16.8.0",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"react-dom": "18.3.1",
|
|
34
34
|
"@types/ws": "8.5.10",
|
|
35
35
|
"eslint": "9.14.0",
|
|
36
|
-
"@remotion/example-videos": "4.0.
|
|
37
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
36
|
+
"@remotion/example-videos": "4.0.230",
|
|
37
|
+
"@remotion/eslint-config-internal": "4.0.230"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@remotion/compositor-
|
|
41
|
-
"@remotion/compositor-
|
|
42
|
-
"@remotion/compositor-linux-arm64-
|
|
43
|
-
"@remotion/compositor-
|
|
44
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
45
|
-
"@remotion/compositor-
|
|
46
|
-
"@remotion/compositor-
|
|
40
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.230",
|
|
41
|
+
"@remotion/compositor-linux-x64-musl": "4.0.230",
|
|
42
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.230",
|
|
43
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.230",
|
|
44
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.230",
|
|
45
|
+
"@remotion/compositor-darwin-arm64": "4.0.230",
|
|
46
|
+
"@remotion/compositor-darwin-x64": "4.0.230"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"remotion",
|
package/dist/example-videos.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export declare const exampleVideos: {
|
|
2
|
-
bigBuckBunny: string;
|
|
3
|
-
transparentWebm: string;
|
|
4
|
-
framerWithoutFileExtension: string;
|
|
5
|
-
corrupted: string;
|
|
6
|
-
customDar: string;
|
|
7
|
-
screenrecording: string;
|
|
8
|
-
nofps: string;
|
|
9
|
-
variablefps: string;
|
|
10
|
-
zerotimestamp: string;
|
|
11
|
-
webcam: string;
|
|
12
|
-
iphonevideo: string;
|
|
13
|
-
av1: string;
|
|
14
|
-
framer24fps: string;
|
|
15
|
-
music: string;
|
|
16
|
-
notavideo: string;
|
|
17
|
-
notafile: string;
|
|
18
|
-
transparentwithdar: string;
|
|
19
|
-
prores: string;
|
|
20
|
-
iphonehevc: string;
|
|
21
|
-
matroskaPcm16: string;
|
|
22
|
-
mp4withmp3: string;
|
|
23
|
-
av1bbb: string;
|
|
24
|
-
av1mp4: string;
|
|
25
|
-
av1mp4WithColr: string;
|
|
26
|
-
vp8Vorbis: string;
|
|
27
|
-
vp9: string;
|
|
28
|
-
stretchedVp8: string;
|
|
29
|
-
matroskaMp3: string;
|
|
30
|
-
matroskaH265Aac: string;
|
|
31
|
-
opusWebm: string;
|
|
32
|
-
avi: string;
|
|
33
|
-
opus51Webm: string;
|
|
34
|
-
};
|
package/dist/example-videos.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.exampleVideos = void 0;
|
|
7
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
-
const examplePackage = node_path_1.default.join(__dirname, '..', '..', 'example');
|
|
9
|
-
const docsPackage = node_path_1.default.join(__dirname, '..', '..', 'docs');
|
|
10
|
-
exports.exampleVideos = {
|
|
11
|
-
bigBuckBunny: node_path_1.default.join(examplePackage, 'public/bigbuckbunny.mp4'),
|
|
12
|
-
transparentWebm: node_path_1.default.join(docsPackage, '/static/img/transparent-video.webm'),
|
|
13
|
-
framerWithoutFileExtension: node_path_1.default.join(examplePackage, 'public', 'framermp4withoutfileextension'),
|
|
14
|
-
corrupted: node_path_1.default.join(examplePackage, 'public', 'corrupted.mp4'),
|
|
15
|
-
customDar: node_path_1.default.join(examplePackage, 'public', 'custom-dar.mp4'),
|
|
16
|
-
screenrecording: node_path_1.default.join(examplePackage, 'public', 'quick.mov'),
|
|
17
|
-
nofps: node_path_1.default.join(examplePackage, 'public', 'nofps.webm'),
|
|
18
|
-
variablefps: node_path_1.default.join(examplePackage, 'public', 'variablefps.webm'),
|
|
19
|
-
zerotimestamp: node_path_1.default.join(examplePackage, 'public', 'zero-timestamp.mp4'),
|
|
20
|
-
webcam: node_path_1.default.join(examplePackage, 'public', 'webcam.webm'),
|
|
21
|
-
iphonevideo: node_path_1.default.join(examplePackage, 'public', 'iphonevideo.mov'),
|
|
22
|
-
av1: node_path_1.default.join(examplePackage, 'public', 'av1.webm'),
|
|
23
|
-
framer24fps: node_path_1.default.join(examplePackage, 'src', 'resources', 'framer-24fps.mp4'),
|
|
24
|
-
music: node_path_1.default.join(examplePackage, 'public', 'music.mp3'),
|
|
25
|
-
notavideo: node_path_1.default.join(examplePackage, 'public', 'giphy.gif'),
|
|
26
|
-
notafile: node_path_1.default.join(examplePackage, 'public', 'doesnotexist'),
|
|
27
|
-
transparentwithdar: node_path_1.default.join(examplePackage, 'public', 'transparent-with-dar.webm'),
|
|
28
|
-
prores: node_path_1.default.join(examplePackage, 'public', 'prores.mov'),
|
|
29
|
-
iphonehevc: node_path_1.default.join(examplePackage, 'public', 'iphone-hevc.mov'),
|
|
30
|
-
matroskaPcm16: node_path_1.default.join(examplePackage, 'public', 'matroska-pcm16.mkv'),
|
|
31
|
-
mp4withmp3: node_path_1.default.join(examplePackage, 'public', 'mp4-mp3.mp4'),
|
|
32
|
-
av1bbb: node_path_1.default.join(examplePackage, 'public', 'av1-bbb.webm'),
|
|
33
|
-
av1mp4: node_path_1.default.join(examplePackage, 'public', 'av1-bbb.mp4'),
|
|
34
|
-
av1mp4WithColr: node_path_1.default.join(examplePackage, 'public', 'av1.mp4'),
|
|
35
|
-
vp8Vorbis: node_path_1.default.join(examplePackage, 'public', 'vp8-vorbis.webm'),
|
|
36
|
-
vp9: node_path_1.default.join(examplePackage, 'public', 'vp9.webm'),
|
|
37
|
-
stretchedVp8: node_path_1.default.join(examplePackage, 'public', 'stretched-vp8.webm'),
|
|
38
|
-
matroskaMp3: node_path_1.default.join(examplePackage, 'public', 'matroska-mp3.mkv'),
|
|
39
|
-
matroskaH265Aac: node_path_1.default.join(examplePackage, 'public', 'matroska-h265-aac.mkv'),
|
|
40
|
-
opusWebm: node_path_1.default.join(examplePackage, 'public', 'opus.webm'),
|
|
41
|
-
avi: node_path_1.default.join(examplePackage, 'public', 'example.avi'),
|
|
42
|
-
opus51Webm: node_path_1.default.join(examplePackage, 'public', 'vp8-opus-5-1-channels.webm'),
|
|
43
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { TRenderAsset } from 'remotion/no-react';
|
|
2
|
-
import type { DownloadMap } from './assets/download-map';
|
|
3
|
-
import type { Page } from './browser/BrowserPage';
|
|
4
|
-
import type { Compositor } from './compositor/compositor';
|
|
5
|
-
import type { StillImageFormat, VideoImageFormat } from './image-format';
|
|
6
|
-
export declare const takeFrameAndCompose: ({ freePage, imageFormat, jpegQuality, frame, width, height, output, scale, downloadMap, wantsBuffer, compositor, timeoutInMilliseconds, }: {
|
|
7
|
-
freePage: Page;
|
|
8
|
-
imageFormat: VideoImageFormat | StillImageFormat;
|
|
9
|
-
jpegQuality: number | undefined;
|
|
10
|
-
frame: number;
|
|
11
|
-
height: number;
|
|
12
|
-
width: number;
|
|
13
|
-
output: string | null;
|
|
14
|
-
scale: number;
|
|
15
|
-
downloadMap: DownloadMap;
|
|
16
|
-
wantsBuffer: boolean;
|
|
17
|
-
compositor: Compositor;
|
|
18
|
-
timeoutInMilliseconds: number;
|
|
19
|
-
}) => Promise<{
|
|
20
|
-
buffer: Buffer | null;
|
|
21
|
-
collectedAssets: TRenderAsset[];
|
|
22
|
-
}>;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.takeFrameAndCompose = void 0;
|
|
7
|
-
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
-
const collect_assets_1 = require("./collect-assets");
|
|
10
|
-
const compose_1 = require("./compositor/compose");
|
|
11
|
-
const provide_screenshot_1 = require("./provide-screenshot");
|
|
12
|
-
const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
13
|
-
const truthy_1 = require("./truthy");
|
|
14
|
-
const takeFrameAndCompose = async ({ freePage, imageFormat, jpegQuality, frame, width, height, output, scale, downloadMap, wantsBuffer, compositor, timeoutInMilliseconds, }) => {
|
|
15
|
-
var _a;
|
|
16
|
-
const [{ value: clipRegion }, collectedAssets] = await Promise.all([
|
|
17
|
-
(0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
|
|
18
|
-
pageFunction: () => {
|
|
19
|
-
if (typeof window.remotion_getClipRegion === 'undefined') {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
return window.remotion_getClipRegion();
|
|
23
|
-
},
|
|
24
|
-
args: [],
|
|
25
|
-
frame,
|
|
26
|
-
page: freePage,
|
|
27
|
-
timeoutInMilliseconds,
|
|
28
|
-
}),
|
|
29
|
-
(0, collect_assets_1.collectAssets)({ frame, freePage, timeoutInMilliseconds }),
|
|
30
|
-
]);
|
|
31
|
-
if (imageFormat === 'none') {
|
|
32
|
-
return { buffer: null, collectedAssets };
|
|
33
|
-
}
|
|
34
|
-
const needsComposing = clipRegion === null
|
|
35
|
-
? null
|
|
36
|
-
: {
|
|
37
|
-
tmpFile: node_path_1.default.join(downloadMap.compositingDir, `${frame}.${imageFormat}`),
|
|
38
|
-
finalOutFile: output !== null && output !== void 0 ? output : node_path_1.default.join(downloadMap.compositingDir, `${frame}-final.${imageFormat}`),
|
|
39
|
-
clipRegion: clipRegion,
|
|
40
|
-
};
|
|
41
|
-
if (clipRegion !== 'hide') {
|
|
42
|
-
const shouldMakeBuffer = wantsBuffer && !needsComposing;
|
|
43
|
-
const buf = await (0, provide_screenshot_1.provideScreenshot)({
|
|
44
|
-
page: freePage,
|
|
45
|
-
imageFormat,
|
|
46
|
-
jpegQuality,
|
|
47
|
-
options: {
|
|
48
|
-
frame,
|
|
49
|
-
output: shouldMakeBuffer ? null : ((_a = needsComposing === null || needsComposing === void 0 ? void 0 : needsComposing.tmpFile) !== null && _a !== void 0 ? _a : output),
|
|
50
|
-
},
|
|
51
|
-
height,
|
|
52
|
-
width,
|
|
53
|
-
clipRegion,
|
|
54
|
-
timeoutInMilliseconds,
|
|
55
|
-
scale,
|
|
56
|
-
});
|
|
57
|
-
if (shouldMakeBuffer) {
|
|
58
|
-
return { buffer: buf, collectedAssets };
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (needsComposing) {
|
|
62
|
-
if (imageFormat === 'pdf') {
|
|
63
|
-
throw new Error("You cannot use Rust APIs (like <Clipper>) if `imageFormat` is 'pdf'.");
|
|
64
|
-
}
|
|
65
|
-
if (imageFormat === 'webp') {
|
|
66
|
-
throw new Error("You cannot use Rust APIs (like <Clipper>) if `imageFormat` is 'webp'.");
|
|
67
|
-
}
|
|
68
|
-
await (0, compose_1.compose)({
|
|
69
|
-
height: height * scale,
|
|
70
|
-
width: width * scale,
|
|
71
|
-
layers: [
|
|
72
|
-
needsComposing.clipRegion === 'hide'
|
|
73
|
-
? null
|
|
74
|
-
: {
|
|
75
|
-
type: imageFormat === 'jpeg'
|
|
76
|
-
? 'JpgImage'
|
|
77
|
-
: 'PngImage',
|
|
78
|
-
params: {
|
|
79
|
-
height: needsComposing.clipRegion.height * scale,
|
|
80
|
-
width: needsComposing.clipRegion.width * scale,
|
|
81
|
-
src: needsComposing.tmpFile,
|
|
82
|
-
x: needsComposing.clipRegion.x * scale,
|
|
83
|
-
y: needsComposing.clipRegion.y * scale,
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
].filter(truthy_1.truthy),
|
|
87
|
-
output: needsComposing.finalOutFile,
|
|
88
|
-
downloadMap,
|
|
89
|
-
imageFormat: imageFormat === 'jpeg' ? 'Jpeg' : 'Png',
|
|
90
|
-
compositor,
|
|
91
|
-
});
|
|
92
|
-
if (wantsBuffer) {
|
|
93
|
-
const buffer = await node_fs_1.default.promises.readFile(needsComposing.finalOutFile);
|
|
94
|
-
await node_fs_1.default.promises.unlink(needsComposing.finalOutFile);
|
|
95
|
-
return { buffer, collectedAssets };
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return { buffer: null, collectedAssets };
|
|
99
|
-
};
|
|
100
|
-
exports.takeFrameAndCompose = takeFrameAndCompose;
|