@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/esm/client.mjs
CHANGED
|
@@ -2574,6 +2574,59 @@ var videoBitrateOption = {
|
|
|
2574
2574
|
}
|
|
2575
2575
|
};
|
|
2576
2576
|
|
|
2577
|
+
// src/options/video-cache-size.tsx
|
|
2578
|
+
import { jsx as jsx38, jsxs as jsxs31, Fragment as Fragment38 } from "react/jsx-runtime";
|
|
2579
|
+
var mediaCacheSizeInBytes = null;
|
|
2580
|
+
var cliFlag43 = "media-cache-size-in-bytes";
|
|
2581
|
+
var mediaCacheSizeInBytesOption = {
|
|
2582
|
+
name: "@remotion/media cache size",
|
|
2583
|
+
cliFlag: cliFlag43,
|
|
2584
|
+
description: () => /* @__PURE__ */ jsxs31(Fragment38, {
|
|
2585
|
+
children: [
|
|
2586
|
+
"Specify the maximum size of the cache that ",
|
|
2587
|
+
/* @__PURE__ */ jsx38("code", {
|
|
2588
|
+
children: "<Video>"
|
|
2589
|
+
}),
|
|
2590
|
+
" and",
|
|
2591
|
+
" ",
|
|
2592
|
+
/* @__PURE__ */ jsx38("code", {
|
|
2593
|
+
children: "<Audio>"
|
|
2594
|
+
}),
|
|
2595
|
+
" from ",
|
|
2596
|
+
/* @__PURE__ */ jsx38("code", {
|
|
2597
|
+
children: "@remotion/media"
|
|
2598
|
+
}),
|
|
2599
|
+
" may use combined, in bytes. ",
|
|
2600
|
+
/* @__PURE__ */ jsx38("br", {}),
|
|
2601
|
+
"The default is half of the available system memory when the render starts."
|
|
2602
|
+
]
|
|
2603
|
+
}),
|
|
2604
|
+
ssrName: "mediaCacheSizeInBytes",
|
|
2605
|
+
docLink: "https://www.remotion.dev/docs/media/video#setting-the-cache-size",
|
|
2606
|
+
type: 0,
|
|
2607
|
+
getValue: ({ commandLine }) => {
|
|
2608
|
+
if (commandLine[cliFlag43] !== undefined) {
|
|
2609
|
+
return {
|
|
2610
|
+
source: "cli",
|
|
2611
|
+
value: commandLine[cliFlag43]
|
|
2612
|
+
};
|
|
2613
|
+
}
|
|
2614
|
+
if (mediaCacheSizeInBytes !== null) {
|
|
2615
|
+
return {
|
|
2616
|
+
source: "config",
|
|
2617
|
+
value: mediaCacheSizeInBytes
|
|
2618
|
+
};
|
|
2619
|
+
}
|
|
2620
|
+
return {
|
|
2621
|
+
source: "default",
|
|
2622
|
+
value: null
|
|
2623
|
+
};
|
|
2624
|
+
},
|
|
2625
|
+
setConfig: (size) => {
|
|
2626
|
+
mediaCacheSizeInBytes = size ?? null;
|
|
2627
|
+
}
|
|
2628
|
+
};
|
|
2629
|
+
|
|
2577
2630
|
// src/path-normalize.ts
|
|
2578
2631
|
var SLASH = 47;
|
|
2579
2632
|
var DOT = 46;
|
|
@@ -2690,7 +2743,7 @@ var getExtensionOfFilename = (filename) => {
|
|
|
2690
2743
|
};
|
|
2691
2744
|
|
|
2692
2745
|
// src/options/video-codec.tsx
|
|
2693
|
-
import { jsx as
|
|
2746
|
+
import { jsx as jsx39, Fragment as Fragment39 } from "react/jsx-runtime";
|
|
2694
2747
|
var codec;
|
|
2695
2748
|
var setCodec = (newCodec) => {
|
|
2696
2749
|
if (newCodec === undefined) {
|
|
@@ -2714,11 +2767,11 @@ var deriveCodecsFromFilename = (extension) => {
|
|
|
2714
2767
|
possible: makeFileExtensionMap()[extension] ?? []
|
|
2715
2768
|
};
|
|
2716
2769
|
};
|
|
2717
|
-
var
|
|
2770
|
+
var cliFlag44 = "codec";
|
|
2718
2771
|
var videoCodecOption = {
|
|
2719
2772
|
name: "Codec",
|
|
2720
|
-
cliFlag:
|
|
2721
|
-
description: () => /* @__PURE__ */
|
|
2773
|
+
cliFlag: cliFlag44,
|
|
2774
|
+
description: () => /* @__PURE__ */ jsx39(Fragment39, {
|
|
2722
2775
|
children: "H264 works well in most cases, but sometimes it's worth going for a different codec. WebM achieves higher compression but is slower to render. WebM, GIF and ProRes support transparency."
|
|
2723
2776
|
}),
|
|
2724
2777
|
ssrName: "codec",
|
|
@@ -2741,7 +2794,7 @@ var videoCodecOption = {
|
|
|
2741
2794
|
if (derivedDownloadCodecs.possible.length > 0 && derivedOutNameCodecs.possible.length > 0 && derivedDownloadCodecs.possible.join("") !== derivedOutNameCodecs.possible.join("")) {
|
|
2742
2795
|
throw new TypeError(`The download name is ${downloadName} but the output name is ${outName}. The file extensions must match`);
|
|
2743
2796
|
}
|
|
2744
|
-
const cliArgument = commandLine[
|
|
2797
|
+
const cliArgument = commandLine[cliFlag44];
|
|
2745
2798
|
if (cliArgument) {
|
|
2746
2799
|
if (derivedDownloadCodecs.possible.length > 0 && derivedDownloadCodecs.possible.indexOf(cliArgument) === -1) {
|
|
2747
2800
|
throw new TypeError(`The download name is ${downloadName} but --codec=${cliArgument} was passed. The download name implies a codec of ${derivedDownloadCodecs.possible.join(" or ")} which does not align with the --codec flag.`);
|
|
@@ -2790,12 +2843,12 @@ var videoCodecOption = {
|
|
|
2790
2843
|
};
|
|
2791
2844
|
|
|
2792
2845
|
// src/options/webhook-custom-data.tsx
|
|
2793
|
-
import { jsxs as
|
|
2794
|
-
var
|
|
2846
|
+
import { jsxs as jsxs32, Fragment as Fragment40 } from "react/jsx-runtime";
|
|
2847
|
+
var cliFlag45 = "webhook-custom-data";
|
|
2795
2848
|
var webhookCustomDataOption = {
|
|
2796
2849
|
name: "Webhook custom data",
|
|
2797
|
-
cliFlag:
|
|
2798
|
-
description: (type) => /* @__PURE__ */
|
|
2850
|
+
cliFlag: cliFlag45,
|
|
2851
|
+
description: (type) => /* @__PURE__ */ jsxs32(Fragment40, {
|
|
2799
2852
|
children: [
|
|
2800
2853
|
"Pass up to 1,024 bytes of a JSON-serializable object to the webhook. This data will be included in the webhook payload.",
|
|
2801
2854
|
" ",
|
|
@@ -2814,7 +2867,7 @@ var webhookCustomDataOption = {
|
|
|
2814
2867
|
};
|
|
2815
2868
|
|
|
2816
2869
|
// src/options/x264-preset.tsx
|
|
2817
|
-
import { jsx as
|
|
2870
|
+
import { jsx as jsx40, jsxs as jsxs33, Fragment as Fragment41 } from "react/jsx-runtime";
|
|
2818
2871
|
var x264PresetOptions = [
|
|
2819
2872
|
"ultrafast",
|
|
2820
2873
|
"superfast",
|
|
@@ -2828,63 +2881,63 @@ var x264PresetOptions = [
|
|
|
2828
2881
|
"placebo"
|
|
2829
2882
|
];
|
|
2830
2883
|
var preset = null;
|
|
2831
|
-
var
|
|
2884
|
+
var cliFlag46 = "x264-preset";
|
|
2832
2885
|
var DEFAULT_PRESET = "medium";
|
|
2833
2886
|
var x264Option = {
|
|
2834
2887
|
name: "x264 Preset",
|
|
2835
|
-
cliFlag:
|
|
2836
|
-
description: () => /* @__PURE__ */
|
|
2888
|
+
cliFlag: cliFlag46,
|
|
2889
|
+
description: () => /* @__PURE__ */ jsxs33(Fragment41, {
|
|
2837
2890
|
children: [
|
|
2838
2891
|
"Sets a x264 preset profile. Only applies to videos rendered with",
|
|
2839
2892
|
" ",
|
|
2840
|
-
/* @__PURE__ */
|
|
2893
|
+
/* @__PURE__ */ jsx40("code", {
|
|
2841
2894
|
children: "h264"
|
|
2842
2895
|
}),
|
|
2843
2896
|
" codec.",
|
|
2844
|
-
/* @__PURE__ */
|
|
2897
|
+
/* @__PURE__ */ jsx40("br", {}),
|
|
2845
2898
|
"Possible values: ",
|
|
2846
|
-
/* @__PURE__ */
|
|
2899
|
+
/* @__PURE__ */ jsx40("code", {
|
|
2847
2900
|
children: "superfast"
|
|
2848
2901
|
}),
|
|
2849
2902
|
", ",
|
|
2850
|
-
/* @__PURE__ */
|
|
2903
|
+
/* @__PURE__ */ jsx40("code", {
|
|
2851
2904
|
children: "veryfast"
|
|
2852
2905
|
}),
|
|
2853
2906
|
",",
|
|
2854
2907
|
" ",
|
|
2855
|
-
/* @__PURE__ */
|
|
2908
|
+
/* @__PURE__ */ jsx40("code", {
|
|
2856
2909
|
children: "faster"
|
|
2857
2910
|
}),
|
|
2858
2911
|
", ",
|
|
2859
|
-
/* @__PURE__ */
|
|
2912
|
+
/* @__PURE__ */ jsx40("code", {
|
|
2860
2913
|
children: "fast"
|
|
2861
2914
|
}),
|
|
2862
2915
|
", ",
|
|
2863
|
-
/* @__PURE__ */
|
|
2916
|
+
/* @__PURE__ */ jsx40("code", {
|
|
2864
2917
|
children: "medium"
|
|
2865
2918
|
}),
|
|
2866
2919
|
",",
|
|
2867
2920
|
" ",
|
|
2868
|
-
/* @__PURE__ */
|
|
2921
|
+
/* @__PURE__ */ jsx40("code", {
|
|
2869
2922
|
children: "slow"
|
|
2870
2923
|
}),
|
|
2871
2924
|
", ",
|
|
2872
|
-
/* @__PURE__ */
|
|
2925
|
+
/* @__PURE__ */ jsx40("code", {
|
|
2873
2926
|
children: "slower"
|
|
2874
2927
|
}),
|
|
2875
2928
|
", ",
|
|
2876
|
-
/* @__PURE__ */
|
|
2929
|
+
/* @__PURE__ */ jsx40("code", {
|
|
2877
2930
|
children: "veryslow"
|
|
2878
2931
|
}),
|
|
2879
2932
|
",",
|
|
2880
2933
|
" ",
|
|
2881
|
-
/* @__PURE__ */
|
|
2934
|
+
/* @__PURE__ */ jsx40("code", {
|
|
2882
2935
|
children: "placebo"
|
|
2883
2936
|
}),
|
|
2884
2937
|
".",
|
|
2885
|
-
/* @__PURE__ */
|
|
2938
|
+
/* @__PURE__ */ jsx40("br", {}),
|
|
2886
2939
|
"Default: ",
|
|
2887
|
-
/* @__PURE__ */
|
|
2940
|
+
/* @__PURE__ */ jsx40("code", {
|
|
2888
2941
|
children: DEFAULT_PRESET
|
|
2889
2942
|
})
|
|
2890
2943
|
]
|
|
@@ -2893,7 +2946,7 @@ var x264Option = {
|
|
|
2893
2946
|
docLink: "https://www.remotion.dev/docs/renderer/render-media",
|
|
2894
2947
|
type: "fast",
|
|
2895
2948
|
getValue: ({ commandLine }) => {
|
|
2896
|
-
const value3 = commandLine[
|
|
2949
|
+
const value3 = commandLine[cliFlag46];
|
|
2897
2950
|
if (typeof value3 !== "undefined") {
|
|
2898
2951
|
return { value: value3, source: "cli" };
|
|
2899
2952
|
}
|
|
@@ -2953,12 +3006,14 @@ var allOptions = {
|
|
|
2953
3006
|
apiKeyOption,
|
|
2954
3007
|
audioLatencyHintOption,
|
|
2955
3008
|
enableCrossSiteIsolationOption,
|
|
2956
|
-
imageSequencePatternOption
|
|
3009
|
+
imageSequencePatternOption,
|
|
3010
|
+
mediaCacheSizeInBytesOption
|
|
2957
3011
|
};
|
|
2958
3012
|
|
|
2959
3013
|
// src/options/options-map.ts
|
|
2960
3014
|
var optionsMap = {
|
|
2961
3015
|
renderMedia: {
|
|
3016
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
2962
3017
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
2963
3018
|
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
2964
3019
|
videoBitrate: videoBitrateOption,
|
|
@@ -2988,6 +3043,7 @@ var optionsMap = {
|
|
|
2988
3043
|
hardwareAcceleration: hardwareAccelerationOption
|
|
2989
3044
|
},
|
|
2990
3045
|
renderStill: {
|
|
3046
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
2991
3047
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
2992
3048
|
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
2993
3049
|
jpegQuality: jpegQualityOption,
|
|
@@ -2998,6 +3054,7 @@ var optionsMap = {
|
|
|
2998
3054
|
chromeMode: chromeModeOption
|
|
2999
3055
|
},
|
|
3000
3056
|
getCompositions: {
|
|
3057
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3001
3058
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3002
3059
|
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3003
3060
|
logLevel: logLevelOption,
|
|
@@ -3007,6 +3064,7 @@ var optionsMap = {
|
|
|
3007
3064
|
chromeMode: chromeModeOption
|
|
3008
3065
|
},
|
|
3009
3066
|
selectComposition: {
|
|
3067
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3010
3068
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3011
3069
|
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3012
3070
|
logLevel: logLevelOption,
|
|
@@ -3016,6 +3074,7 @@ var optionsMap = {
|
|
|
3016
3074
|
chromeMode: chromeModeOption
|
|
3017
3075
|
},
|
|
3018
3076
|
renderFrames: {
|
|
3077
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3019
3078
|
forSeamlessAacConcatenation: forSeamlessAacConcatenationOption,
|
|
3020
3079
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3021
3080
|
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
@@ -3028,6 +3087,7 @@ var optionsMap = {
|
|
|
3028
3087
|
imageSequencePattern: imageSequencePatternOption
|
|
3029
3088
|
},
|
|
3030
3089
|
renderMediaOnLambda: {
|
|
3090
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3031
3091
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3032
3092
|
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3033
3093
|
videoBitrate: videoBitrateOption,
|
|
@@ -3045,6 +3105,7 @@ var optionsMap = {
|
|
|
3045
3105
|
apiKey: apiKeyOption
|
|
3046
3106
|
},
|
|
3047
3107
|
renderStillOnLambda: {
|
|
3108
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3048
3109
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3049
3110
|
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3050
3111
|
jpegQuality: jpegQualityOption,
|
|
@@ -3055,12 +3116,13 @@ var optionsMap = {
|
|
|
3055
3116
|
apiKey: apiKeyOption
|
|
3056
3117
|
},
|
|
3057
3118
|
getCompositionsOnLambda: {
|
|
3119
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3058
3120
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3059
|
-
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3060
3121
|
logLevel: logLevelOption,
|
|
3061
3122
|
timeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption
|
|
3062
3123
|
},
|
|
3063
3124
|
renderMediaOnCloudRun: {
|
|
3125
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3064
3126
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3065
3127
|
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3066
3128
|
numberOfGifLoops: numberOfGifLoopsOption,
|
|
@@ -3080,6 +3142,7 @@ var optionsMap = {
|
|
|
3080
3142
|
jpegQuality: jpegQualityOption
|
|
3081
3143
|
},
|
|
3082
3144
|
renderStillOnCloudRun: {
|
|
3145
|
+
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3083
3146
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3084
3147
|
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3085
3148
|
logLevel: logLevelOption,
|