@remotion/renderer 4.0.351 → 4.0.353
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/inline-audio-mixing.js +6 -7
- package/dist/browser/BrowserPage.js +45 -19
- package/dist/browser/ConsoleMessage.d.ts +6 -2
- package/dist/browser/ConsoleMessage.js +3 -5
- package/dist/client.d.ts +186 -6
- package/dist/esm/client.mjs +92 -29
- package/dist/esm/index.mjs +121 -60
- package/dist/format-logs.js +2 -2
- package/dist/get-compositions.js +8 -3
- package/dist/index.d.ts +72 -0
- package/dist/make-page.d.ts +2 -1
- package/dist/make-page.js +4 -1
- package/dist/options/index.d.ts +18 -0
- package/dist/options/index.js +2 -0
- package/dist/options/options-map.d.ts +168 -6
- package/dist/options/options-map.js +11 -1
- package/dist/options/video-cache-size.d.ts +19 -0
- package/dist/options/video-cache-size.js +39 -0
- package/dist/render-frames.js +6 -3
- package/dist/render-media.d.ts +1 -1
- package/dist/render-media.js +4 -2
- package/dist/render-still.js +6 -2
- package/dist/select-composition.js +8 -3
- package/dist/set-props-and-env.d.ts +2 -0
- package/dist/set-props-and-env.js +7 -3
- package/package.json +12 -12
package/dist/index.d.ts
CHANGED
|
@@ -456,6 +456,24 @@ export declare const RenderInternals: {
|
|
|
456
456
|
port: number | null;
|
|
457
457
|
onArtifact: import("./render-frames").OnArtifact | null;
|
|
458
458
|
} & import("./options/option").ToOptions<{
|
|
459
|
+
readonly mediaCacheSizeInBytes: {
|
|
460
|
+
name: string;
|
|
461
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
462
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
463
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
464
|
+
docLink: string;
|
|
465
|
+
type: number | null;
|
|
466
|
+
getValue: ({ commandLine }: {
|
|
467
|
+
commandLine: Record<string, unknown>;
|
|
468
|
+
}) => {
|
|
469
|
+
source: string;
|
|
470
|
+
value: number;
|
|
471
|
+
} | {
|
|
472
|
+
source: string;
|
|
473
|
+
value: null;
|
|
474
|
+
};
|
|
475
|
+
setConfig: (size: number | null) => void;
|
|
476
|
+
};
|
|
459
477
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
460
478
|
name: string;
|
|
461
479
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
@@ -643,6 +661,24 @@ export declare const RenderInternals: {
|
|
|
643
661
|
id: string;
|
|
644
662
|
onServeUrlVisited: () => void;
|
|
645
663
|
} & import("./options/option").ToOptions<{
|
|
664
|
+
readonly mediaCacheSizeInBytes: {
|
|
665
|
+
name: string;
|
|
666
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
667
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
668
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
669
|
+
docLink: string;
|
|
670
|
+
type: number | null;
|
|
671
|
+
getValue: ({ commandLine }: {
|
|
672
|
+
commandLine: Record<string, unknown>;
|
|
673
|
+
}) => {
|
|
674
|
+
source: string;
|
|
675
|
+
value: number;
|
|
676
|
+
} | {
|
|
677
|
+
source: string;
|
|
678
|
+
value: null;
|
|
679
|
+
};
|
|
680
|
+
setConfig: (size: number | null) => void;
|
|
681
|
+
};
|
|
646
682
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
647
683
|
name: string;
|
|
648
684
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
@@ -765,6 +801,24 @@ export declare const RenderInternals: {
|
|
|
765
801
|
indent: boolean;
|
|
766
802
|
serveUrlOrWebpackUrl: string;
|
|
767
803
|
} & import("./options/option").ToOptions<{
|
|
804
|
+
readonly mediaCacheSizeInBytes: {
|
|
805
|
+
name: string;
|
|
806
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
807
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
808
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
809
|
+
docLink: string;
|
|
810
|
+
type: number | null;
|
|
811
|
+
getValue: ({ commandLine }: {
|
|
812
|
+
commandLine: Record<string, unknown>;
|
|
813
|
+
}) => {
|
|
814
|
+
source: string;
|
|
815
|
+
value: number;
|
|
816
|
+
} | {
|
|
817
|
+
source: string;
|
|
818
|
+
value: null;
|
|
819
|
+
};
|
|
820
|
+
setConfig: (size: number | null) => void;
|
|
821
|
+
};
|
|
768
822
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
769
823
|
name: string;
|
|
770
824
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
@@ -902,6 +956,24 @@ export declare const RenderInternals: {
|
|
|
902
956
|
compositionStart: number;
|
|
903
957
|
onArtifact: import("./render-frames").OnArtifact | null;
|
|
904
958
|
} & import("./options/option").ToOptions<{
|
|
959
|
+
readonly mediaCacheSizeInBytes: {
|
|
960
|
+
name: string;
|
|
961
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
962
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
963
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
964
|
+
docLink: string;
|
|
965
|
+
type: number | null;
|
|
966
|
+
getValue: ({ commandLine }: {
|
|
967
|
+
commandLine: Record<string, unknown>;
|
|
968
|
+
}) => {
|
|
969
|
+
source: string;
|
|
970
|
+
value: number;
|
|
971
|
+
} | {
|
|
972
|
+
source: string;
|
|
973
|
+
value: null;
|
|
974
|
+
};
|
|
975
|
+
setConfig: (size: number | null) => void;
|
|
976
|
+
};
|
|
905
977
|
readonly forSeamlessAacConcatenation: {
|
|
906
978
|
name: string;
|
|
907
979
|
cliFlag: "for-seamless-aac-concatenation";
|
package/dist/make-page.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { SourceMapGetter } from './browser/source-map-getter';
|
|
|
5
5
|
import type { VideoImageFormat } from './image-format';
|
|
6
6
|
import type { LogLevel } from './log-level';
|
|
7
7
|
import type { BrowserReplacer } from './replace-browser';
|
|
8
|
-
export declare const makePage: ({ context, initialFrame, browserReplacer, logLevel, indent, pagesArray, onBrowserLog, scale, timeoutInMilliseconds, composition, proxyPort, serveUrl, muted, envVariables, serializedInputPropsWithCustomSchema, imageFormat, serializedResolvedPropsWithCustomSchema, pageIndex, isMainTab, }: {
|
|
8
|
+
export declare const makePage: ({ context, initialFrame, browserReplacer, logLevel, indent, pagesArray, onBrowserLog, scale, timeoutInMilliseconds, composition, proxyPort, serveUrl, muted, envVariables, serializedInputPropsWithCustomSchema, imageFormat, serializedResolvedPropsWithCustomSchema, pageIndex, isMainTab, mediaCacheSizeInBytes, }: {
|
|
9
9
|
context: SourceMapGetter;
|
|
10
10
|
initialFrame: number;
|
|
11
11
|
browserReplacer: BrowserReplacer;
|
|
@@ -25,4 +25,5 @@ export declare const makePage: ({ context, initialFrame, browserReplacer, logLev
|
|
|
25
25
|
imageFormat: VideoImageFormat;
|
|
26
26
|
pageIndex: number;
|
|
27
27
|
isMainTab: boolean;
|
|
28
|
+
mediaCacheSizeInBytes: number | null;
|
|
28
29
|
}) => Promise<Page>;
|
package/dist/make-page.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makePage = void 0;
|
|
4
|
+
const get_available_memory_1 = require("./memory/get-available-memory");
|
|
4
5
|
const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
5
6
|
const set_props_and_env_1 = require("./set-props-and-env");
|
|
6
|
-
const makePage = async ({ context, initialFrame, browserReplacer, logLevel, indent, pagesArray, onBrowserLog, scale, timeoutInMilliseconds, composition, proxyPort, serveUrl, muted, envVariables, serializedInputPropsWithCustomSchema, imageFormat, serializedResolvedPropsWithCustomSchema, pageIndex, isMainTab, }) => {
|
|
7
|
+
const makePage = async ({ context, initialFrame, browserReplacer, logLevel, indent, pagesArray, onBrowserLog, scale, timeoutInMilliseconds, composition, proxyPort, serveUrl, muted, envVariables, serializedInputPropsWithCustomSchema, imageFormat, serializedResolvedPropsWithCustomSchema, pageIndex, isMainTab, mediaCacheSizeInBytes, }) => {
|
|
7
8
|
const page = await browserReplacer
|
|
8
9
|
.getBrowser()
|
|
9
10
|
.newPage({ context, logLevel, indent, pageIndex, onBrowserLog });
|
|
@@ -28,6 +29,8 @@ const makePage = async ({ context, initialFrame, browserReplacer, logLevel, inde
|
|
|
28
29
|
logLevel,
|
|
29
30
|
onServeUrlVisited: () => undefined,
|
|
30
31
|
isMainTab,
|
|
32
|
+
mediaCacheSizeInBytes,
|
|
33
|
+
initialMemoryAvailable: (0, get_available_memory_1.getAvailableMemory)(logLevel),
|
|
31
34
|
});
|
|
32
35
|
await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
|
|
33
36
|
// eslint-disable-next-line max-params
|
package/dist/options/index.d.ts
CHANGED
|
@@ -724,6 +724,24 @@ export declare const allOptions: {
|
|
|
724
724
|
};
|
|
725
725
|
setConfig: (pattern: string | null) => void;
|
|
726
726
|
};
|
|
727
|
+
mediaCacheSizeInBytesOption: {
|
|
728
|
+
name: string;
|
|
729
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
730
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
731
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
732
|
+
docLink: string;
|
|
733
|
+
type: number | null;
|
|
734
|
+
getValue: ({ commandLine }: {
|
|
735
|
+
commandLine: Record<string, unknown>;
|
|
736
|
+
}) => {
|
|
737
|
+
source: string;
|
|
738
|
+
value: number;
|
|
739
|
+
} | {
|
|
740
|
+
source: string;
|
|
741
|
+
value: null;
|
|
742
|
+
};
|
|
743
|
+
setConfig: (size: number | null) => void;
|
|
744
|
+
};
|
|
727
745
|
};
|
|
728
746
|
export type AvailableOptions = keyof typeof allOptions;
|
|
729
747
|
export type TypeOfOption<Type> = Type extends AnyRemotionOption<infer X> ? X : never;
|
package/dist/options/index.js
CHANGED
|
@@ -43,6 +43,7 @@ const separate_audio_1 = require("./separate-audio");
|
|
|
43
43
|
const throw_if_site_exists_1 = require("./throw-if-site-exists");
|
|
44
44
|
const timeout_1 = require("./timeout");
|
|
45
45
|
const video_bitrate_1 = require("./video-bitrate");
|
|
46
|
+
const video_cache_size_1 = require("./video-cache-size");
|
|
46
47
|
const video_codec_1 = require("./video-codec");
|
|
47
48
|
const webhook_custom_data_1 = require("./webhook-custom-data");
|
|
48
49
|
const x264_preset_1 = require("./x264-preset");
|
|
@@ -92,4 +93,5 @@ exports.allOptions = {
|
|
|
92
93
|
audioLatencyHintOption: latency_hint_1.audioLatencyHintOption,
|
|
93
94
|
enableCrossSiteIsolationOption: cross_site_isolation_1.enableCrossSiteIsolationOption,
|
|
94
95
|
imageSequencePatternOption: image_sequence_pattern_1.imageSequencePatternOption,
|
|
96
|
+
mediaCacheSizeInBytesOption: video_cache_size_1.mediaCacheSizeInBytesOption,
|
|
95
97
|
};
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
export declare const optionsMap: {
|
|
2
2
|
readonly renderMedia: {
|
|
3
|
+
readonly mediaCacheSizeInBytes: {
|
|
4
|
+
name: string;
|
|
5
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
6
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
8
|
+
docLink: string;
|
|
9
|
+
type: number | null;
|
|
10
|
+
getValue: ({ commandLine }: {
|
|
11
|
+
commandLine: Record<string, unknown>;
|
|
12
|
+
}) => {
|
|
13
|
+
source: string;
|
|
14
|
+
value: number;
|
|
15
|
+
} | {
|
|
16
|
+
source: string;
|
|
17
|
+
value: null;
|
|
18
|
+
};
|
|
19
|
+
setConfig: (size: number | null) => void;
|
|
20
|
+
};
|
|
3
21
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
4
22
|
name: string;
|
|
5
23
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
@@ -413,6 +431,24 @@ export declare const optionsMap: {
|
|
|
413
431
|
};
|
|
414
432
|
};
|
|
415
433
|
readonly renderStill: {
|
|
434
|
+
readonly mediaCacheSizeInBytes: {
|
|
435
|
+
name: string;
|
|
436
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
437
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
438
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
439
|
+
docLink: string;
|
|
440
|
+
type: number | null;
|
|
441
|
+
getValue: ({ commandLine }: {
|
|
442
|
+
commandLine: Record<string, unknown>;
|
|
443
|
+
}) => {
|
|
444
|
+
source: string;
|
|
445
|
+
value: number;
|
|
446
|
+
} | {
|
|
447
|
+
source: string;
|
|
448
|
+
value: null;
|
|
449
|
+
};
|
|
450
|
+
setConfig: (size: number | null) => void;
|
|
451
|
+
};
|
|
416
452
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
417
453
|
name: string;
|
|
418
454
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
@@ -536,6 +572,24 @@ export declare const optionsMap: {
|
|
|
536
572
|
};
|
|
537
573
|
};
|
|
538
574
|
readonly getCompositions: {
|
|
575
|
+
readonly mediaCacheSizeInBytes: {
|
|
576
|
+
name: string;
|
|
577
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
578
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
579
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
580
|
+
docLink: string;
|
|
581
|
+
type: number | null;
|
|
582
|
+
getValue: ({ commandLine }: {
|
|
583
|
+
commandLine: Record<string, unknown>;
|
|
584
|
+
}) => {
|
|
585
|
+
source: string;
|
|
586
|
+
value: number;
|
|
587
|
+
} | {
|
|
588
|
+
source: string;
|
|
589
|
+
value: null;
|
|
590
|
+
};
|
|
591
|
+
setConfig: (size: number | null) => void;
|
|
592
|
+
};
|
|
539
593
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
540
594
|
name: string;
|
|
541
595
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
@@ -644,6 +698,24 @@ export declare const optionsMap: {
|
|
|
644
698
|
};
|
|
645
699
|
};
|
|
646
700
|
readonly selectComposition: {
|
|
701
|
+
readonly mediaCacheSizeInBytes: {
|
|
702
|
+
name: string;
|
|
703
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
704
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
705
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
706
|
+
docLink: string;
|
|
707
|
+
type: number | null;
|
|
708
|
+
getValue: ({ commandLine }: {
|
|
709
|
+
commandLine: Record<string, unknown>;
|
|
710
|
+
}) => {
|
|
711
|
+
source: string;
|
|
712
|
+
value: number;
|
|
713
|
+
} | {
|
|
714
|
+
source: string;
|
|
715
|
+
value: null;
|
|
716
|
+
};
|
|
717
|
+
setConfig: (size: number | null) => void;
|
|
718
|
+
};
|
|
647
719
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
648
720
|
name: string;
|
|
649
721
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
@@ -752,6 +824,24 @@ export declare const optionsMap: {
|
|
|
752
824
|
};
|
|
753
825
|
};
|
|
754
826
|
readonly renderFrames: {
|
|
827
|
+
readonly mediaCacheSizeInBytes: {
|
|
828
|
+
name: string;
|
|
829
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
830
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
831
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
832
|
+
docLink: string;
|
|
833
|
+
type: number | null;
|
|
834
|
+
getValue: ({ commandLine }: {
|
|
835
|
+
commandLine: Record<string, unknown>;
|
|
836
|
+
}) => {
|
|
837
|
+
source: string;
|
|
838
|
+
value: number;
|
|
839
|
+
} | {
|
|
840
|
+
source: string;
|
|
841
|
+
value: null;
|
|
842
|
+
};
|
|
843
|
+
setConfig: (size: number | null) => void;
|
|
844
|
+
};
|
|
755
845
|
readonly forSeamlessAacConcatenation: {
|
|
756
846
|
name: string;
|
|
757
847
|
cliFlag: "for-seamless-aac-concatenation";
|
|
@@ -908,6 +998,24 @@ export declare const optionsMap: {
|
|
|
908
998
|
};
|
|
909
999
|
};
|
|
910
1000
|
readonly renderMediaOnLambda: {
|
|
1001
|
+
readonly mediaCacheSizeInBytes: {
|
|
1002
|
+
name: string;
|
|
1003
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
1004
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1005
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
1006
|
+
docLink: string;
|
|
1007
|
+
type: number | null;
|
|
1008
|
+
getValue: ({ commandLine }: {
|
|
1009
|
+
commandLine: Record<string, unknown>;
|
|
1010
|
+
}) => {
|
|
1011
|
+
source: string;
|
|
1012
|
+
value: number;
|
|
1013
|
+
} | {
|
|
1014
|
+
source: string;
|
|
1015
|
+
value: null;
|
|
1016
|
+
};
|
|
1017
|
+
setConfig: (size: number | null) => void;
|
|
1018
|
+
};
|
|
911
1019
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
912
1020
|
name: string;
|
|
913
1021
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
@@ -1162,6 +1270,24 @@ export declare const optionsMap: {
|
|
|
1162
1270
|
};
|
|
1163
1271
|
};
|
|
1164
1272
|
readonly renderStillOnLambda: {
|
|
1273
|
+
readonly mediaCacheSizeInBytes: {
|
|
1274
|
+
name: string;
|
|
1275
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
1276
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1277
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
1278
|
+
docLink: string;
|
|
1279
|
+
type: number | null;
|
|
1280
|
+
getValue: ({ commandLine }: {
|
|
1281
|
+
commandLine: Record<string, unknown>;
|
|
1282
|
+
}) => {
|
|
1283
|
+
source: string;
|
|
1284
|
+
value: number;
|
|
1285
|
+
} | {
|
|
1286
|
+
source: string;
|
|
1287
|
+
value: null;
|
|
1288
|
+
};
|
|
1289
|
+
setConfig: (size: number | null) => void;
|
|
1290
|
+
};
|
|
1165
1291
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
1166
1292
|
name: string;
|
|
1167
1293
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
@@ -1293,11 +1419,11 @@ export declare const optionsMap: {
|
|
|
1293
1419
|
};
|
|
1294
1420
|
};
|
|
1295
1421
|
readonly getCompositionsOnLambda: {
|
|
1296
|
-
readonly
|
|
1422
|
+
readonly mediaCacheSizeInBytes: {
|
|
1297
1423
|
name: string;
|
|
1298
|
-
cliFlag: "
|
|
1424
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
1299
1425
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1300
|
-
ssrName: "
|
|
1426
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
1301
1427
|
docLink: string;
|
|
1302
1428
|
type: number | null;
|
|
1303
1429
|
getValue: ({ commandLine }: {
|
|
@@ -1311,11 +1437,11 @@ export declare const optionsMap: {
|
|
|
1311
1437
|
};
|
|
1312
1438
|
setConfig: (size: number | null) => void;
|
|
1313
1439
|
};
|
|
1314
|
-
readonly
|
|
1440
|
+
readonly offthreadVideoCacheSizeInBytes: {
|
|
1315
1441
|
name: string;
|
|
1316
|
-
cliFlag: "offthreadvideo-
|
|
1442
|
+
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
1317
1443
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1318
|
-
ssrName: "
|
|
1444
|
+
ssrName: "offthreadVideoCacheSizeInBytes";
|
|
1319
1445
|
docLink: string;
|
|
1320
1446
|
type: number | null;
|
|
1321
1447
|
getValue: ({ commandLine }: {
|
|
@@ -1361,6 +1487,24 @@ export declare const optionsMap: {
|
|
|
1361
1487
|
};
|
|
1362
1488
|
};
|
|
1363
1489
|
readonly renderMediaOnCloudRun: {
|
|
1490
|
+
readonly mediaCacheSizeInBytes: {
|
|
1491
|
+
name: string;
|
|
1492
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
1493
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1494
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
1495
|
+
docLink: string;
|
|
1496
|
+
type: number | null;
|
|
1497
|
+
getValue: ({ commandLine }: {
|
|
1498
|
+
commandLine: Record<string, unknown>;
|
|
1499
|
+
}) => {
|
|
1500
|
+
source: string;
|
|
1501
|
+
value: number;
|
|
1502
|
+
} | {
|
|
1503
|
+
source: string;
|
|
1504
|
+
value: null;
|
|
1505
|
+
};
|
|
1506
|
+
setConfig: (size: number | null) => void;
|
|
1507
|
+
};
|
|
1364
1508
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
1365
1509
|
name: string;
|
|
1366
1510
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
@@ -1645,6 +1789,24 @@ export declare const optionsMap: {
|
|
|
1645
1789
|
};
|
|
1646
1790
|
};
|
|
1647
1791
|
readonly renderStillOnCloudRun: {
|
|
1792
|
+
readonly mediaCacheSizeInBytes: {
|
|
1793
|
+
name: string;
|
|
1794
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
1795
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1796
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
1797
|
+
docLink: string;
|
|
1798
|
+
type: number | null;
|
|
1799
|
+
getValue: ({ commandLine }: {
|
|
1800
|
+
commandLine: Record<string, unknown>;
|
|
1801
|
+
}) => {
|
|
1802
|
+
source: string;
|
|
1803
|
+
value: number;
|
|
1804
|
+
} | {
|
|
1805
|
+
source: string;
|
|
1806
|
+
value: null;
|
|
1807
|
+
};
|
|
1808
|
+
setConfig: (size: number | null) => void;
|
|
1809
|
+
};
|
|
1648
1810
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
1649
1811
|
name: string;
|
|
1650
1812
|
cliFlag: "offthreadvideo-cache-size-in-bytes";
|
|
@@ -30,10 +30,12 @@ const separate_audio_1 = require("./separate-audio");
|
|
|
30
30
|
const throw_if_site_exists_1 = require("./throw-if-site-exists");
|
|
31
31
|
const timeout_1 = require("./timeout");
|
|
32
32
|
const video_bitrate_1 = require("./video-bitrate");
|
|
33
|
+
const video_cache_size_1 = require("./video-cache-size");
|
|
33
34
|
const video_codec_1 = require("./video-codec");
|
|
34
35
|
const x264_preset_1 = require("./x264-preset");
|
|
35
36
|
exports.optionsMap = {
|
|
36
37
|
renderMedia: {
|
|
38
|
+
mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
|
|
37
39
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
38
40
|
offthreadVideoThreads: offthreadvideo_threads_1.offthreadVideoThreadsOption,
|
|
39
41
|
videoBitrate: video_bitrate_1.videoBitrateOption,
|
|
@@ -63,6 +65,7 @@ exports.optionsMap = {
|
|
|
63
65
|
hardwareAcceleration: hardware_acceleration_1.hardwareAccelerationOption,
|
|
64
66
|
},
|
|
65
67
|
renderStill: {
|
|
68
|
+
mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
|
|
66
69
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
67
70
|
offthreadVideoThreads: offthreadvideo_threads_1.offthreadVideoThreadsOption,
|
|
68
71
|
jpegQuality: jpeg_quality_1.jpegQualityOption,
|
|
@@ -73,6 +76,7 @@ exports.optionsMap = {
|
|
|
73
76
|
chromeMode: chrome_mode_1.chromeModeOption,
|
|
74
77
|
},
|
|
75
78
|
getCompositions: {
|
|
79
|
+
mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
|
|
76
80
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
77
81
|
offthreadVideoThreads: offthreadvideo_threads_1.offthreadVideoThreadsOption,
|
|
78
82
|
logLevel: log_level_1.logLevelOption,
|
|
@@ -82,6 +86,7 @@ exports.optionsMap = {
|
|
|
82
86
|
chromeMode: chrome_mode_1.chromeModeOption,
|
|
83
87
|
},
|
|
84
88
|
selectComposition: {
|
|
89
|
+
mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
|
|
85
90
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
86
91
|
offthreadVideoThreads: offthreadvideo_threads_1.offthreadVideoThreadsOption,
|
|
87
92
|
logLevel: log_level_1.logLevelOption,
|
|
@@ -91,6 +96,7 @@ exports.optionsMap = {
|
|
|
91
96
|
chromeMode: chrome_mode_1.chromeModeOption,
|
|
92
97
|
},
|
|
93
98
|
renderFrames: {
|
|
99
|
+
mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
|
|
94
100
|
forSeamlessAacConcatenation: for_seamless_aac_concatenation_1.forSeamlessAacConcatenationOption,
|
|
95
101
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
96
102
|
offthreadVideoThreads: offthreadvideo_threads_1.offthreadVideoThreadsOption,
|
|
@@ -103,6 +109,7 @@ exports.optionsMap = {
|
|
|
103
109
|
imageSequencePattern: image_sequence_pattern_1.imageSequencePatternOption,
|
|
104
110
|
},
|
|
105
111
|
renderMediaOnLambda: {
|
|
112
|
+
mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
|
|
106
113
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
107
114
|
offthreadVideoThreads: offthreadvideo_threads_1.offthreadVideoThreadsOption,
|
|
108
115
|
videoBitrate: video_bitrate_1.videoBitrateOption,
|
|
@@ -120,6 +127,7 @@ exports.optionsMap = {
|
|
|
120
127
|
apiKey: api_key_1.apiKeyOption,
|
|
121
128
|
},
|
|
122
129
|
renderStillOnLambda: {
|
|
130
|
+
mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
|
|
123
131
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
124
132
|
offthreadVideoThreads: offthreadvideo_threads_1.offthreadVideoThreadsOption,
|
|
125
133
|
jpegQuality: jpeg_quality_1.jpegQualityOption,
|
|
@@ -130,12 +138,13 @@ exports.optionsMap = {
|
|
|
130
138
|
apiKey: api_key_1.apiKeyOption,
|
|
131
139
|
},
|
|
132
140
|
getCompositionsOnLambda: {
|
|
141
|
+
mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
|
|
133
142
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
134
|
-
offthreadVideoThreads: offthreadvideo_threads_1.offthreadVideoThreadsOption,
|
|
135
143
|
logLevel: log_level_1.logLevelOption,
|
|
136
144
|
timeoutInMilliseconds: timeout_1.delayRenderTimeoutInMillisecondsOption,
|
|
137
145
|
},
|
|
138
146
|
renderMediaOnCloudRun: {
|
|
147
|
+
mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
|
|
139
148
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
140
149
|
offthreadVideoThreads: offthreadvideo_threads_1.offthreadVideoThreadsOption,
|
|
141
150
|
numberOfGifLoops: number_of_gif_loops_1.numberOfGifLoopsOption,
|
|
@@ -155,6 +164,7 @@ exports.optionsMap = {
|
|
|
155
164
|
jpegQuality: jpeg_quality_1.jpegQualityOption,
|
|
156
165
|
},
|
|
157
166
|
renderStillOnCloudRun: {
|
|
167
|
+
mediaCacheSizeInBytes: video_cache_size_1.mediaCacheSizeInBytesOption,
|
|
158
168
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
159
169
|
offthreadVideoThreads: offthreadvideo_threads_1.offthreadVideoThreadsOption,
|
|
160
170
|
logLevel: log_level_1.logLevelOption,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const getMediaCacheSizeInBytes: () => number | null;
|
|
2
|
+
export declare const mediaCacheSizeInBytesOption: {
|
|
3
|
+
name: string;
|
|
4
|
+
cliFlag: "media-cache-size-in-bytes";
|
|
5
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
ssrName: "mediaCacheSizeInBytes";
|
|
7
|
+
docLink: string;
|
|
8
|
+
type: number | null;
|
|
9
|
+
getValue: ({ commandLine }: {
|
|
10
|
+
commandLine: Record<string, unknown>;
|
|
11
|
+
}) => {
|
|
12
|
+
source: string;
|
|
13
|
+
value: number;
|
|
14
|
+
} | {
|
|
15
|
+
source: string;
|
|
16
|
+
value: null;
|
|
17
|
+
};
|
|
18
|
+
setConfig: (size: number | null) => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mediaCacheSizeInBytesOption = exports.getMediaCacheSizeInBytes = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
let mediaCacheSizeInBytes = null;
|
|
6
|
+
const getMediaCacheSizeInBytes = () => {
|
|
7
|
+
return mediaCacheSizeInBytes;
|
|
8
|
+
};
|
|
9
|
+
exports.getMediaCacheSizeInBytes = getMediaCacheSizeInBytes;
|
|
10
|
+
const cliFlag = 'media-cache-size-in-bytes';
|
|
11
|
+
exports.mediaCacheSizeInBytesOption = {
|
|
12
|
+
name: '@remotion/media cache size',
|
|
13
|
+
cliFlag,
|
|
14
|
+
description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Specify the maximum size of the cache that ", (0, jsx_runtime_1.jsx)("code", { children: "<Video>" }), " and", ' ', (0, jsx_runtime_1.jsx)("code", { children: "<Audio>" }), " from ", (0, jsx_runtime_1.jsx)("code", { children: "@remotion/media" }), " may use combined, in bytes. ", (0, jsx_runtime_1.jsx)("br", {}), "The default is half of the available system memory when the render starts."] })),
|
|
15
|
+
ssrName: 'mediaCacheSizeInBytes',
|
|
16
|
+
docLink: 'https://www.remotion.dev/docs/media/video#setting-the-cache-size',
|
|
17
|
+
type: 0,
|
|
18
|
+
getValue: ({ commandLine }) => {
|
|
19
|
+
if (commandLine[cliFlag] !== undefined) {
|
|
20
|
+
return {
|
|
21
|
+
source: 'cli',
|
|
22
|
+
value: commandLine[cliFlag],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
if (mediaCacheSizeInBytes !== null) {
|
|
26
|
+
return {
|
|
27
|
+
source: 'config',
|
|
28
|
+
value: mediaCacheSizeInBytes,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
source: 'default',
|
|
33
|
+
value: null,
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
setConfig: (size) => {
|
|
37
|
+
mediaCacheSizeInBytes = size !== null && size !== void 0 ? size : null;
|
|
38
|
+
},
|
|
39
|
+
};
|
package/dist/render-frames.js
CHANGED
|
@@ -34,7 +34,7 @@ const validate_1 = require("./validate");
|
|
|
34
34
|
const validate_scale_1 = require("./validate-scale");
|
|
35
35
|
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
36
36
|
const MAX_RETRIES_PER_FRAME = 1;
|
|
37
|
-
const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, jpegQuality, imageFormat, frameRange, onError, envVariables, onBrowserLog, onFrameBuffer, onDownload, pagesArray, serveUrl, composition, timeoutInMilliseconds, scale, resolvedConcurrency, everyNthFrame, proxyPort, cancelSignal, downloadMap, muted, makeBrowser, browserReplacer, sourceMapGetter, logLevel, indent, parallelEncodingEnabled, compositionStart, forSeamlessAacConcatenation, onArtifact, binariesDirectory, imageSequencePattern, }) => {
|
|
37
|
+
const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, jpegQuality, imageFormat, frameRange, onError, envVariables, onBrowserLog, onFrameBuffer, onDownload, pagesArray, serveUrl, composition, timeoutInMilliseconds, scale, resolvedConcurrency, everyNthFrame, proxyPort, cancelSignal, downloadMap, muted, makeBrowser, browserReplacer, sourceMapGetter, logLevel, indent, parallelEncodingEnabled, compositionStart, forSeamlessAacConcatenation, onArtifact, binariesDirectory, imageSequencePattern, mediaCacheSizeInBytes, }) => {
|
|
38
38
|
if (outputDir) {
|
|
39
39
|
if (!node_fs_1.default.existsSync(outputDir)) {
|
|
40
40
|
node_fs_1.default.mkdirSync(outputDir, {
|
|
@@ -74,6 +74,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
74
74
|
timeoutInMilliseconds,
|
|
75
75
|
pageIndex,
|
|
76
76
|
isMainTab: pageIndex === 0,
|
|
77
|
+
mediaCacheSizeInBytes,
|
|
77
78
|
});
|
|
78
79
|
};
|
|
79
80
|
const getPool = async () => {
|
|
@@ -192,7 +193,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
192
193
|
frameCount: framesToRender.length,
|
|
193
194
|
};
|
|
194
195
|
};
|
|
195
|
-
const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOptions, composition, concurrency, envVariables, everyNthFrame, frameRange, imageFormat, indent, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, onFrameUpdate, onStart, outputDir, port, puppeteerInstance, scale, server, timeoutInMilliseconds, logLevel, webpackBundleOrServeUrl, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, parallelEncodingEnabled, binariesDirectory, forSeamlessAacConcatenation, compositionStart, onBrowserDownload, onArtifact, chromeMode, offthreadVideoThreads, imageSequencePattern, }) => {
|
|
196
|
+
const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOptions, composition, concurrency, envVariables, everyNthFrame, frameRange, imageFormat, indent, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, onFrameUpdate, onStart, outputDir, port, puppeteerInstance, scale, server, timeoutInMilliseconds, logLevel, webpackBundleOrServeUrl, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, parallelEncodingEnabled, binariesDirectory, forSeamlessAacConcatenation, compositionStart, onBrowserDownload, onArtifact, chromeMode, offthreadVideoThreads, imageSequencePattern, mediaCacheSizeInBytes, }) => {
|
|
196
197
|
(0, validate_1.validateDimension)(composition.height, 'height', 'in the `config` object passed to `renderFrames()`');
|
|
197
198
|
(0, validate_1.validateDimension)(composition.width, 'width', 'in the `config` object passed to `renderFrames()`');
|
|
198
199
|
(0, validate_1.validateFps)(composition.fps, 'in the `config` object of `renderFrames()`', false);
|
|
@@ -295,6 +296,7 @@ const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOpti
|
|
|
295
296
|
chromeMode,
|
|
296
297
|
offthreadVideoThreads,
|
|
297
298
|
imageSequencePattern,
|
|
299
|
+
mediaCacheSizeInBytes,
|
|
298
300
|
});
|
|
299
301
|
}),
|
|
300
302
|
])
|
|
@@ -343,7 +345,7 @@ exports.internalRenderFrames = (0, wrap_with_error_handling_1.wrapWithErrorHandl
|
|
|
343
345
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-frames)
|
|
344
346
|
*/
|
|
345
347
|
const renderFrames = (options) => {
|
|
346
|
-
const { composition, inputProps, onFrameUpdate, onStart, outputDir, serveUrl, browserExecutable, cancelSignal, chromiumOptions, concurrency, dumpBrowserLogs, envVariables, everyNthFrame, frameRange, imageFormat, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, port, puppeteerInstance, scale, timeoutInMilliseconds, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, onArtifact, chromeMode, offthreadVideoThreads, imageSequencePattern, } = options;
|
|
348
|
+
const { composition, inputProps, onFrameUpdate, onStart, outputDir, serveUrl, browserExecutable, cancelSignal, chromiumOptions, concurrency, dumpBrowserLogs, envVariables, everyNthFrame, frameRange, imageFormat, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, port, puppeteerInstance, scale, timeoutInMilliseconds, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, onArtifact, chromeMode, offthreadVideoThreads, imageSequencePattern, mediaCacheSizeInBytes, } = options;
|
|
347
349
|
if (!composition) {
|
|
348
350
|
throw new Error('No `composition` option has been specified for renderFrames()');
|
|
349
351
|
}
|
|
@@ -401,6 +403,7 @@ const renderFrames = (options) => {
|
|
|
401
403
|
chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
|
|
402
404
|
offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : null,
|
|
403
405
|
imageSequencePattern: imageSequencePattern !== null && imageSequencePattern !== void 0 ? imageSequencePattern : null,
|
|
406
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
|
|
404
407
|
});
|
|
405
408
|
};
|
|
406
409
|
exports.renderFrames = renderFrames;
|
package/dist/render-media.d.ts
CHANGED
|
@@ -129,5 +129,5 @@ type RenderMediaResult = {
|
|
|
129
129
|
slowestFrames: SlowFrame[];
|
|
130
130
|
};
|
|
131
131
|
export declare const internalRenderMedia: (args_0: InternalRenderMediaOptions) => Promise<RenderMediaResult>;
|
|
132
|
-
export declare const renderMedia: ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, compositionStart, }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
|
132
|
+
export declare const renderMedia: ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, compositionStart, mediaCacheSizeInBytes, }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
|
133
133
|
export {};
|