@remotion/renderer 3.3.32 → 3.3.33
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/extract-frame-from-video.d.ts +1 -0
- package/dist/get-extension-from-codec.d.ts +1 -1
- package/dist/get-frame-of-video-slow.d.ts +2 -4
- package/dist/get-port.d.ts +4 -1
- package/dist/get-port.js +8 -8
- package/dist/guess-extension-for-media.d.ts +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/last-frame-from-video-cache.d.ts +1 -0
- package/dist/lock-port-selection.d.ts +2 -0
- package/dist/lock-port-selection.js +11 -0
- package/dist/locks.d.ts +7 -0
- package/dist/locks.js +44 -0
- package/dist/provide-screenshot.d.ts +1 -0
- package/dist/puppeteer-screenshot.d.ts +1 -0
- package/dist/render-media.d.ts +1 -0
- package/dist/screenshot-dom-element.d.ts +1 -0
- package/dist/screenshot-task.d.ts +1 -0
- package/dist/serve-static.js +4 -1
- package/dist/take-frame-and-compose.d.ts +1 -0
- package/dist/try-to-extract-frame-of-video-fast.d.ts +1 -0
- package/dist/wait-for-symbolication-error-to-be-done.js +5 -31
- package/package.json +10 -10
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Codec } from './codec';
|
|
2
|
-
export declare const getFileExtensionFromCodec: (codec: Codec, type: 'chunk' | 'final') => "mp3" | "aac" | "wav" | "gif" | "
|
|
2
|
+
export declare const getFileExtensionFromCodec: (codec: Codec, type: 'chunk' | 'final') => "mp3" | "aac" | "wav" | "gif" | "webm" | "mp4" | "mov" | "mkv";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { OffthreadVideoImageFormat } from 'remotion';
|
|
2
3
|
import type { SpecialVCodecForTransparency } from './assets/download-map';
|
|
3
4
|
import type { FfmpegExecutable } from './ffmpeg-executable';
|
|
@@ -7,10 +8,7 @@ export declare const getFrameOfVideoSlow: ({ src, duration, ffmpegExecutable, im
|
|
|
7
8
|
duration: number;
|
|
8
9
|
imageFormat: OffthreadVideoImageFormat;
|
|
9
10
|
specialVCodecForTransparency: SpecialVCodecForTransparency;
|
|
10
|
-
needsResize: [
|
|
11
|
-
number,
|
|
12
|
-
number
|
|
13
|
-
] | null;
|
|
11
|
+
needsResize: [number, number] | null;
|
|
14
12
|
offset: number;
|
|
15
13
|
fps: number | null;
|
|
16
14
|
remotionRoot: string;
|
package/dist/get-port.d.ts
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export declare const getDesiredPort: (desiredPort: number | undefined, from: number, to: number) => Promise<
|
|
1
|
+
export declare const getDesiredPort: (desiredPort: number | undefined, from: number, to: number) => Promise<{
|
|
2
|
+
port: number;
|
|
3
|
+
didUsePort: () => void;
|
|
4
|
+
}>;
|
package/dist/get-port.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getDesiredPort = void 0;
|
|
7
7
|
const net_1 = __importDefault(require("net"));
|
|
8
|
-
const
|
|
8
|
+
const locks_1 = require("./locks");
|
|
9
9
|
const getAvailablePort = (portToTry) => new Promise((resolve) => {
|
|
10
10
|
let status = 'unavailable';
|
|
11
11
|
const host = '127.0.0.1';
|
|
@@ -35,21 +35,21 @@ const getPort = async (from, to) => {
|
|
|
35
35
|
}
|
|
36
36
|
throw new Error('No available ports found');
|
|
37
37
|
};
|
|
38
|
-
const
|
|
38
|
+
const portLocks = (0, locks_1.createLock)({ timeout: 10000 });
|
|
39
|
+
const getDesiredPort = async (desiredPort, from, to) => {
|
|
40
|
+
await portLocks.waitForAllToBeDone();
|
|
41
|
+
const lockPortSelection = portLocks.lock();
|
|
42
|
+
const didUsePort = () => portLocks.unlock(lockPortSelection);
|
|
39
43
|
if (typeof desiredPort !== 'undefined' &&
|
|
40
44
|
(await getAvailablePort(desiredPort)) === 'available') {
|
|
41
|
-
return desiredPort;
|
|
45
|
+
return { port: desiredPort, didUsePort };
|
|
42
46
|
}
|
|
43
47
|
const actualPort = await getPort(from, to);
|
|
44
48
|
// If did specify a port but did not get that one, fail hard.
|
|
45
49
|
if (desiredPort && desiredPort !== actualPort) {
|
|
46
50
|
throw new Error(`You specified port ${desiredPort} to be used for the HTTP server, but it is not available. Choose a different port or remove the setting to let Remotion automatically select a free port.`);
|
|
47
51
|
}
|
|
48
|
-
return actualPort;
|
|
49
|
-
};
|
|
50
|
-
const limit = (0, p_limit_1.pLimit)(1);
|
|
51
|
-
const getDesiredPort = (desiredPort, from, to) => {
|
|
52
|
-
return limit(() => getDesiredPortUnlimited(desiredPort, from, to));
|
|
52
|
+
return { port: actualPort, didUsePort };
|
|
53
53
|
};
|
|
54
54
|
exports.getDesiredPort = getDesiredPort;
|
|
55
55
|
const makeRange = (from, to) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export declare const RenderInternals: {
|
|
|
60
60
|
scale: number;
|
|
61
61
|
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
62
62
|
}) => void;
|
|
63
|
-
getFileExtensionFromCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif", type: "chunk" | "final") => "mp3" | "aac" | "wav" | "gif" | "
|
|
63
|
+
getFileExtensionFromCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif", type: "chunk" | "final") => "mp3" | "aac" | "wav" | "gif" | "webm" | "mp4" | "mov" | "mkv";
|
|
64
64
|
tmpDir: (str: string) => string;
|
|
65
65
|
deleteDirectory: (directory: string) => Promise<void>;
|
|
66
66
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -85,7 +85,10 @@ export declare const RenderInternals: {
|
|
|
85
85
|
SymbolicateableError: typeof SymbolicateableError;
|
|
86
86
|
getFramesToRender: (frameRange: [number, number], everyNthFrame: number) => number[];
|
|
87
87
|
getExtensionOfFilename: (filename: string | null) => string | null;
|
|
88
|
-
getDesiredPort: (desiredPort: number | undefined, from: number, to: number) => Promise<
|
|
88
|
+
getDesiredPort: (desiredPort: number | undefined, from: number, to: number) => Promise<{
|
|
89
|
+
port: number;
|
|
90
|
+
didUsePort: () => void;
|
|
91
|
+
}>;
|
|
89
92
|
isPathInside: (thePath: string, potentialParent: string) => boolean;
|
|
90
93
|
execa: {
|
|
91
94
|
(file: string, arguments?: readonly string[] | undefined, options?: execa.Options<string> | undefined): execa.ExecaChildProcess<string>;
|
|
@@ -114,8 +117,8 @@ export declare const RenderInternals: {
|
|
|
114
117
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
115
118
|
DEFAULT_BROWSER: import("./browser").Browser;
|
|
116
119
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
117
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
118
|
-
validateOpenGlRenderer: (option: "
|
|
120
|
+
DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | null;
|
|
121
|
+
validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | null) => "angle" | "swangle" | "egl" | "swiftshader" | null;
|
|
119
122
|
validImageFormats: readonly ["png", "jpeg", "none"];
|
|
120
123
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
121
124
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
@@ -125,7 +128,7 @@ export declare const RenderInternals: {
|
|
|
125
128
|
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
126
129
|
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
127
130
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
128
|
-
isEqualOrBelowLogLevel: (currentLevel: "
|
|
131
|
+
isEqualOrBelowLogLevel: (currentLevel: "error" | "verbose" | "info" | "warn", level: "error" | "verbose" | "info" | "warn") => boolean;
|
|
129
132
|
isValidLogLevel: (level: string) => boolean;
|
|
130
133
|
perf: typeof perf;
|
|
131
134
|
makeDownloadMap: () => import("./assets/download-map").DownloadMap;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unlockPortSelection = exports.lockPortSelection = void 0;
|
|
4
|
+
const locks = [];
|
|
5
|
+
const waitForPortSelection = () => { };
|
|
6
|
+
const lockPortSelection = () => {
|
|
7
|
+
locks.push();
|
|
8
|
+
};
|
|
9
|
+
exports.lockPortSelection = lockPortSelection;
|
|
10
|
+
const unlockPortSelection = () => { };
|
|
11
|
+
exports.unlockPortSelection = unlockPortSelection;
|
package/dist/locks.d.ts
ADDED
package/dist/locks.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createLock = void 0;
|
|
4
|
+
const createLock = ({ timeout }) => {
|
|
5
|
+
let locks = [];
|
|
6
|
+
const waiters = [];
|
|
7
|
+
const lock = () => {
|
|
8
|
+
const id = Math.random();
|
|
9
|
+
locks.push(id);
|
|
10
|
+
return id;
|
|
11
|
+
};
|
|
12
|
+
const unlock = (id) => {
|
|
13
|
+
locks = locks.filter((l) => l !== id);
|
|
14
|
+
resolveWaiters();
|
|
15
|
+
};
|
|
16
|
+
const resolveWaiters = () => {
|
|
17
|
+
if (locks.length === 0) {
|
|
18
|
+
waiters.forEach((w) => w());
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const waitForAllToBeDone = () => {
|
|
22
|
+
const success = new Promise((resolve) => {
|
|
23
|
+
waiters.push(() => {
|
|
24
|
+
resolve();
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
resolveWaiters();
|
|
28
|
+
if (timeout === null) {
|
|
29
|
+
return success;
|
|
30
|
+
}
|
|
31
|
+
const timeoutFn = new Promise((resolve) => {
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
return resolve();
|
|
34
|
+
}, timeout);
|
|
35
|
+
});
|
|
36
|
+
return Promise.race([success, timeoutFn]);
|
|
37
|
+
};
|
|
38
|
+
return {
|
|
39
|
+
lock,
|
|
40
|
+
unlock,
|
|
41
|
+
waitForAllToBeDone,
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
exports.createLock = createLock;
|
package/dist/render-media.d.ts
CHANGED
package/dist/serve-static.js
CHANGED
|
@@ -10,7 +10,7 @@ const offthread_video_server_1 = require("./offthread-video-server");
|
|
|
10
10
|
const serve_handler_1 = require("./serve-handler");
|
|
11
11
|
const serveStatic = async (path, options) => {
|
|
12
12
|
var _a;
|
|
13
|
-
const port = await (0, get_port_1.getDesiredPort)((_a = options === null || options === void 0 ? void 0 : options.port) !== null && _a !== void 0 ? _a : undefined, 3000, 3100);
|
|
13
|
+
const { port, didUsePort } = await (0, get_port_1.getDesiredPort)((_a = options === null || options === void 0 ? void 0 : options.port) !== null && _a !== void 0 ? _a : undefined, 3000, 3100);
|
|
14
14
|
const offthreadRequest = (0, offthread_video_server_1.startOffthreadVideoServer)({
|
|
15
15
|
ffmpegExecutable: options.ffmpegExecutable,
|
|
16
16
|
ffprobeExecutable: options.ffprobeExecutable,
|
|
@@ -47,6 +47,9 @@ const serveStatic = async (path, options) => {
|
|
|
47
47
|
delete connections[key];
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
|
+
server.on('listening', () => {
|
|
51
|
+
didUsePort();
|
|
52
|
+
});
|
|
50
53
|
const destroyConnections = function () {
|
|
51
54
|
for (const key in connections)
|
|
52
55
|
connections[key].destroy();
|
|
@@ -1,34 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.waitForSymbolicationToBeDone = exports.unlockErrorSymbolicationLock = exports.registerErrorSymbolicationLock = void 0;
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return id;
|
|
10
|
-
};
|
|
11
|
-
exports.registerErrorSymbolicationLock = registerErrorSymbolicationLock;
|
|
12
|
-
const unlockErrorSymbolicationLock = (id) => {
|
|
13
|
-
locks = locks.filter((l) => l !== id);
|
|
14
|
-
resolveWaiters();
|
|
15
|
-
};
|
|
16
|
-
exports.unlockErrorSymbolicationLock = unlockErrorSymbolicationLock;
|
|
17
|
-
const resolveWaiters = () => {
|
|
18
|
-
if (locks.length === 0) {
|
|
19
|
-
waiters.forEach((w) => w());
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
const waitForSymbolicationToBeDone = () => {
|
|
23
|
-
const success = new Promise((resolve) => {
|
|
24
|
-
waiters.push(() => {
|
|
25
|
-
resolve();
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
const timeout = new Promise((resolve) => {
|
|
29
|
-
setTimeout(() => resolve(), 5000);
|
|
30
|
-
});
|
|
31
|
-
resolveWaiters();
|
|
32
|
-
return Promise.all([success, timeout]);
|
|
33
|
-
};
|
|
34
|
-
exports.waitForSymbolicationToBeDone = waitForSymbolicationToBeDone;
|
|
4
|
+
const locks_1 = require("./locks");
|
|
5
|
+
const { lock, unlock, waitForAllToBeDone } = (0, locks_1.createLock)({ timeout: 50000 });
|
|
6
|
+
exports.registerErrorSymbolicationLock = lock;
|
|
7
|
+
exports.unlockErrorSymbolicationLock = unlock;
|
|
8
|
+
exports.waitForSymbolicationToBeDone = waitForAllToBeDone;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.33",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"execa": "5.1.1",
|
|
26
26
|
"extract-zip": "2.0.1",
|
|
27
|
-
"remotion": "3.3.
|
|
27
|
+
"remotion": "3.3.33",
|
|
28
28
|
"source-map": "^0.8.0-beta.0",
|
|
29
29
|
"ws": "8.7.0"
|
|
30
30
|
},
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"vitest": "0.24.3"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"@remotion/compositor-darwin-arm64": "3.3.
|
|
53
|
-
"@remotion/compositor-darwin-x64": "3.3.
|
|
54
|
-
"@remotion/compositor-linux-arm64-gnu": "3.3.
|
|
55
|
-
"@remotion/compositor-linux-arm64-musl": "3.3.
|
|
56
|
-
"@remotion/compositor-linux-x64-gnu": "3.3.
|
|
57
|
-
"@remotion/compositor-linux-x64-musl": "3.3.
|
|
58
|
-
"@remotion/compositor-win32-x64-msvc": "3.3.
|
|
52
|
+
"@remotion/compositor-darwin-arm64": "3.3.33",
|
|
53
|
+
"@remotion/compositor-darwin-x64": "3.3.33",
|
|
54
|
+
"@remotion/compositor-linux-arm64-gnu": "3.3.33",
|
|
55
|
+
"@remotion/compositor-linux-arm64-musl": "3.3.33",
|
|
56
|
+
"@remotion/compositor-linux-x64-gnu": "3.3.33",
|
|
57
|
+
"@remotion/compositor-linux-x64-musl": "3.3.33",
|
|
58
|
+
"@remotion/compositor-win32-x64-msvc": "3.3.33"
|
|
59
59
|
},
|
|
60
60
|
"keywords": [
|
|
61
61
|
"remotion",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "0356b9108673ac98c41990f192b101f7a6574ed0"
|
|
71
71
|
}
|