@remotion/renderer 3.3.26 → 3.3.27
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/compositor/payload.d.ts +39 -0
- package/dist/compositor/payload.js +2 -0
- 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/guess-extension-for-media.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/last-frame-from-video-cache.d.ts +1 -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/take-frame-and-compose.d.ts +1 -0
- package/dist/try-to-extract-frame-of-video-fast.d.ts +1 -0
- package/package.json +10 -10
- package/dist/compositor/compositor.d.ts +0 -9
- package/dist/compositor/compositor.js +0 -114
- package/dist/get-compositions-on-server.d.ts +0 -3
- package/dist/get-compositions-on-server.js +0 -17
- package/dist/render-on-server.d.ts +0 -3
- package/dist/render-on-server.js +0 -119
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare type Layer = {
|
|
2
|
+
type: 'PngImage';
|
|
3
|
+
params: {
|
|
4
|
+
src: string;
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
};
|
|
10
|
+
} | {
|
|
11
|
+
type: 'JpgImage';
|
|
12
|
+
params: {
|
|
13
|
+
src: string;
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
} | {
|
|
20
|
+
type: 'Solid';
|
|
21
|
+
params: {
|
|
22
|
+
fill: [number, number, number, number];
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare type CliInput = {
|
|
30
|
+
v: number;
|
|
31
|
+
output: string;
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
layers: Layer[];
|
|
35
|
+
};
|
|
36
|
+
export declare type ErrorPayload = {
|
|
37
|
+
error: string;
|
|
38
|
+
backtrace: string;
|
|
39
|
+
};
|
|
@@ -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/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ export declare const RenderInternals: {
|
|
|
61
61
|
scale: number;
|
|
62
62
|
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
63
63
|
}) => void;
|
|
64
|
-
getFileExtensionFromCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif", type: "chunk" | "final") => "mp3" | "aac" | "wav" | "gif" | "
|
|
64
|
+
getFileExtensionFromCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif", type: "chunk" | "final") => "mp3" | "aac" | "wav" | "gif" | "webm" | "mp4" | "mov" | "mkv";
|
|
65
65
|
tmpDir: (str: string) => string;
|
|
66
66
|
deleteDirectory: (directory: string) => Promise<void>;
|
|
67
67
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -115,8 +115,8 @@ export declare const RenderInternals: {
|
|
|
115
115
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
116
116
|
DEFAULT_BROWSER: import("./browser").Browser;
|
|
117
117
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
118
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
119
|
-
validateOpenGlRenderer: (option: "
|
|
118
|
+
DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | null;
|
|
119
|
+
validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | null) => "angle" | "swangle" | "egl" | "swiftshader" | null;
|
|
120
120
|
validImageFormats: readonly ["png", "jpeg", "none"];
|
|
121
121
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
122
122
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
@@ -126,7 +126,7 @@ export declare const RenderInternals: {
|
|
|
126
126
|
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
127
127
|
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
128
128
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
129
|
-
isEqualOrBelowLogLevel: (currentLevel: "
|
|
129
|
+
isEqualOrBelowLogLevel: (currentLevel: "error" | "verbose" | "info" | "warn", level: "error" | "verbose" | "info" | "warn") => boolean;
|
|
130
130
|
isValidLogLevel: (level: string) => boolean;
|
|
131
131
|
perf: typeof perf;
|
|
132
132
|
makeDownloadMap: () => import("./assets/download-map").DownloadMap;
|
package/dist/render-media.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.27",
|
|
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.27",
|
|
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.27",
|
|
53
|
+
"@remotion/compositor-darwin-x64": "3.3.27",
|
|
54
|
+
"@remotion/compositor-linux-arm64-gnu": "3.3.27",
|
|
55
|
+
"@remotion/compositor-linux-arm64-musl": "3.3.27",
|
|
56
|
+
"@remotion/compositor-linux-x64-gnu": "3.3.27",
|
|
57
|
+
"@remotion/compositor-linux-x64-musl": "3.3.27",
|
|
58
|
+
"@remotion/compositor-win32-x64-msvc": "3.3.27"
|
|
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": "5dfc0dfa0df9592a358127a9aea9219244e6807a"
|
|
71
71
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CliInput } from './payloads';
|
|
2
|
-
export declare type Compositor = {
|
|
3
|
-
finishCommands: () => void;
|
|
4
|
-
executeCommand: (payload: Omit<CliInput, 'nonce'>) => Promise<void>;
|
|
5
|
-
waitForDone: () => Promise<void>;
|
|
6
|
-
};
|
|
7
|
-
export declare const spawnCompositorOrReuse: (renderId: string) => Compositor;
|
|
8
|
-
export declare const releaseCompositorWithId: (renderId: string) => void;
|
|
9
|
-
export declare const waitForCompositorWithIdToQuit: (renderId: string) => Promise<void>;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.waitForCompositorWithIdToQuit = exports.releaseCompositorWithId = exports.spawnCompositorOrReuse = void 0;
|
|
4
|
-
const child_process_1 = require("child_process");
|
|
5
|
-
const truthy_1 = require("../truthy");
|
|
6
|
-
const get_executable_path_1 = require("./get-executable-path");
|
|
7
|
-
const compositorMap = {};
|
|
8
|
-
const spawnCompositorOrReuse = (renderId) => {
|
|
9
|
-
if (!compositorMap[renderId]) {
|
|
10
|
-
compositorMap[renderId] = startCompositor();
|
|
11
|
-
}
|
|
12
|
-
return compositorMap[renderId];
|
|
13
|
-
};
|
|
14
|
-
exports.spawnCompositorOrReuse = spawnCompositorOrReuse;
|
|
15
|
-
const releaseCompositorWithId = (renderId) => {
|
|
16
|
-
if (compositorMap[renderId]) {
|
|
17
|
-
compositorMap[renderId].finishCommands();
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
exports.releaseCompositorWithId = releaseCompositorWithId;
|
|
21
|
-
const waitForCompositorWithIdToQuit = (renderId) => {
|
|
22
|
-
if (!compositorMap[renderId]) {
|
|
23
|
-
throw new TypeError('No compositor with that id');
|
|
24
|
-
}
|
|
25
|
-
return compositorMap[renderId].waitForDone();
|
|
26
|
-
};
|
|
27
|
-
exports.waitForCompositorWithIdToQuit = waitForCompositorWithIdToQuit;
|
|
28
|
-
const startCompositor = () => {
|
|
29
|
-
const bin = (0, get_executable_path_1.getExecutablePath)();
|
|
30
|
-
const child = (0, child_process_1.spawn)(bin);
|
|
31
|
-
const _stderrChunks = [];
|
|
32
|
-
const stdoutChunks = [];
|
|
33
|
-
child.stderr.on('data', (d) => {
|
|
34
|
-
console.log(d.toString('utf-8'));
|
|
35
|
-
_stderrChunks.push(d);
|
|
36
|
-
});
|
|
37
|
-
child.stdout.on('data', (d) => {
|
|
38
|
-
console.log(d.toString('utf-8'));
|
|
39
|
-
stdoutChunks.push(d);
|
|
40
|
-
});
|
|
41
|
-
let nonce = 0;
|
|
42
|
-
return {
|
|
43
|
-
waitForDone: () => {
|
|
44
|
-
return new Promise((resolve, reject) => {
|
|
45
|
-
child.on('exit', (code) => {
|
|
46
|
-
console.log({ code });
|
|
47
|
-
if (code === 0) {
|
|
48
|
-
resolve();
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
reject(Buffer.concat(_stderrChunks).toString('utf-8'));
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
},
|
|
56
|
-
finishCommands: () => {
|
|
57
|
-
child.stdin.write('EOF\n');
|
|
58
|
-
},
|
|
59
|
-
executeCommand: (payload) => {
|
|
60
|
-
const actualPayload = {
|
|
61
|
-
...payload,
|
|
62
|
-
nonce,
|
|
63
|
-
};
|
|
64
|
-
nonce++;
|
|
65
|
-
return new Promise((resolve, reject) => {
|
|
66
|
-
child.stdin.write(JSON.stringify(actualPayload) + '\n');
|
|
67
|
-
const stderrChunks = [];
|
|
68
|
-
const onStderr = (d) => {
|
|
69
|
-
stderrChunks.push(d);
|
|
70
|
-
const message = Buffer.concat(stderrChunks).toString('utf-8');
|
|
71
|
-
let parsed = null;
|
|
72
|
-
try {
|
|
73
|
-
const content = JSON.parse(message);
|
|
74
|
-
if (content.msg_type === 'error') {
|
|
75
|
-
parsed = content;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
// TODO: Obviously bad, does not handle panics
|
|
80
|
-
console.log('Rust debug err:', message);
|
|
81
|
-
}
|
|
82
|
-
if (parsed) {
|
|
83
|
-
const err = new Error(parsed.error);
|
|
84
|
-
err.stack = parsed.error + '\n' + parsed.backtrace;
|
|
85
|
-
reject(err);
|
|
86
|
-
child.stderr.off('data', onStderr);
|
|
87
|
-
child.stdout.off('data', onStdout);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
const onStdout = (d) => {
|
|
91
|
-
const str = d.toString('utf-8');
|
|
92
|
-
const lineSplit = str.split('\n');
|
|
93
|
-
for (const line of lineSplit.filter(truthy_1.truthy)) {
|
|
94
|
-
let parsed = null;
|
|
95
|
-
try {
|
|
96
|
-
const p = JSON.parse(line);
|
|
97
|
-
if (p.msg_type === 'finish') {
|
|
98
|
-
parsed = p;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
catch (e) { }
|
|
102
|
-
if (parsed && parsed.nonce === actualPayload.nonce) {
|
|
103
|
-
resolve();
|
|
104
|
-
child.stderr.off('data', onStderr);
|
|
105
|
-
child.stdout.off('data', onStdout);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
child.stderr.on('data', onStderr);
|
|
110
|
-
child.stdout.on('data', onStdout);
|
|
111
|
-
});
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCompositionsOnServer = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const server_1 = require("react-dom/server");
|
|
6
|
-
const getCompositionsOnServer = (Comp) => {
|
|
7
|
-
process.env.REMOTION_SERVER_RENDERING = 'true';
|
|
8
|
-
const str = (0, server_1.renderToString)((0, jsx_runtime_1.jsx)(Comp, {}));
|
|
9
|
-
const matches = str.matchAll(/<div>(.*?)<\/div>/g);
|
|
10
|
-
const metadata = [];
|
|
11
|
-
for (const match of matches) {
|
|
12
|
-
const json = JSON.parse(match[1]);
|
|
13
|
-
metadata.push(json);
|
|
14
|
-
}
|
|
15
|
-
return metadata;
|
|
16
|
-
};
|
|
17
|
-
exports.getCompositionsOnServer = getCompositionsOnServer;
|
package/dist/render-on-server.js
DELETED
|
@@ -1,119 +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.renderOnServer = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const execa_1 = __importDefault(require("execa"));
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const server_1 = require("react-dom/server");
|
|
11
|
-
const remotion_1 = require("remotion");
|
|
12
|
-
const download_map_1 = require("./assets/download-map");
|
|
13
|
-
const compose_1 = require("./compositor/compose");
|
|
14
|
-
const compositor_1 = require("./compositor/compositor");
|
|
15
|
-
const get_frame_padded_index_1 = require("./get-frame-padded-index");
|
|
16
|
-
const pool_1 = require("./pool");
|
|
17
|
-
const renderOnServer = async (Comp, composition) => {
|
|
18
|
-
console.time('total');
|
|
19
|
-
console.time('frames');
|
|
20
|
-
process.env.REMOTION_SERVER_RENDERING = 'true';
|
|
21
|
-
process.env.SELECT_COMP_ID = composition.id;
|
|
22
|
-
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
23
|
-
const memo = {
|
|
24
|
-
assets: [],
|
|
25
|
-
compositions: [composition],
|
|
26
|
-
currentComposition: composition.id,
|
|
27
|
-
currentCompositionMetadata: composition,
|
|
28
|
-
folders: [],
|
|
29
|
-
registerAsset: () => {
|
|
30
|
-
throw new Error('Not implemented');
|
|
31
|
-
},
|
|
32
|
-
registerComposition: () => {
|
|
33
|
-
throw new Error('Not implemented');
|
|
34
|
-
},
|
|
35
|
-
registerFolder: () => {
|
|
36
|
-
throw new Error('Not implemented');
|
|
37
|
-
},
|
|
38
|
-
setCurrentComposition: () => {
|
|
39
|
-
throw new Error('Not implemented');
|
|
40
|
-
},
|
|
41
|
-
registerSequence() {
|
|
42
|
-
throw new Error('Not implemented');
|
|
43
|
-
},
|
|
44
|
-
sequences: [],
|
|
45
|
-
setCurrentCompositionMetadata: () => {
|
|
46
|
-
throw new Error('Not implemented');
|
|
47
|
-
},
|
|
48
|
-
unregisterAsset: () => {
|
|
49
|
-
throw new Error('Not implemented');
|
|
50
|
-
},
|
|
51
|
-
unregisterComposition: () => {
|
|
52
|
-
throw new Error('Not implemented');
|
|
53
|
-
},
|
|
54
|
-
unregisterFolder: () => {
|
|
55
|
-
throw new Error('Not implemented');
|
|
56
|
-
},
|
|
57
|
-
unregisterSequence: () => {
|
|
58
|
-
throw new Error('Not implemented');
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
const pool = new pool_1.Pool(new Array(4).fill(true).map((_, i) => i));
|
|
62
|
-
const downloadMap = (0, download_map_1.makeDownloadMap)();
|
|
63
|
-
const renderId = 'abc';
|
|
64
|
-
await Promise.all(new Array(composition.durationInFrames).fill(true).map(async (_, i) => {
|
|
65
|
-
const frame = await pool.acquire();
|
|
66
|
-
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
67
|
-
const value = {
|
|
68
|
-
audioAndVideoTags: { current: [] },
|
|
69
|
-
rootId: composition.id,
|
|
70
|
-
playing: false,
|
|
71
|
-
playbackRate: 1,
|
|
72
|
-
imperativePlaying: {
|
|
73
|
-
current: false,
|
|
74
|
-
},
|
|
75
|
-
frame: i,
|
|
76
|
-
setPlaybackRate: () => {
|
|
77
|
-
throw new Error('Not implemented');
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
const svg = (0, server_1.renderToStaticMarkup)((0, jsx_runtime_1.jsx)(remotion_1.Internals.Timeline.TimelineContext.Provider, { value: value, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.CompositionManager.Provider, { value: memo, children: (0, jsx_runtime_1.jsx)(Comp, {}) }) }));
|
|
81
|
-
const out = path_1.default.join(downloadMap.compositingDir, (0, get_frame_padded_index_1.getFrameOutputFileName)({
|
|
82
|
-
frame: i,
|
|
83
|
-
imageFormat: 'tiff',
|
|
84
|
-
index: i,
|
|
85
|
-
countType: 'from-zero',
|
|
86
|
-
lastFrame: composition.durationInFrames - 1,
|
|
87
|
-
totalFrames: composition.durationInFrames,
|
|
88
|
-
}));
|
|
89
|
-
await (0, compose_1.compose)({
|
|
90
|
-
height: composition.height,
|
|
91
|
-
width: composition.width,
|
|
92
|
-
downloadMap,
|
|
93
|
-
imageFormat: 'AddToH264',
|
|
94
|
-
layers: [
|
|
95
|
-
{
|
|
96
|
-
type: 'SvgImage',
|
|
97
|
-
params: {
|
|
98
|
-
height: composition.height,
|
|
99
|
-
width: composition.width,
|
|
100
|
-
markup: svg,
|
|
101
|
-
x: 0,
|
|
102
|
-
y: 0,
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
output: out,
|
|
107
|
-
renderId,
|
|
108
|
-
});
|
|
109
|
-
pool.release(frame);
|
|
110
|
-
}));
|
|
111
|
-
(0, compositor_1.releaseCompositorWithId)(renderId);
|
|
112
|
-
console.timeEnd('frames');
|
|
113
|
-
await (0, compositor_1.waitForCompositorWithIdToQuit)(renderId);
|
|
114
|
-
console.time('convert');
|
|
115
|
-
await (0, execa_1.default)('ffmpeg', ['-i', 'fade.h264', '-c', 'copy', 'fade.mp4', '-y']);
|
|
116
|
-
console.timeEnd('convert');
|
|
117
|
-
console.timeEnd('total');
|
|
118
|
-
};
|
|
119
|
-
exports.renderOnServer = renderOnServer;
|