@remotion/vercel 4.0.538 → 4.0.540

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.
@@ -115,6 +115,12 @@ import { statSync } from "fs";
115
115
  import { RenderInternals } from "@remotion/renderer";
116
116
 
117
117
  // ../core/dist/esm/no-react.mjs
118
+ var validatePreferredEffectBackend = (value) => {
119
+ if (value !== "auto" && value !== "webgpu" && value !== "webgl2" && value !== "2d") {
120
+ throw new TypeError(\`preferredEffectBackend must be "auto", "webgpu", "webgl2" or "2d", got \${String(value)}\`);
121
+ }
122
+ return value;
123
+ };
118
124
  var evaluateSourceNumericValue = (expression, config) => {
119
125
  if (typeof expression === "number") {
120
126
  return expression;
@@ -577,7 +583,7 @@ function spring({
577
583
  frame: durationProcessed,
578
584
  config
579
585
  });
580
- const inner = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;
586
+ const inner = config.overshootClamping ? Math.min(spr.current, 1) : spr.current;
581
587
  const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
582
588
  return interpolated;
583
589
  }
@@ -1113,6 +1119,20 @@ var interpolateSegment = ({
1113
1119
  output
1114
1120
  });
1115
1121
  };
1122
+ var getInputForInterpolation = ({
1123
+ input,
1124
+ inputRange,
1125
+ options
1126
+ }) => {
1127
+ const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
1128
+ const inputMin = inputRange[0];
1129
+ const inputMax = inputRange[inputRange.length - 1];
1130
+ if (inputRange.length === 1 || !(posterizedInput < inputMin && options?.extrapolateLeft === "wrap" || posterizedInput > inputMax && options?.extrapolateRight === "wrap")) {
1131
+ return posterizedInput;
1132
+ }
1133
+ const range = inputMax - inputMin;
1134
+ return ((posterizedInput - inputMin) % range + range) % range + inputMin;
1135
+ };
1116
1136
  var interpolateNumber = ({
1117
1137
  input,
1118
1138
  inputRange,
@@ -1132,14 +1152,18 @@ var interpolateNumber = ({
1132
1152
  if (options?.extrapolateRight !== undefined) {
1133
1153
  extrapolateRight = options.extrapolateRight;
1134
1154
  }
1135
- const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
1136
- const range = findRange(posterizedInput, inputRange);
1155
+ const resolvedInput = getInputForInterpolation({
1156
+ input,
1157
+ inputRange,
1158
+ options: options ?? null
1159
+ });
1160
+ const range = findRange(resolvedInput, inputRange);
1137
1161
  const easing = resolveEasingForSegment({
1138
1162
  easing: easingOption,
1139
1163
  segmentIndex: range
1140
1164
  });
1141
1165
  let result = interpolateSegment({
1142
- input: posterizedInput,
1166
+ input: resolvedInput,
1143
1167
  inputRange: [inputRange[range], inputRange[range + 1]],
1144
1168
  outputRange: [outputRange[range], outputRange[range + 1]],
1145
1169
  easing,
@@ -1156,11 +1180,11 @@ var interpolateNumber = ({
1156
1180
  continue;
1157
1181
  }
1158
1182
  const previousSegmentEnd = inputRange[segmentIndex + 1];
1159
- if (posterizedInput <= previousSegmentEnd) {
1183
+ if (resolvedInput <= previousSegmentEnd) {
1160
1184
  continue;
1161
1185
  }
1162
1186
  const continuedSegmentValue = interpolateSegment({
1163
- input: posterizedInput,
1187
+ input: resolvedInput,
1164
1188
  inputRange: [inputRange[segmentIndex], previousSegmentEnd],
1165
1189
  outputRange: [outputRange[segmentIndex], outputRange[segmentIndex + 1]],
1166
1190
  easing: previousEasing,
@@ -1181,8 +1205,12 @@ var interpolateString = ({
1181
1205
  }) => {
1182
1206
  const initiallyParsedOutputRange = outputRange.map((output) => parseStringInterpolationValue(output, outputType));
1183
1207
  const hasAxisRotation = initiallyParsedOutputRange.some((parsed) => parsed.axisRotation);
1184
- const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
1185
- const segmentIndex = inputRange.length === 1 ? 0 : findRange(posterizedInput, inputRange);
1208
+ const resolvedInput = getInputForInterpolation({
1209
+ input,
1210
+ inputRange,
1211
+ options: options ?? null
1212
+ });
1213
+ const segmentIndex = inputRange.length === 1 ? 0 : findRange(resolvedInput, inputRange);
1186
1214
  const parsedOutputRange = hasAxisRotation ? initiallyParsedOutputRange.map((parsed, index) => {
1187
1215
  if (parsed.kind !== "rotate") {
1188
1216
  return parsed;
@@ -1306,31 +1334,24 @@ var interpolateDiscreteValue = ({
1306
1334
  throw new TypeError(typeof outputRange[0] === "boolean" ? "Booleans can only be interpolated using Easing.step1" : "Non-numeric strings can only be interpolated using Easing.step1");
1307
1335
  }
1308
1336
  }
1309
- const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
1337
+ const resolvedInput = getInputForInterpolation({
1338
+ input,
1339
+ inputRange,
1340
+ options: options ?? null
1341
+ });
1310
1342
  const inputMin = inputRange[0];
1311
1343
  const inputMax = inputRange[inputRange.length - 1];
1312
- let resolvedInput = posterizedInput;
1313
1344
  if (resolvedInput < inputMin) {
1314
1345
  if (options?.extrapolateLeft === "identity") {
1315
1346
  throw new TypeError(typeof outputRange[0] === "boolean" ? 'extrapolateLeft: "identity" is not supported for booleans' : 'extrapolateLeft: "identity" is not supported for non-numeric strings');
1316
1347
  }
1317
- if (options?.extrapolateLeft === "wrap") {
1318
- const wrapRange = inputMax - inputMin;
1319
- resolvedInput = ((resolvedInput - inputMin) % wrapRange + wrapRange) % wrapRange + inputMin;
1320
- } else {
1321
- return outputRange[0];
1322
- }
1348
+ return outputRange[0];
1323
1349
  }
1324
1350
  if (resolvedInput > inputMax) {
1325
1351
  if (options?.extrapolateRight === "identity") {
1326
1352
  throw new TypeError(typeof outputRange[0] === "boolean" ? 'extrapolateRight: "identity" is not supported for booleans' : 'extrapolateRight: "identity" is not supported for non-numeric strings');
1327
1353
  }
1328
- if (options?.extrapolateRight === "wrap") {
1329
- const wrapRange = inputMax - inputMin;
1330
- resolvedInput = ((resolvedInput - inputMin) % wrapRange + wrapRange) % wrapRange + inputMin;
1331
- } else {
1332
- return outputRange[outputRange.length - 1];
1333
- }
1354
+ return outputRange[outputRange.length - 1];
1334
1355
  }
1335
1356
  const range = findRange(resolvedInput, inputRange);
1336
1357
  return resolvedInput >= inputRange[range + 1] ? outputRange[range + 1] : outputRange[range];
@@ -2100,14 +2121,16 @@ function parseModernComponent(str, percentScale) {
2100
2121
  function parseHueAngle(str) {
2101
2122
  if (str === "none")
2102
2123
  return 0;
2103
- if (str.endsWith("rad")) {
2104
- return Number.parseFloat(str) * 180 / Math.PI;
2105
- }
2106
- if (str.endsWith("grad"))
2107
- return Number.parseFloat(str) * 0.9;
2108
- if (str.endsWith("turn"))
2109
- return Number.parseFloat(str) * 360;
2110
- return Number.parseFloat(str);
2124
+ let degrees = Number.parseFloat(str);
2125
+ if (str.endsWith("grad")) {
2126
+ degrees *= 0.9;
2127
+ } else if (str.endsWith("rad")) {
2128
+ degrees = degrees * 180 / Math.PI;
2129
+ } else if (str.endsWith("turn")) {
2130
+ degrees *= 360;
2131
+ }
2132
+ const normalized = degrees % 360;
2133
+ return normalized < 0 ? (normalized + 360) % 360 : normalized;
2111
2134
  }
2112
2135
  function parseModernAlpha(str) {
2113
2136
  if (str === undefined || str === "none")
@@ -2485,6 +2508,39 @@ var serializeScaleValue = ([x, y, z]) => {
2485
2508
  function truthy(value) {
2486
2509
  return Boolean(value);
2487
2510
  }
2511
+ var validateSelectedFrames = ({
2512
+ frames,
2513
+ durationInFrames
2514
+ }) => {
2515
+ if (!Array.isArray(frames)) {
2516
+ throw new TypeError("The \`frames\` option must be an array of frame numbers.");
2517
+ }
2518
+ if (frames.length === 0) {
2519
+ throw new TypeError("The \`frames\` option must contain at least one frame.");
2520
+ }
2521
+ for (const frame of frames) {
2522
+ if (typeof frame !== "number") {
2523
+ throw new TypeError(\`The \\\`frames\\\` option must contain only numbers, but got \${typeof frame}.\`);
2524
+ }
2525
+ if (!Number.isFinite(frame)) {
2526
+ throw new TypeError(\`The \\\`frames\\\` option must contain only finite numbers, but got \${frame}.\`);
2527
+ }
2528
+ if (!Number.isInteger(frame)) {
2529
+ throw new TypeError(\`The \\\`frames\\\` option must contain only integers, but got \${frame}.\`);
2530
+ }
2531
+ if (frame < 0) {
2532
+ throw new TypeError(\`The \\\`frames\\\` option must contain only non-negative numbers, but got \${frame}.\`);
2533
+ }
2534
+ if (durationInFrames !== null && frame >= durationInFrames) {
2535
+ throw new RangeError(\`Frame \${frame} is out of range, must be between 0 and \${durationInFrames - 1}.\`);
2536
+ }
2537
+ }
2538
+ const uniqueFrames = new Set(frames);
2539
+ if (uniqueFrames.size !== frames.length) {
2540
+ throw new TypeError("The \`frames\` option must not contain duplicate frames.");
2541
+ }
2542
+ return [...frames].sort((a, b) => a - b);
2543
+ };
2488
2544
  var validCodecs = [
2489
2545
  "h264",
2490
2546
  "h265",
@@ -2581,6 +2637,7 @@ var getOffthreadVideoSource = ({
2581
2637
  return \`http://localhost:\${window.remotion_proxyPort}/proxy?src=\${encodeURIComponent(getAbsoluteSrc(src))}&time=\${encodeURIComponent(Math.max(0, currentTime))}&transparent=\${String(transparent)}&toneMapped=\${String(toneMapped)}\`;
2582
2638
  };
2583
2639
  var NoReactInternals = {
2640
+ validatePreferredEffectBackend,
2584
2641
  DEFAULT_PREMOUNT_IN_SECONDS,
2585
2642
  DEFAULT_STUDIO_PREMOUNT_IN_SECONDS,
2586
2643
  DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
@@ -2594,6 +2651,7 @@ var NoReactInternals = {
2594
2651
  validateDurationInFrames,
2595
2652
  validateDefaultAndInputProps,
2596
2653
  validateFrame,
2654
+ validateSelectedFrames,
2597
2655
  serializeJSONWithSpecialTypes,
2598
2656
  bundleName: "bundle.js",
2599
2657
  bundleMapName: "bundle.js.map",
@@ -2671,6 +2729,7 @@ try {
2671
2729
  }),
2672
2730
  chromeMode: config.chromeMode,
2673
2731
  mediaCacheSizeInBytes: config.mediaCacheSizeInBytes,
2732
+ preferredEffectBackend: config.preferredEffectBackend,
2674
2733
  offthreadVideoCacheSizeInBytes: config.offthreadVideoCacheSizeInBytes,
2675
2734
  offthreadVideoThreads: config.offthreadVideoThreads
2676
2735
  });
@@ -2699,8 +2758,10 @@ try {
2699
2758
  chromeMode: config.chromeMode,
2700
2759
  offthreadVideoCacheSizeInBytes: config.offthreadVideoCacheSizeInBytes,
2701
2760
  mediaCacheSizeInBytes: config.mediaCacheSizeInBytes,
2761
+ preferredEffectBackend: config.preferredEffectBackend,
2702
2762
  offthreadVideoThreads: config.offthreadVideoThreads,
2703
2763
  licenseKey: config.licenseKey,
2764
+ isProduction: config.isProduction,
2704
2765
  puppeteerInstance: browser,
2705
2766
  onBrowserLog: null,
2706
2767
  onDownload: null,
@@ -2710,7 +2771,6 @@ try {
2710
2771
  port: null,
2711
2772
  onArtifact: null,
2712
2773
  onLog: RenderInternals.defaultOnLog,
2713
- isProduction: true,
2714
2774
  onBrowserDownload: () => ({
2715
2775
  version: null,
2716
2776
  onProgress: noop
@@ -2734,6 +2794,12 @@ import { RenderInternals } from "@remotion/renderer";
2734
2794
  import { put } from "@vercel/blob";
2735
2795
 
2736
2796
  // ../core/dist/esm/no-react.mjs
2797
+ var validatePreferredEffectBackend = (value) => {
2798
+ if (value !== "auto" && value !== "webgpu" && value !== "webgl2" && value !== "2d") {
2799
+ throw new TypeError(\`preferredEffectBackend must be "auto", "webgpu", "webgl2" or "2d", got \${String(value)}\`);
2800
+ }
2801
+ return value;
2802
+ };
2737
2803
  var evaluateSourceNumericValue = (expression, config) => {
2738
2804
  if (typeof expression === "number") {
2739
2805
  return expression;
@@ -3196,7 +3262,7 @@ function spring({
3196
3262
  frame: durationProcessed,
3197
3263
  config
3198
3264
  });
3199
- const inner = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;
3265
+ const inner = config.overshootClamping ? Math.min(spr.current, 1) : spr.current;
3200
3266
  const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
3201
3267
  return interpolated;
3202
3268
  }
@@ -3732,6 +3798,20 @@ var interpolateSegment = ({
3732
3798
  output
3733
3799
  });
3734
3800
  };
3801
+ var getInputForInterpolation = ({
3802
+ input,
3803
+ inputRange,
3804
+ options
3805
+ }) => {
3806
+ const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
3807
+ const inputMin = inputRange[0];
3808
+ const inputMax = inputRange[inputRange.length - 1];
3809
+ if (inputRange.length === 1 || !(posterizedInput < inputMin && options?.extrapolateLeft === "wrap" || posterizedInput > inputMax && options?.extrapolateRight === "wrap")) {
3810
+ return posterizedInput;
3811
+ }
3812
+ const range = inputMax - inputMin;
3813
+ return ((posterizedInput - inputMin) % range + range) % range + inputMin;
3814
+ };
3735
3815
  var interpolateNumber = ({
3736
3816
  input,
3737
3817
  inputRange,
@@ -3751,14 +3831,18 @@ var interpolateNumber = ({
3751
3831
  if (options?.extrapolateRight !== undefined) {
3752
3832
  extrapolateRight = options.extrapolateRight;
3753
3833
  }
3754
- const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
3755
- const range = findRange(posterizedInput, inputRange);
3834
+ const resolvedInput = getInputForInterpolation({
3835
+ input,
3836
+ inputRange,
3837
+ options: options ?? null
3838
+ });
3839
+ const range = findRange(resolvedInput, inputRange);
3756
3840
  const easing = resolveEasingForSegment({
3757
3841
  easing: easingOption,
3758
3842
  segmentIndex: range
3759
3843
  });
3760
3844
  let result = interpolateSegment({
3761
- input: posterizedInput,
3845
+ input: resolvedInput,
3762
3846
  inputRange: [inputRange[range], inputRange[range + 1]],
3763
3847
  outputRange: [outputRange[range], outputRange[range + 1]],
3764
3848
  easing,
@@ -3775,11 +3859,11 @@ var interpolateNumber = ({
3775
3859
  continue;
3776
3860
  }
3777
3861
  const previousSegmentEnd = inputRange[segmentIndex + 1];
3778
- if (posterizedInput <= previousSegmentEnd) {
3862
+ if (resolvedInput <= previousSegmentEnd) {
3779
3863
  continue;
3780
3864
  }
3781
3865
  const continuedSegmentValue = interpolateSegment({
3782
- input: posterizedInput,
3866
+ input: resolvedInput,
3783
3867
  inputRange: [inputRange[segmentIndex], previousSegmentEnd],
3784
3868
  outputRange: [outputRange[segmentIndex], outputRange[segmentIndex + 1]],
3785
3869
  easing: previousEasing,
@@ -3800,8 +3884,12 @@ var interpolateString = ({
3800
3884
  }) => {
3801
3885
  const initiallyParsedOutputRange = outputRange.map((output) => parseStringInterpolationValue(output, outputType));
3802
3886
  const hasAxisRotation = initiallyParsedOutputRange.some((parsed) => parsed.axisRotation);
3803
- const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
3804
- const segmentIndex = inputRange.length === 1 ? 0 : findRange(posterizedInput, inputRange);
3887
+ const resolvedInput = getInputForInterpolation({
3888
+ input,
3889
+ inputRange,
3890
+ options: options ?? null
3891
+ });
3892
+ const segmentIndex = inputRange.length === 1 ? 0 : findRange(resolvedInput, inputRange);
3805
3893
  const parsedOutputRange = hasAxisRotation ? initiallyParsedOutputRange.map((parsed, index) => {
3806
3894
  if (parsed.kind !== "rotate") {
3807
3895
  return parsed;
@@ -3925,31 +4013,24 @@ var interpolateDiscreteValue = ({
3925
4013
  throw new TypeError(typeof outputRange[0] === "boolean" ? "Booleans can only be interpolated using Easing.step1" : "Non-numeric strings can only be interpolated using Easing.step1");
3926
4014
  }
3927
4015
  }
3928
- const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
4016
+ const resolvedInput = getInputForInterpolation({
4017
+ input,
4018
+ inputRange,
4019
+ options: options ?? null
4020
+ });
3929
4021
  const inputMin = inputRange[0];
3930
4022
  const inputMax = inputRange[inputRange.length - 1];
3931
- let resolvedInput = posterizedInput;
3932
4023
  if (resolvedInput < inputMin) {
3933
4024
  if (options?.extrapolateLeft === "identity") {
3934
4025
  throw new TypeError(typeof outputRange[0] === "boolean" ? 'extrapolateLeft: "identity" is not supported for booleans' : 'extrapolateLeft: "identity" is not supported for non-numeric strings');
3935
4026
  }
3936
- if (options?.extrapolateLeft === "wrap") {
3937
- const wrapRange = inputMax - inputMin;
3938
- resolvedInput = ((resolvedInput - inputMin) % wrapRange + wrapRange) % wrapRange + inputMin;
3939
- } else {
3940
- return outputRange[0];
3941
- }
4027
+ return outputRange[0];
3942
4028
  }
3943
4029
  if (resolvedInput > inputMax) {
3944
4030
  if (options?.extrapolateRight === "identity") {
3945
4031
  throw new TypeError(typeof outputRange[0] === "boolean" ? 'extrapolateRight: "identity" is not supported for booleans' : 'extrapolateRight: "identity" is not supported for non-numeric strings');
3946
4032
  }
3947
- if (options?.extrapolateRight === "wrap") {
3948
- const wrapRange = inputMax - inputMin;
3949
- resolvedInput = ((resolvedInput - inputMin) % wrapRange + wrapRange) % wrapRange + inputMin;
3950
- } else {
3951
- return outputRange[outputRange.length - 1];
3952
- }
4033
+ return outputRange[outputRange.length - 1];
3953
4034
  }
3954
4035
  const range = findRange(resolvedInput, inputRange);
3955
4036
  return resolvedInput >= inputRange[range + 1] ? outputRange[range + 1] : outputRange[range];
@@ -4719,14 +4800,16 @@ function parseModernComponent(str, percentScale) {
4719
4800
  function parseHueAngle(str) {
4720
4801
  if (str === "none")
4721
4802
  return 0;
4722
- if (str.endsWith("rad")) {
4723
- return Number.parseFloat(str) * 180 / Math.PI;
4724
- }
4725
- if (str.endsWith("grad"))
4726
- return Number.parseFloat(str) * 0.9;
4727
- if (str.endsWith("turn"))
4728
- return Number.parseFloat(str) * 360;
4729
- return Number.parseFloat(str);
4803
+ let degrees = Number.parseFloat(str);
4804
+ if (str.endsWith("grad")) {
4805
+ degrees *= 0.9;
4806
+ } else if (str.endsWith("rad")) {
4807
+ degrees = degrees * 180 / Math.PI;
4808
+ } else if (str.endsWith("turn")) {
4809
+ degrees *= 360;
4810
+ }
4811
+ const normalized = degrees % 360;
4812
+ return normalized < 0 ? (normalized + 360) % 360 : normalized;
4730
4813
  }
4731
4814
  function parseModernAlpha(str) {
4732
4815
  if (str === undefined || str === "none")
@@ -5104,6 +5187,39 @@ var serializeScaleValue = ([x, y, z]) => {
5104
5187
  function truthy(value) {
5105
5188
  return Boolean(value);
5106
5189
  }
5190
+ var validateSelectedFrames = ({
5191
+ frames,
5192
+ durationInFrames
5193
+ }) => {
5194
+ if (!Array.isArray(frames)) {
5195
+ throw new TypeError("The \`frames\` option must be an array of frame numbers.");
5196
+ }
5197
+ if (frames.length === 0) {
5198
+ throw new TypeError("The \`frames\` option must contain at least one frame.");
5199
+ }
5200
+ for (const frame of frames) {
5201
+ if (typeof frame !== "number") {
5202
+ throw new TypeError(\`The \\\`frames\\\` option must contain only numbers, but got \${typeof frame}.\`);
5203
+ }
5204
+ if (!Number.isFinite(frame)) {
5205
+ throw new TypeError(\`The \\\`frames\\\` option must contain only finite numbers, but got \${frame}.\`);
5206
+ }
5207
+ if (!Number.isInteger(frame)) {
5208
+ throw new TypeError(\`The \\\`frames\\\` option must contain only integers, but got \${frame}.\`);
5209
+ }
5210
+ if (frame < 0) {
5211
+ throw new TypeError(\`The \\\`frames\\\` option must contain only non-negative numbers, but got \${frame}.\`);
5212
+ }
5213
+ if (durationInFrames !== null && frame >= durationInFrames) {
5214
+ throw new RangeError(\`Frame \${frame} is out of range, must be between 0 and \${durationInFrames - 1}.\`);
5215
+ }
5216
+ }
5217
+ const uniqueFrames = new Set(frames);
5218
+ if (uniqueFrames.size !== frames.length) {
5219
+ throw new TypeError("The \`frames\` option must not contain duplicate frames.");
5220
+ }
5221
+ return [...frames].sort((a, b) => a - b);
5222
+ };
5107
5223
  var validCodecs = [
5108
5224
  "h264",
5109
5225
  "h265",
@@ -5200,6 +5316,7 @@ var getOffthreadVideoSource = ({
5200
5316
  return \`http://localhost:\${window.remotion_proxyPort}/proxy?src=\${encodeURIComponent(getAbsoluteSrc(src))}&time=\${encodeURIComponent(Math.max(0, currentTime))}&transparent=\${String(transparent)}&toneMapped=\${String(toneMapped)}\`;
5201
5317
  };
5202
5318
  var NoReactInternals = {
5319
+ validatePreferredEffectBackend,
5203
5320
  DEFAULT_PREMOUNT_IN_SECONDS,
5204
5321
  DEFAULT_STUDIO_PREMOUNT_IN_SECONDS,
5205
5322
  DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
@@ -5213,6 +5330,7 @@ var NoReactInternals = {
5213
5330
  validateDurationInFrames,
5214
5331
  validateDefaultAndInputProps,
5215
5332
  validateFrame,
5333
+ validateSelectedFrames,
5216
5334
  serializeJSONWithSpecialTypes,
5217
5335
  bundleName: "bundle.js",
5218
5336
  bundleMapName: "bundle.js.map",
@@ -5331,6 +5449,7 @@ try {
5331
5449
  }),
5332
5450
  chromeMode: config.chromeMode,
5333
5451
  mediaCacheSizeInBytes: config.mediaCacheSizeInBytes,
5452
+ preferredEffectBackend: config.preferredEffectBackend,
5334
5453
  offthreadVideoCacheSizeInBytes: config.offthreadVideoCacheSizeInBytes,
5335
5454
  offthreadVideoThreads: config.offthreadVideoThreads
5336
5455
  });
@@ -5365,6 +5484,7 @@ try {
5365
5484
  binariesDirectory: config.binariesDirectory,
5366
5485
  metadata: config.metadata,
5367
5486
  licenseKey: config.licenseKey,
5487
+ isProduction: config.isProduction,
5368
5488
  videoBitrate: config.videoBitrate,
5369
5489
  audioBitrate: config.audioBitrate,
5370
5490
  encodingMaxRate: config.encodingMaxRate,
@@ -5384,6 +5504,7 @@ try {
5384
5504
  chromeMode: config.chromeMode,
5385
5505
  offthreadVideoCacheSizeInBytes: config.offthreadVideoCacheSizeInBytes,
5386
5506
  mediaCacheSizeInBytes: config.mediaCacheSizeInBytes,
5507
+ preferredEffectBackend: config.preferredEffectBackend,
5387
5508
  offthreadVideoThreads: config.offthreadVideoThreads,
5388
5509
  repro: config.repro,
5389
5510
  sampleRate: config.sampleRate,
@@ -5419,7 +5540,6 @@ try {
5419
5540
  compositionStart: 0,
5420
5541
  onArtifact: null,
5421
5542
  onLog: RenderInternals.defaultOnLog,
5422
- isProduction: true,
5423
5543
  onBrowserDownload: () => ({
5424
5544
  version: null,
5425
5545
  onProgress: noop
@@ -5858,6 +5978,7 @@ var internalRenderMediaOnVercel = async (options) => {
5858
5978
  concurrency,
5859
5979
  metadata,
5860
5980
  licenseKey,
5981
+ isProduction,
5861
5982
  videoBitrate,
5862
5983
  audioBitrate,
5863
5984
  encodingMaxRate,
@@ -5876,6 +5997,7 @@ var internalRenderMediaOnVercel = async (options) => {
5876
5997
  hardwareAcceleration = "disable",
5877
5998
  offthreadVideoCacheSizeInBytes,
5878
5999
  mediaCacheSizeInBytes,
6000
+ preferredEffectBackend,
5879
6001
  offthreadVideoThreads,
5880
6002
  sampleRate,
5881
6003
  detached = false,
@@ -5908,6 +6030,7 @@ var internalRenderMediaOnVercel = async (options) => {
5908
6030
  concurrency: concurrency ?? null,
5909
6031
  metadata: metadata ?? null,
5910
6032
  licenseKey: licenseKey ?? null,
6033
+ isProduction: isProduction ?? null,
5911
6034
  videoBitrate: videoBitrate ?? null,
5912
6035
  audioBitrate: audioBitrate ?? null,
5913
6036
  encodingMaxRate: encodingMaxRate ?? null,
@@ -5926,6 +6049,7 @@ var internalRenderMediaOnVercel = async (options) => {
5926
6049
  hardwareAcceleration,
5927
6050
  offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes ?? null,
5928
6051
  mediaCacheSizeInBytes: mediaCacheSizeInBytes ?? null,
6052
+ preferredEffectBackend: preferredEffectBackend ?? "auto",
5929
6053
  offthreadVideoThreads: offthreadVideoThreads ?? null,
5930
6054
  chromeMode: "headless-shell",
5931
6055
  browserExecutable: null,
@@ -5990,8 +6114,10 @@ async function renderStillOnVercel({
5990
6114
  timeoutInMilliseconds = 30000,
5991
6115
  offthreadVideoCacheSizeInBytes,
5992
6116
  mediaCacheSizeInBytes,
6117
+ preferredEffectBackend,
5993
6118
  offthreadVideoThreads,
5994
- licenseKey
6119
+ licenseKey,
6120
+ isProduction
5995
6121
  }) {
5996
6122
  const serveUrl = `/vercel/sandbox/${REMOTION_SANDBOX_BUNDLE_DIR}`;
5997
6123
  const renderConfig = {
@@ -6009,8 +6135,10 @@ async function renderStillOnVercel({
6009
6135
  timeoutInMilliseconds,
6010
6136
  offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes ?? null,
6011
6137
  mediaCacheSizeInBytes: mediaCacheSizeInBytes ?? null,
6138
+ preferredEffectBackend: preferredEffectBackend ?? "auto",
6012
6139
  offthreadVideoThreads: offthreadVideoThreads ?? null,
6013
6140
  licenseKey: licenseKey ?? null,
6141
+ isProduction: isProduction ?? null,
6014
6142
  chromeMode: "headless-shell",
6015
6143
  browserExecutable: null,
6016
6144
  binariesDirectory: null
@@ -1,8 +1,8 @@
1
1
  import type { Sandbox } from '@vercel/sandbox';
2
2
  /**
3
- * Remotion does not officially support glibc 2.34, but it can be patched.
3
+ * Remotion does not officially support glibc 2.34 on x64, but it can be patched.
4
4
  *
5
- * Vercel Sandbox runs Amazon Linux 2023 which ships glibc 2.34,
5
+ * Vercel Sandbox runs Amazon Linux 2023 on x64, which ships glibc 2.34,
6
6
  * but the compositor binary requires glibc 2.35.
7
7
  * We download Ubuntu 22.04's libc6 package and use patchelf to
8
8
  * point the compositor at the bundled glibc.
@@ -1,4 +1,5 @@
1
1
  import type { Sandbox } from '@vercel/sandbox';
2
+ import type { PreferredEffectBackend } from 'remotion';
2
3
  import type { AudioCodec, Bitrate, ChromiumOptions, Codec, ColorSpace, FrameRange, HardwareAccelerationOption, LogLevel, PixelFormat, ProResProfile, RenderMediaOnVercelProgress, VercelBlobUploadOptions, VideoImageFormat, X264Preset } from './types';
3
4
  type RenderMediaOnVercelBaseOptions = {
4
5
  sandbox: Sandbox;
@@ -23,6 +24,7 @@ type RenderMediaOnVercelBaseOptions = {
23
24
  concurrency?: number | string | null;
24
25
  metadata?: Record<string, string> | null;
25
26
  licenseKey?: string | null;
27
+ isProduction?: boolean;
26
28
  videoBitrate?: Bitrate | null;
27
29
  audioBitrate?: Bitrate | null;
28
30
  encodingMaxRate?: Bitrate | null;
@@ -41,6 +43,7 @@ type RenderMediaOnVercelBaseOptions = {
41
43
  hardwareAcceleration?: HardwareAccelerationOption;
42
44
  offthreadVideoCacheSizeInBytes?: number | null;
43
45
  mediaCacheSizeInBytes?: number | null;
46
+ preferredEffectBackend?: PreferredEffectBackend;
44
47
  offthreadVideoThreads?: number | null;
45
48
  sampleRate?: number;
46
49
  detachedSandboxTimeoutInMilliseconds?: number;
@@ -1,6 +1,7 @@
1
1
  import type { Sandbox } from '@vercel/sandbox';
2
+ import type { PreferredEffectBackend } from 'remotion';
2
3
  import type { ChromiumOptions, LogLevel, RenderStillOnVercelProgress, StillImageFormat } from './types';
3
- export declare function renderStillOnVercel({ sandbox, compositionId, inputProps, onProgress, outputFile, frame, imageFormat, jpegQuality, envVariables, chromiumOptions, scale, logLevel, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, mediaCacheSizeInBytes, offthreadVideoThreads, licenseKey, }: {
4
+ export declare function renderStillOnVercel({ sandbox, compositionId, inputProps, onProgress, outputFile, frame, imageFormat, jpegQuality, envVariables, chromiumOptions, scale, logLevel, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, mediaCacheSizeInBytes, preferredEffectBackend, offthreadVideoThreads, licenseKey, isProduction, }: {
4
5
  sandbox: Sandbox;
5
6
  compositionId: string;
6
7
  inputProps: Record<string, unknown>;
@@ -16,8 +17,10 @@ export declare function renderStillOnVercel({ sandbox, compositionId, inputProps
16
17
  timeoutInMilliseconds?: number;
17
18
  offthreadVideoCacheSizeInBytes?: number | null;
18
19
  mediaCacheSizeInBytes?: number | null;
20
+ preferredEffectBackend?: PreferredEffectBackend;
19
21
  offthreadVideoThreads?: number | null;
20
22
  licenseKey?: string | null;
23
+ isProduction?: boolean;
21
24
  }): Promise<{
22
25
  sandboxFilePath: string;
23
26
  contentType: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/vercel",
3
- "version": "4.0.538",
3
+ "version": "4.0.540",
4
4
  "description": "Render Remotion videos on Vercel Sandbox",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,8 +23,8 @@
23
23
  "url": "https://github.com/remotion-dev/remotion/issues"
24
24
  },
25
25
  "dependencies": {
26
- "@remotion/renderer": "4.0.538",
27
- "remotion": "4.0.538"
26
+ "@remotion/renderer": "4.0.540",
27
+ "remotion": "4.0.540"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@vercel/sandbox": ">=1.0.0"
@@ -38,7 +38,7 @@
38
38
  "./package.json": "./package.json"
39
39
  },
40
40
  "devDependencies": {
41
- "@remotion/eslint-config-internal": "4.0.538",
41
+ "@remotion/eslint-config-internal": "4.0.540",
42
42
  "@vercel/blob": "2.3.0",
43
43
  "@vercel/sandbox": "1.6.0",
44
44
  "eslint": "9.19.0",