@remotion/renderer 4.0.0-preload.13 → 4.0.0-spawn.13
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/download-and-map-assets-to-file.d.ts +6 -0
- package/dist/assets/download-and-map-assets-to-file.js +46 -19
- package/dist/assets/ffmpeg-volume-expression.d.ts +2 -1
- package/dist/assets/ffmpeg-volume-expression.js +15 -12
- package/dist/combine-videos.js +2 -0
- package/dist/cycle-browser-tabs.d.ts +2 -1
- package/dist/cycle-browser-tabs.js +2 -2
- package/dist/extract-frame-from-video.d.ts +18 -0
- package/dist/extract-frame-from-video.js +132 -0
- package/dist/frame-to-ffmpeg-timestamp.d.ts +1 -0
- package/dist/frame-to-ffmpeg-timestamp.js +8 -0
- package/dist/get-compositions.d.ts +4 -2
- package/dist/get-compositions.js +22 -5
- package/dist/index.d.ts +7 -8
- package/dist/index.js +0 -4
- package/dist/merge-audio-track.js +2 -2
- package/dist/offthread-video-server.d.ts +13 -0
- package/dist/offthread-video-server.js +65 -0
- package/dist/open-browser.d.ts +5 -5
- package/dist/prepare-server.d.ts +12 -2
- package/dist/prepare-server.js +22 -5
- package/dist/prespawn-ffmpeg.d.ts +1 -0
- package/dist/prespawn-ffmpeg.js +11 -10
- package/dist/puppeteer-screenshot.js +5 -1
- package/dist/render-frames.d.ts +7 -2
- package/dist/render-frames.js +90 -33
- package/dist/render-media.d.ts +8 -2
- package/dist/render-media.js +52 -3
- package/dist/render-still.d.ts +7 -2
- package/dist/render-still.js +33 -9
- package/dist/serve-static.d.ts +9 -3
- package/dist/serve-static.js +16 -0
- package/dist/set-props-and-env.d.ts +3 -1
- package/dist/set-props-and-env.js +25 -3
- package/dist/stitch-frames-to-video.js +1 -0
- package/dist/stringify-ffmpeg-filter.js +3 -0
- package/dist/tmp-dir.js +5 -1
- package/package.json +4 -5
|
@@ -5,7 +5,7 @@ const remotion_1 = require("remotion");
|
|
|
5
5
|
const normalize_serve_url_1 = require("./normalize-serve-url");
|
|
6
6
|
const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
7
7
|
const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
|
|
8
|
-
const setPropsAndEnv = async ({ inputProps, envVariables, page, serveUrl, initialFrame, timeoutInMilliseconds, }) => {
|
|
8
|
+
const setPropsAndEnv = async ({ inputProps, envVariables, page, serveUrl, initialFrame, timeoutInMilliseconds, proxyPort, retriesRemaining, }) => {
|
|
9
9
|
(0, validate_puppeteer_timeout_1.validatePuppeteerTimeout)(timeoutInMilliseconds);
|
|
10
10
|
const actualTimeout = timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : remotion_1.Internals.DEFAULT_PUPPETEER_TIMEOUT;
|
|
11
11
|
page.setDefaultTimeout(actualTimeout);
|
|
@@ -27,8 +27,30 @@ const setPropsAndEnv = async ({ inputProps, envVariables, page, serveUrl, initia
|
|
|
27
27
|
await page.evaluateOnNewDocument((key) => {
|
|
28
28
|
window.remotion_initialFrame = key;
|
|
29
29
|
}, [initialFrame]);
|
|
30
|
+
await page.evaluateOnNewDocument((port) => {
|
|
31
|
+
window.remotion_proxyPort = port;
|
|
32
|
+
}, [proxyPort]);
|
|
30
33
|
const pageRes = await page.goto(urlToVisit);
|
|
31
34
|
const status = pageRes.status();
|
|
35
|
+
// S3 in rare occasions returns a 500 or 503 error code for GET operations.
|
|
36
|
+
// Usually it is fixed by retrying.
|
|
37
|
+
if (status >= 500 && status <= 504 && retriesRemaining > 0) {
|
|
38
|
+
await new Promise((resolve) => {
|
|
39
|
+
setTimeout(() => {
|
|
40
|
+
resolve();
|
|
41
|
+
}, 2000);
|
|
42
|
+
});
|
|
43
|
+
return (0, exports.setPropsAndEnv)({
|
|
44
|
+
envVariables,
|
|
45
|
+
initialFrame,
|
|
46
|
+
inputProps,
|
|
47
|
+
page,
|
|
48
|
+
proxyPort,
|
|
49
|
+
retriesRemaining: retriesRemaining - 1,
|
|
50
|
+
serveUrl,
|
|
51
|
+
timeoutInMilliseconds,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
32
54
|
if (status !== 200 &&
|
|
33
55
|
status !== 301 &&
|
|
34
56
|
status !== 302 &&
|
|
@@ -55,8 +77,8 @@ const setPropsAndEnv = async ({ inputProps, envVariables, page, serveUrl, initia
|
|
|
55
77
|
frame: null,
|
|
56
78
|
page,
|
|
57
79
|
});
|
|
58
|
-
if (siteVersion !== '
|
|
59
|
-
throw new Error(`Incompatible site: When visiting ${urlToVisit}, a bundle was found, but one that is not compatible with this version of Remotion. The bundle format changed in
|
|
80
|
+
if (siteVersion !== '3') {
|
|
81
|
+
throw new Error(`Incompatible site: When visiting ${urlToVisit}, a bundle was found, but one that is not compatible with this version of Remotion. The bundle format changed in version 3.0.11. To resolve this error, please bundle and deploy again.`);
|
|
60
82
|
}
|
|
61
83
|
};
|
|
62
84
|
exports.setPropsAndEnv = setPropsAndEnv;
|
|
@@ -160,6 +160,7 @@ const spawnFfmpeg = async (options) => {
|
|
|
160
160
|
pixelFormat === 'yuva420p' ? ['-auto-alt-ref', '0'] : null,
|
|
161
161
|
['-b:v', '1M'],
|
|
162
162
|
]),
|
|
163
|
+
codec === 'h264' ? ['-movflags', 'faststart'] : null,
|
|
163
164
|
audioCodecName ? ['-c:a', audioCodecName] : null,
|
|
164
165
|
// Ignore metadata that may come from remote media
|
|
165
166
|
['-map_metadata', '-1'],
|
|
@@ -11,6 +11,7 @@ const stringifyFfmpegFilter = ({ trimLeft, trimRight, channels, startInVideo, vo
|
|
|
11
11
|
volume,
|
|
12
12
|
startInVideo,
|
|
13
13
|
fps,
|
|
14
|
+
trimLeft,
|
|
14
15
|
});
|
|
15
16
|
// Avoid setting filters if possible, as combining them can create noise
|
|
16
17
|
const chunkLength = durationInFrames / fps;
|
|
@@ -37,6 +38,8 @@ const stringifyFfmpegFilter = ({ trimLeft, trimRight, channels, startInVideo, vo
|
|
|
37
38
|
.fill((startInVideoSeconds * 1000).toFixed(0))
|
|
38
39
|
.join('|')}`,
|
|
39
40
|
// set the volume if needed
|
|
41
|
+
// The timings for volume must include whatever is in atrim, unless the volume
|
|
42
|
+
// filter gets applied before atrim
|
|
40
43
|
volumeFilter.value === '1'
|
|
41
44
|
? null
|
|
42
45
|
: `volume=${volumeFilter.value}:eval=${volumeFilter.eval}`,
|
package/dist/tmp-dir.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-spawn.13+5f3607e8b",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,10 +20,9 @@
|
|
|
20
20
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@remotion/bundler": "4.0.0-preload.13+f7b159495",
|
|
24
23
|
"execa": "5.1.1",
|
|
25
24
|
"puppeteer-core": "13.5.1",
|
|
26
|
-
"remotion": "4.0.0-
|
|
25
|
+
"remotion": "4.0.0-spawn.13+5f3607e8b",
|
|
27
26
|
"serve-handler": "6.1.3",
|
|
28
27
|
"source-map": "^0.8.0-beta.0"
|
|
29
28
|
},
|
|
@@ -47,7 +46,7 @@
|
|
|
47
46
|
"react": "18.0.0",
|
|
48
47
|
"react-dom": "18.0.0",
|
|
49
48
|
"ts-jest": "^27.0.5",
|
|
50
|
-
"typescript": "^4.
|
|
49
|
+
"typescript": "^4.7.0"
|
|
51
50
|
},
|
|
52
51
|
"keywords": [
|
|
53
52
|
"remotion",
|
|
@@ -60,5 +59,5 @@
|
|
|
60
59
|
"publishConfig": {
|
|
61
60
|
"access": "public"
|
|
62
61
|
},
|
|
63
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "5f3607e8b8b958cf0604798639c8d901e9f2a295"
|
|
64
63
|
}
|