@remotion/renderer 4.0.120 → 4.0.121
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/browser/BrowserPage.js +29 -10
- package/dist/call-ffmpeg.d.ts +1 -0
- package/dist/can-concatenate-seamlessly.d.ts +3 -0
- package/dist/can-concatenate-seamlessly.js +7 -0
- package/dist/client.d.ts +49 -49
- package/dist/combine-audio.d.ts +6 -1
- package/dist/combine-audio.js +33 -12
- package/dist/combine-video-streams-seamlessly.d.ts +3 -0
- package/dist/combine-video-streams-seamlessly.js +8 -0
- package/dist/combine-video-streams.d.ts +4 -1
- package/dist/combine-video-streams.js +9 -3
- package/dist/compress-audio.d.ts +13 -0
- package/dist/compress-audio.js +28 -0
- package/dist/create-audio.d.ts +21 -0
- package/dist/create-audio.js +82 -0
- package/dist/create-combined-video.d.ts +18 -0
- package/dist/create-combined-video.js +27 -0
- package/dist/create-ffmpeg-complex-filter.d.ts +1 -4
- package/dist/get-extension-from-audio-codec.d.ts +2 -0
- package/dist/get-extension-from-audio-codec.js +19 -0
- package/dist/get-silent-parts.d.ts +1 -1
- package/dist/index.d.ts +28 -26
- package/dist/mux-video-and-audio.d.ts +5 -1
- package/dist/mux-video-and-audio.js +12 -3
- package/dist/options/gl.d.ts +3 -3
- package/dist/options/index.d.ts +10 -10
- package/dist/options/log-level.d.ts +2 -2
- package/dist/options/options-map.d.ts +39 -39
- package/dist/options/prefer-lossless.d.ts +12 -2
- package/dist/options/prefer-lossless.js +19 -4
- package/dist/options/x264-preset.d.ts +2 -2
- package/dist/provide-screenshot.d.ts +2 -2
- package/dist/provide-screenshot.js +2 -1
- package/dist/puppeteer-screenshot.d.ts +1 -1
- package/dist/puppeteer-screenshot.js +1 -0
- package/dist/render-frames.js +2 -1
- package/dist/screenshot-dom-element.d.ts +2 -2
- package/dist/screenshot-dom-element.js +2 -1
- package/dist/screenshot-task.d.ts +2 -2
- package/dist/screenshot-task.js +11 -9
- package/dist/should-seamless.d.ts +3 -0
- package/dist/should-seamless.js +7 -0
- package/dist/stitch-frames-to-video.d.ts +1 -0
- package/dist/take-frame-and-compose.js +1 -0
- package/package.json +9 -9
|
@@ -72,17 +72,17 @@ export declare const optionsMap: {
|
|
|
72
72
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
73
73
|
ssrName: "x264Preset";
|
|
74
74
|
docLink: string;
|
|
75
|
-
type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
75
|
+
type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
76
76
|
getValue: ({ commandLine }: {
|
|
77
77
|
commandLine: Record<string, unknown>;
|
|
78
78
|
}) => {
|
|
79
|
-
value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
79
|
+
value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
|
|
80
80
|
source: string;
|
|
81
81
|
} | {
|
|
82
82
|
value: null;
|
|
83
83
|
source: string;
|
|
84
84
|
};
|
|
85
|
-
setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
85
|
+
setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
|
|
86
86
|
};
|
|
87
87
|
readonly audioBitrate: {
|
|
88
88
|
name: string;
|
|
@@ -213,11 +213,11 @@ export declare const optionsMap: {
|
|
|
213
213
|
getValue: ({ commandLine }: {
|
|
214
214
|
commandLine: Record<string, unknown>;
|
|
215
215
|
}) => {
|
|
216
|
-
value: "
|
|
216
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
217
217
|
source: string;
|
|
218
218
|
};
|
|
219
|
-
setConfig: (newLogLevel: "
|
|
220
|
-
type: "
|
|
219
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
220
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
221
221
|
};
|
|
222
222
|
readonly timeoutInMilliseconds: {
|
|
223
223
|
name: string;
|
|
@@ -293,11 +293,11 @@ export declare const optionsMap: {
|
|
|
293
293
|
getValue: ({ commandLine }: {
|
|
294
294
|
commandLine: Record<string, unknown>;
|
|
295
295
|
}) => {
|
|
296
|
-
value: "
|
|
296
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
297
297
|
source: string;
|
|
298
298
|
};
|
|
299
|
-
setConfig: (newLogLevel: "
|
|
300
|
-
type: "
|
|
299
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
300
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
301
301
|
};
|
|
302
302
|
readonly timeoutInMilliseconds: {
|
|
303
303
|
name: string;
|
|
@@ -358,11 +358,11 @@ export declare const optionsMap: {
|
|
|
358
358
|
getValue: ({ commandLine }: {
|
|
359
359
|
commandLine: Record<string, unknown>;
|
|
360
360
|
}) => {
|
|
361
|
-
value: "
|
|
361
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
362
362
|
source: string;
|
|
363
363
|
};
|
|
364
|
-
setConfig: (newLogLevel: "
|
|
365
|
-
type: "
|
|
364
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
365
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
366
366
|
};
|
|
367
367
|
readonly timeoutInMilliseconds: {
|
|
368
368
|
name: string;
|
|
@@ -423,11 +423,11 @@ export declare const optionsMap: {
|
|
|
423
423
|
getValue: ({ commandLine }: {
|
|
424
424
|
commandLine: Record<string, unknown>;
|
|
425
425
|
}) => {
|
|
426
|
-
value: "
|
|
426
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
427
427
|
source: string;
|
|
428
428
|
};
|
|
429
|
-
setConfig: (newLogLevel: "
|
|
430
|
-
type: "
|
|
429
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
430
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
431
431
|
};
|
|
432
432
|
readonly timeoutInMilliseconds: {
|
|
433
433
|
name: string;
|
|
@@ -503,11 +503,11 @@ export declare const optionsMap: {
|
|
|
503
503
|
getValue: ({ commandLine }: {
|
|
504
504
|
commandLine: Record<string, unknown>;
|
|
505
505
|
}) => {
|
|
506
|
-
value: "
|
|
506
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
507
507
|
source: string;
|
|
508
508
|
};
|
|
509
|
-
setConfig: (newLogLevel: "
|
|
510
|
-
type: "
|
|
509
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
510
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
511
511
|
};
|
|
512
512
|
readonly timeoutInMilliseconds: {
|
|
513
513
|
name: string;
|
|
@@ -634,17 +634,17 @@ export declare const optionsMap: {
|
|
|
634
634
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
635
635
|
ssrName: "x264Preset";
|
|
636
636
|
docLink: string;
|
|
637
|
-
type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
637
|
+
type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
638
638
|
getValue: ({ commandLine }: {
|
|
639
639
|
commandLine: Record<string, unknown>;
|
|
640
640
|
}) => {
|
|
641
|
-
value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
641
|
+
value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
|
|
642
642
|
source: string;
|
|
643
643
|
} | {
|
|
644
644
|
value: null;
|
|
645
645
|
source: string;
|
|
646
646
|
};
|
|
647
|
-
setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
647
|
+
setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
|
|
648
648
|
};
|
|
649
649
|
readonly encodingMaxRate: {
|
|
650
650
|
name: string;
|
|
@@ -721,11 +721,11 @@ export declare const optionsMap: {
|
|
|
721
721
|
getValue: ({ commandLine }: {
|
|
722
722
|
commandLine: Record<string, unknown>;
|
|
723
723
|
}) => {
|
|
724
|
-
value: "
|
|
724
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
725
725
|
source: string;
|
|
726
726
|
};
|
|
727
|
-
setConfig: (newLogLevel: "
|
|
728
|
-
type: "
|
|
727
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
728
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
729
729
|
};
|
|
730
730
|
readonly timeoutInMilliseconds: {
|
|
731
731
|
name: string;
|
|
@@ -786,11 +786,11 @@ export declare const optionsMap: {
|
|
|
786
786
|
getValue: ({ commandLine }: {
|
|
787
787
|
commandLine: Record<string, unknown>;
|
|
788
788
|
}) => {
|
|
789
|
-
value: "
|
|
789
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
790
790
|
source: string;
|
|
791
791
|
};
|
|
792
|
-
setConfig: (newLogLevel: "
|
|
793
|
-
type: "
|
|
792
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
793
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
794
794
|
};
|
|
795
795
|
readonly deleteAfter: {
|
|
796
796
|
name: string;
|
|
@@ -869,11 +869,11 @@ export declare const optionsMap: {
|
|
|
869
869
|
getValue: ({ commandLine }: {
|
|
870
870
|
commandLine: Record<string, unknown>;
|
|
871
871
|
}) => {
|
|
872
|
-
value: "
|
|
872
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
873
873
|
source: string;
|
|
874
874
|
};
|
|
875
|
-
setConfig: (newLogLevel: "
|
|
876
|
-
type: "
|
|
875
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
876
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
877
877
|
};
|
|
878
878
|
readonly timeoutInMilliseconds: {
|
|
879
879
|
name: string;
|
|
@@ -982,17 +982,17 @@ export declare const optionsMap: {
|
|
|
982
982
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
983
983
|
ssrName: "x264Preset";
|
|
984
984
|
docLink: string;
|
|
985
|
-
type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
985
|
+
type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
986
986
|
getValue: ({ commandLine }: {
|
|
987
987
|
commandLine: Record<string, unknown>;
|
|
988
988
|
}) => {
|
|
989
|
-
value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
989
|
+
value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
|
|
990
990
|
source: string;
|
|
991
991
|
} | {
|
|
992
992
|
value: null;
|
|
993
993
|
source: string;
|
|
994
994
|
};
|
|
995
|
-
setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
995
|
+
setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
|
|
996
996
|
};
|
|
997
997
|
readonly encodingMaxRate: {
|
|
998
998
|
name: string;
|
|
@@ -1054,11 +1054,11 @@ export declare const optionsMap: {
|
|
|
1054
1054
|
getValue: ({ commandLine }: {
|
|
1055
1055
|
commandLine: Record<string, unknown>;
|
|
1056
1056
|
}) => {
|
|
1057
|
-
value: "
|
|
1057
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
1058
1058
|
source: string;
|
|
1059
1059
|
};
|
|
1060
|
-
setConfig: (newLogLevel: "
|
|
1061
|
-
type: "
|
|
1060
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
1061
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
1062
1062
|
};
|
|
1063
1063
|
readonly delayRenderTimeoutInMilliseconds: {
|
|
1064
1064
|
name: string;
|
|
@@ -1164,11 +1164,11 @@ export declare const optionsMap: {
|
|
|
1164
1164
|
getValue: ({ commandLine }: {
|
|
1165
1165
|
commandLine: Record<string, unknown>;
|
|
1166
1166
|
}) => {
|
|
1167
|
-
value: "
|
|
1167
|
+
value: "error" | "verbose" | "info" | "warn";
|
|
1168
1168
|
source: string;
|
|
1169
1169
|
};
|
|
1170
|
-
setConfig: (newLogLevel: "
|
|
1171
|
-
type: "
|
|
1170
|
+
setConfig: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
1171
|
+
type: "error" | "verbose" | "info" | "warn";
|
|
1172
1172
|
};
|
|
1173
1173
|
readonly scale: {
|
|
1174
1174
|
name: string;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const preferLosslessAudioOption: {
|
|
2
2
|
name: string;
|
|
3
3
|
cliFlag: "prefer-lossless";
|
|
4
|
-
description: () =>
|
|
4
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
docLink: string;
|
|
6
6
|
type: boolean;
|
|
7
7
|
ssrName: "preferLossless";
|
|
8
|
+
getValue: ({ commandLine }: {
|
|
9
|
+
commandLine: Record<string, unknown>;
|
|
10
|
+
}) => {
|
|
11
|
+
value: true;
|
|
12
|
+
source: string;
|
|
13
|
+
} | {
|
|
14
|
+
value: false;
|
|
15
|
+
source: string;
|
|
16
|
+
};
|
|
17
|
+
setConfig: (val: boolean) => void;
|
|
8
18
|
};
|
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.preferLosslessAudioOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cliFlag = 'prefer-lossless';
|
|
6
|
+
let input = false;
|
|
7
|
+
exports.preferLosslessAudioOption = {
|
|
5
8
|
name: 'Prefer lossless',
|
|
6
|
-
cliFlag
|
|
7
|
-
description: () =>
|
|
9
|
+
cliFlag,
|
|
10
|
+
description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Uses a lossless audio codec, if one is available for the codec. If you set", (0, jsx_runtime_1.jsx)("code", { children: "audioCodec" }), ", it takes priority over", ' ', (0, jsx_runtime_1.jsx)("code", { children: "preferLossless" }), "."] })),
|
|
8
11
|
docLink: 'https://www.remotion.dev/docs/encoding',
|
|
9
12
|
type: false,
|
|
10
13
|
ssrName: 'preferLossless',
|
|
14
|
+
getValue: ({ commandLine }) => {
|
|
15
|
+
if (commandLine[cliFlag]) {
|
|
16
|
+
return { value: true, source: 'cli' };
|
|
17
|
+
}
|
|
18
|
+
if (input === true) {
|
|
19
|
+
return { value: true, source: 'config' };
|
|
20
|
+
}
|
|
21
|
+
return { value: false, source: 'default' };
|
|
22
|
+
},
|
|
23
|
+
setConfig: (val) => {
|
|
24
|
+
input = val;
|
|
25
|
+
},
|
|
11
26
|
};
|
|
@@ -11,11 +11,11 @@ export declare const x264Option: {
|
|
|
11
11
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
ssrName: "x264Preset";
|
|
13
13
|
docLink: string;
|
|
14
|
-
type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
14
|
+
type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
15
15
|
getValue: ({ commandLine }: {
|
|
16
16
|
commandLine: Record<string, unknown>;
|
|
17
17
|
}) => {
|
|
18
|
-
value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
18
|
+
value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
|
|
19
19
|
source: string;
|
|
20
20
|
} | {
|
|
21
21
|
value: null;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { ClipRegion } from 'remotion/no-react';
|
|
3
2
|
import type { Page } from './browser/BrowserPage';
|
|
4
3
|
import type { StillImageFormat } from './image-format';
|
|
5
|
-
export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, timeoutInMilliseconds, }: {
|
|
4
|
+
export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, timeoutInMilliseconds, scale, }: {
|
|
6
5
|
page: Page;
|
|
7
6
|
imageFormat: StillImageFormat;
|
|
8
7
|
jpegQuality: number | undefined;
|
|
@@ -14,4 +13,5 @@ export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuali
|
|
|
14
13
|
width: number;
|
|
15
14
|
clipRegion: ClipRegion | null;
|
|
16
15
|
timeoutInMilliseconds: number;
|
|
16
|
+
scale: number;
|
|
17
17
|
}) => Promise<Buffer>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.provideScreenshot = void 0;
|
|
4
4
|
const screenshot_dom_element_1 = require("./screenshot-dom-element");
|
|
5
|
-
const provideScreenshot = ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, timeoutInMilliseconds, }) => {
|
|
5
|
+
const provideScreenshot = ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, timeoutInMilliseconds, scale, }) => {
|
|
6
6
|
return (0, screenshot_dom_element_1.screenshotDOMElement)({
|
|
7
7
|
page,
|
|
8
8
|
opts: {
|
|
@@ -14,6 +14,7 @@ const provideScreenshot = ({ page, imageFormat, options, jpegQuality, height, wi
|
|
|
14
14
|
width,
|
|
15
15
|
clipRegion,
|
|
16
16
|
timeoutInMilliseconds,
|
|
17
|
+
scale,
|
|
17
18
|
});
|
|
18
19
|
};
|
|
19
20
|
exports.provideScreenshot = provideScreenshot;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { ClipRegion } from 'remotion/no-react';
|
|
3
2
|
import type { Page } from './browser/BrowserPage';
|
|
4
3
|
import type { StillImageFormat } from './image-format';
|
|
@@ -11,4 +10,5 @@ export declare const screenshot: (options: {
|
|
|
11
10
|
width: number;
|
|
12
11
|
height: number;
|
|
13
12
|
clipRegion: ClipRegion | null;
|
|
13
|
+
scale: number;
|
|
14
14
|
}) => Promise<Buffer | string>;
|
package/dist/render-frames.js
CHANGED
|
@@ -361,8 +361,9 @@ const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOpti
|
|
|
361
361
|
]).then(([{ server: openedServer, cleanupServer }, pInstance]) => {
|
|
362
362
|
const { serveUrl, offthreadPort, compositor, sourceMap, downloadMap } = openedServer;
|
|
363
363
|
const browserReplacer = (0, replace_browser_1.handleBrowserCrash)(pInstance, logLevel, indent);
|
|
364
|
+
const cycle = (0, cycle_browser_tabs_1.cycleBrowserTabs)(browserReplacer, actualConcurrency, logLevel, indent);
|
|
364
365
|
cleanup.push(() => {
|
|
365
|
-
|
|
366
|
+
cycle.stopCycling();
|
|
366
367
|
return Promise.resolve();
|
|
367
368
|
});
|
|
368
369
|
cleanup.push(() => cleanupServer(false));
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { ClipRegion } from 'remotion/no-react';
|
|
3
2
|
import type { Page } from './browser/BrowserPage';
|
|
4
3
|
import type { StillImageFormat } from './image-format';
|
|
5
|
-
export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, timeoutInMilliseconds, }: {
|
|
4
|
+
export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, timeoutInMilliseconds, scale, }: {
|
|
6
5
|
page: Page;
|
|
7
6
|
imageFormat: StillImageFormat;
|
|
8
7
|
jpegQuality: number | undefined;
|
|
@@ -13,4 +12,5 @@ export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, op
|
|
|
13
12
|
width: number;
|
|
14
13
|
clipRegion: ClipRegion | null;
|
|
15
14
|
timeoutInMilliseconds: number;
|
|
15
|
+
scale: number;
|
|
16
16
|
}) => Promise<Buffer>;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.screenshotDOMElement = void 0;
|
|
4
4
|
const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
5
5
|
const puppeteer_screenshot_1 = require("./puppeteer-screenshot");
|
|
6
|
-
const screenshotDOMElement = async ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, timeoutInMilliseconds, }) => {
|
|
6
|
+
const screenshotDOMElement = async ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, timeoutInMilliseconds, scale, }) => {
|
|
7
7
|
const { path } = opts;
|
|
8
8
|
if (imageFormat === 'png' ||
|
|
9
9
|
imageFormat === 'pdf' ||
|
|
@@ -42,6 +42,7 @@ const screenshotDOMElement = async ({ page, imageFormat, jpegQuality, opts, heig
|
|
|
42
42
|
width,
|
|
43
43
|
height,
|
|
44
44
|
clipRegion,
|
|
45
|
+
scale,
|
|
45
46
|
});
|
|
46
47
|
if (typeof buf === 'string') {
|
|
47
48
|
throw new TypeError('Expected a buffer');
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { ClipRegion } from 'remotion/no-react';
|
|
3
2
|
import type { Page } from './browser/BrowserPage';
|
|
4
3
|
import type { StillImageFormat } from './image-format';
|
|
5
|
-
export declare const screenshotTask: ({ format, height, omitBackground, page, width, path, jpegQuality, clipRegion, }: {
|
|
4
|
+
export declare const screenshotTask: ({ format, height, omitBackground, page, width, path, jpegQuality, clipRegion, scale, }: {
|
|
6
5
|
page: Page;
|
|
7
6
|
format: StillImageFormat;
|
|
8
7
|
path?: string | undefined;
|
|
@@ -11,4 +10,5 @@ export declare const screenshotTask: ({ format, height, omitBackground, page, wi
|
|
|
11
10
|
width: number;
|
|
12
11
|
height: number;
|
|
13
12
|
clipRegion: ClipRegion | null;
|
|
13
|
+
scale: number;
|
|
14
14
|
}) => Promise<Buffer | string>;
|
package/dist/screenshot-task.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.screenshotTask = void 0;
|
|
7
7
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
8
|
const perf_1 = require("./perf");
|
|
9
|
-
const screenshotTask = async ({ format, height, omitBackground, page, width, path, jpegQuality, clipRegion, }) => {
|
|
9
|
+
const screenshotTask = async ({ format, height, omitBackground, page, width, path, jpegQuality, clipRegion, scale, }) => {
|
|
10
10
|
var _a;
|
|
11
11
|
const client = page._client();
|
|
12
12
|
const target = page.target();
|
|
@@ -37,6 +37,13 @@ const screenshotTask = async ({ format, height, omitBackground, page, width, pat
|
|
|
37
37
|
result = res.value;
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
|
+
// We find that there is a 0.1% framedrop when rendering under memory pressure
|
|
41
|
+
// which can be circumvented by disabling this option on Lambda.
|
|
42
|
+
// To be determined: Is this a problem with Lambda, or the Chrome version
|
|
43
|
+
// we are using on Lambda?
|
|
44
|
+
// We already found out that the problem is not a general Linux problem.
|
|
45
|
+
const fromSurface = !process.env.DISABLE_FROM_SURFACE;
|
|
46
|
+
const scaleFactor = fromSurface ? 1 : scale;
|
|
40
47
|
const { value } = await client.send('Page.captureScreenshot', {
|
|
41
48
|
format,
|
|
42
49
|
quality: jpegQuality,
|
|
@@ -51,18 +58,13 @@ const screenshotTask = async ({ format, height, omitBackground, page, width, pat
|
|
|
51
58
|
: {
|
|
52
59
|
x: 0,
|
|
53
60
|
y: 0,
|
|
54
|
-
height,
|
|
61
|
+
height: height * scaleFactor,
|
|
55
62
|
scale: 1,
|
|
56
|
-
width,
|
|
63
|
+
width: width * scaleFactor,
|
|
57
64
|
},
|
|
58
65
|
captureBeyondViewport: true,
|
|
59
66
|
optimizeForSpeed: true,
|
|
60
|
-
|
|
61
|
-
// which can be circumvented by disabling this option on Lambda.
|
|
62
|
-
// To be determined: Is this a problem with Lambda, or the Chrome version
|
|
63
|
-
// we are using on Lambda?
|
|
64
|
-
// We already found out that the problem is not a general Linux problem.
|
|
65
|
-
fromSurface: !process.env.DISABLE_FROM_SURFACE,
|
|
67
|
+
fromSurface,
|
|
66
68
|
});
|
|
67
69
|
result = value;
|
|
68
70
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.canConcatSeamlessly = void 0;
|
|
4
|
+
const canConcatSeamlessly = (audioCodec, codec) => {
|
|
5
|
+
return audioCodec === 'aac' && codec === 'h264';
|
|
6
|
+
};
|
|
7
|
+
exports.canConcatSeamlessly = canConcatSeamlessly;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.121",
|
|
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.121"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"vitest": "0.31.1"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@remotion/compositor-darwin-
|
|
44
|
-
"@remotion/compositor-darwin-
|
|
45
|
-
"@remotion/compositor-linux-arm64-
|
|
46
|
-
"@remotion/compositor-linux-arm64-
|
|
47
|
-
"@remotion/compositor-linux-x64-
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-
|
|
43
|
+
"@remotion/compositor-darwin-x64": "4.0.121",
|
|
44
|
+
"@remotion/compositor-darwin-arm64": "4.0.121",
|
|
45
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.121",
|
|
46
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.121",
|
|
47
|
+
"@remotion/compositor-linux-x64-musl": "4.0.121",
|
|
48
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.121",
|
|
49
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.121"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|