@remotion/renderer 4.0.140 → 4.0.141

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.
@@ -44,6 +44,7 @@ const calculateAssetPositions = (frames) => {
44
44
  playbackRate: asset.playbackRate,
45
45
  allowAmplificationDuringRender: asset.allowAmplificationDuringRender,
46
46
  toneFrequency: asset.toneFrequency,
47
+ audioStartFrame: asset.audioStartFrame,
47
48
  });
48
49
  }
49
50
  const found = assets.find((a) => a.duration === null && areEqual(a, asset));
@@ -1,5 +1,5 @@
1
1
  import type { TRenderAsset } from 'remotion/no-react';
2
- export type UnsafeAsset = Omit<TRenderAsset, 'frame' | 'id' | 'volume' | 'mediaFrame'> & {
2
+ export type UnsafeAsset = Omit<TRenderAsset, 'frame' | 'id' | 'volume' | 'mediaFrame' | 'audioStartFrom'> & {
3
3
  startInVideo: number;
4
4
  duration: number | null;
5
5
  trimLeft: number;
package/dist/client.d.ts CHANGED
@@ -465,19 +465,19 @@ export declare const BrowserSafeApis: {
465
465
  cliFlag: "gl";
466
466
  docLink: string;
467
467
  name: string;
468
- type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
468
+ type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
469
469
  ssrName: string;
470
470
  description: () => import("react/jsx-runtime").JSX.Element;
471
471
  getValue: ({ commandLine }: {
472
472
  commandLine: Record<string, unknown>;
473
473
  }) => {
474
- value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
474
+ value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
475
475
  source: string;
476
476
  } | {
477
477
  value: null;
478
478
  source: string;
479
479
  };
480
- setConfig: (value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
480
+ setConfig: (value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
481
481
  };
482
482
  enableLambdaInsights: {
483
483
  name: string;
@@ -602,17 +602,17 @@ export declare const BrowserSafeApis: {
602
602
  description: () => import("react/jsx-runtime").JSX.Element;
603
603
  ssrName: "x264Preset";
604
604
  docLink: string;
605
- type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
605
+ type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
606
606
  getValue: ({ commandLine }: {
607
607
  commandLine: Record<string, unknown>;
608
608
  }) => {
609
- value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
609
+ value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
610
610
  source: string;
611
611
  } | {
612
612
  value: null;
613
613
  source: string;
614
614
  };
615
- setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
615
+ setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
616
616
  };
617
617
  logLevelOption: {
618
618
  cliFlag: "log";
@@ -771,6 +771,21 @@ export declare const BrowserSafeApis: {
771
771
  getValue: () => never;
772
772
  setConfig: () => never;
773
773
  };
774
+ throwIfSiteExistsOption: {
775
+ cliFlag: string;
776
+ description: () => string;
777
+ docLink: string;
778
+ getValue: ({ commandLine }: {
779
+ commandLine: Record<string, unknown>;
780
+ }) => {
781
+ source: string;
782
+ value: boolean;
783
+ };
784
+ name: string;
785
+ setConfig: () => never;
786
+ ssrName: string;
787
+ type: boolean;
788
+ };
774
789
  };
775
790
  validColorSpaces: readonly ["default", "bt709", "bt2020-ncl"];
776
791
  optionsMap: {
@@ -847,17 +862,17 @@ export declare const BrowserSafeApis: {
847
862
  description: () => import("react/jsx-runtime").JSX.Element;
848
863
  ssrName: "x264Preset";
849
864
  docLink: string;
850
- type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
865
+ type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
851
866
  getValue: ({ commandLine }: {
852
867
  commandLine: Record<string, unknown>;
853
868
  }) => {
854
- value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
869
+ value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
855
870
  source: string;
856
871
  } | {
857
872
  value: null;
858
873
  source: string;
859
874
  };
860
- setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
875
+ setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
861
876
  };
862
877
  readonly audioBitrate: {
863
878
  name: string;
@@ -1569,17 +1584,17 @@ export declare const BrowserSafeApis: {
1569
1584
  description: () => import("react/jsx-runtime").JSX.Element;
1570
1585
  ssrName: "x264Preset";
1571
1586
  docLink: string;
1572
- type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
1587
+ type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
1573
1588
  getValue: ({ commandLine }: {
1574
1589
  commandLine: Record<string, unknown>;
1575
1590
  }) => {
1576
- value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
1591
+ value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
1577
1592
  source: string;
1578
1593
  } | {
1579
1594
  value: null;
1580
1595
  source: string;
1581
1596
  };
1582
- setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
1597
+ setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
1583
1598
  };
1584
1599
  readonly encodingMaxRate: {
1585
1600
  name: string;
@@ -1935,17 +1950,17 @@ export declare const BrowserSafeApis: {
1935
1950
  description: () => import("react/jsx-runtime").JSX.Element;
1936
1951
  ssrName: "x264Preset";
1937
1952
  docLink: string;
1938
- type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
1953
+ type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
1939
1954
  getValue: ({ commandLine }: {
1940
1955
  commandLine: Record<string, unknown>;
1941
1956
  }) => {
1942
- value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
1957
+ value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
1943
1958
  source: string;
1944
1959
  } | {
1945
1960
  value: null;
1946
1961
  source: string;
1947
1962
  };
1948
- setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
1963
+ setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
1949
1964
  };
1950
1965
  readonly encodingMaxRate: {
1951
1966
  name: string;
@@ -2199,6 +2214,38 @@ export declare const BrowserSafeApis: {
2199
2214
  setConfig: () => never;
2200
2215
  };
2201
2216
  };
2217
+ readonly deploySiteLambda: {
2218
+ readonly logLevel: {
2219
+ cliFlag: "log";
2220
+ name: string;
2221
+ ssrName: string;
2222
+ description: () => import("react/jsx-runtime").JSX.Element;
2223
+ docLink: string;
2224
+ getValue: ({ commandLine }: {
2225
+ commandLine: Record<string, unknown>;
2226
+ }) => {
2227
+ value: "verbose" | "info" | "warn" | "error";
2228
+ source: string;
2229
+ };
2230
+ setConfig: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
2231
+ type: "verbose" | "info" | "warn" | "error";
2232
+ };
2233
+ readonly throwIfSiteExists: {
2234
+ cliFlag: string;
2235
+ description: () => string;
2236
+ docLink: string;
2237
+ getValue: ({ commandLine }: {
2238
+ commandLine: Record<string, unknown>;
2239
+ }) => {
2240
+ source: string;
2241
+ value: boolean;
2242
+ };
2243
+ name: string;
2244
+ setConfig: () => never;
2245
+ ssrName: string;
2246
+ type: boolean;
2247
+ };
2248
+ };
2202
2249
  };
2203
2250
  codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => boolean;
2204
2251
  codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => boolean;
package/dist/index.d.ts CHANGED
@@ -140,8 +140,8 @@ export declare const RenderInternals: {
140
140
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
141
141
  DEFAULT_BROWSER: "chrome";
142
142
  validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
143
- DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
144
- validateOpenGlRenderer: (option: unknown) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
143
+ DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
144
+ validateOpenGlRenderer: (option: unknown) => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
145
145
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "h264-ts", "gif"];
146
146
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
147
147
  validateJpegQuality: (q: unknown) => void;
@@ -352,8 +352,8 @@ export declare const RenderInternals: {
352
352
  }) => execa.ExecaChildProcess<string>;
353
353
  validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
354
354
  validVideoImageFormats: readonly ["png", "jpeg", "none"];
355
- DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
356
- DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
355
+ DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
356
+ DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
357
357
  DEFAULT_JPEG_QUALITY: number;
358
358
  chalk: {
359
359
  enabled: () => boolean;
@@ -452,7 +452,7 @@ export declare const RenderInternals: {
452
452
  frame: number;
453
453
  serializedInputPropsWithCustomSchema: string;
454
454
  serializedResolvedPropsWithCustomSchema: string;
455
- imageFormat: "png" | "jpeg" | "pdf" | "webp";
455
+ imageFormat: "jpeg" | "png" | "webp" | "pdf";
456
456
  jpegQuality: number;
457
457
  puppeteerInstance: HeadlessBrowser | null;
458
458
  envVariables: Record<string, string>;
@@ -1,19 +1,19 @@
1
1
  export declare const validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
2
2
  export type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
3
3
  export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
4
- export declare const getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
4
+ export declare const getChromiumOpenGlRenderer: () => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
5
5
  export declare const setChromiumOpenGlRenderer: (renderer: OpenGlRenderer) => void;
6
6
  export declare const glOption: {
7
7
  cliFlag: "gl";
8
8
  docLink: string;
9
9
  name: string;
10
- type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
10
+ type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
11
11
  ssrName: string;
12
12
  description: () => import("react/jsx-runtime").JSX.Element;
13
13
  getValue: ({ commandLine }: {
14
14
  commandLine: Record<string, unknown>;
15
15
  }) => {
16
- value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
16
+ value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
17
17
  source: string;
18
18
  } | {
19
19
  value: null;
@@ -245,19 +245,19 @@ export declare const allOptions: {
245
245
  cliFlag: "gl";
246
246
  docLink: string;
247
247
  name: string;
248
- type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
248
+ type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
249
249
  ssrName: string;
250
250
  description: () => import("react/jsx-runtime").JSX.Element;
251
251
  getValue: ({ commandLine }: {
252
252
  commandLine: Record<string, unknown>;
253
253
  }) => {
254
- value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
254
+ value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
255
255
  source: string;
256
256
  } | {
257
257
  value: null;
258
258
  source: string;
259
259
  };
260
- setConfig: (value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
260
+ setConfig: (value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
261
261
  };
262
262
  enableLambdaInsights: {
263
263
  name: string;
@@ -382,17 +382,17 @@ export declare const allOptions: {
382
382
  description: () => import("react/jsx-runtime").JSX.Element;
383
383
  ssrName: "x264Preset";
384
384
  docLink: string;
385
- type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
385
+ type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
386
386
  getValue: ({ commandLine }: {
387
387
  commandLine: Record<string, unknown>;
388
388
  }) => {
389
- value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
389
+ value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
390
390
  source: string;
391
391
  } | {
392
392
  value: null;
393
393
  source: string;
394
394
  };
395
- setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
395
+ setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
396
396
  };
397
397
  logLevelOption: {
398
398
  cliFlag: "log";
@@ -551,6 +551,21 @@ export declare const allOptions: {
551
551
  getValue: () => never;
552
552
  setConfig: () => never;
553
553
  };
554
+ throwIfSiteExistsOption: {
555
+ cliFlag: string;
556
+ description: () => string;
557
+ docLink: string;
558
+ getValue: ({ commandLine }: {
559
+ commandLine: Record<string, unknown>;
560
+ }) => {
561
+ source: string;
562
+ value: boolean;
563
+ };
564
+ name: string;
565
+ setConfig: () => never;
566
+ ssrName: string;
567
+ type: boolean;
568
+ };
554
569
  };
555
570
  export type AvailableOptions = keyof typeof allOptions;
556
571
  export type TypeOfOption<Type> = Type extends AnyRemotionOption<infer X> ? X : never;
@@ -30,6 +30,7 @@ const public_path_1 = require("./public-path");
30
30
  const repro_1 = require("./repro");
31
31
  const scale_1 = require("./scale");
32
32
  const separate_audio_1 = require("./separate-audio");
33
+ const throw_if_site_exists_1 = require("./throw-if-site-exists");
33
34
  const timeout_1 = require("./timeout");
34
35
  const video_bitrate_1 = require("./video-bitrate");
35
36
  const video_codec_1 = require("./video-codec");
@@ -70,4 +71,5 @@ exports.allOptions = {
70
71
  publicPathOption: public_path_1.publicPathOption,
71
72
  publicDirOption: public_dir_1.publicDirOption,
72
73
  onBrowserDownloadOption: on_browser_download_1.onBrowserDownloadOption,
74
+ throwIfSiteExistsOption: throw_if_site_exists_1.throwIfSiteExistsOption,
73
75
  };
@@ -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" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
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" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
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" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
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;
@@ -794,17 +794,17 @@ export declare const optionsMap: {
794
794
  description: () => import("react/jsx-runtime").JSX.Element;
795
795
  ssrName: "x264Preset";
796
796
  docLink: string;
797
- type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
797
+ type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
798
798
  getValue: ({ commandLine }: {
799
799
  commandLine: Record<string, unknown>;
800
800
  }) => {
801
- value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
801
+ value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
802
802
  source: string;
803
803
  } | {
804
804
  value: null;
805
805
  source: string;
806
806
  };
807
- setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
807
+ setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
808
808
  };
809
809
  readonly encodingMaxRate: {
810
810
  name: string;
@@ -1160,17 +1160,17 @@ export declare const optionsMap: {
1160
1160
  description: () => import("react/jsx-runtime").JSX.Element;
1161
1161
  ssrName: "x264Preset";
1162
1162
  docLink: string;
1163
- type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
1163
+ type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
1164
1164
  getValue: ({ commandLine }: {
1165
1165
  commandLine: Record<string, unknown>;
1166
1166
  }) => {
1167
- value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
1167
+ value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
1168
1168
  source: string;
1169
1169
  } | {
1170
1170
  value: null;
1171
1171
  source: string;
1172
1172
  };
1173
- setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
1173
+ setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
1174
1174
  };
1175
1175
  readonly encodingMaxRate: {
1176
1176
  name: string;
@@ -1424,4 +1424,36 @@ export declare const optionsMap: {
1424
1424
  setConfig: () => never;
1425
1425
  };
1426
1426
  };
1427
+ readonly deploySiteLambda: {
1428
+ readonly logLevel: {
1429
+ cliFlag: "log";
1430
+ name: string;
1431
+ ssrName: string;
1432
+ description: () => import("react/jsx-runtime").JSX.Element;
1433
+ docLink: string;
1434
+ getValue: ({ commandLine }: {
1435
+ commandLine: Record<string, unknown>;
1436
+ }) => {
1437
+ value: "verbose" | "info" | "warn" | "error";
1438
+ source: string;
1439
+ };
1440
+ setConfig: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
1441
+ type: "verbose" | "info" | "warn" | "error";
1442
+ };
1443
+ readonly throwIfSiteExists: {
1444
+ cliFlag: string;
1445
+ description: () => string;
1446
+ docLink: string;
1447
+ getValue: ({ commandLine }: {
1448
+ commandLine: Record<string, unknown>;
1449
+ }) => {
1450
+ source: string;
1451
+ value: boolean;
1452
+ };
1453
+ name: string;
1454
+ setConfig: () => never;
1455
+ ssrName: string;
1456
+ type: boolean;
1457
+ };
1458
+ };
1427
1459
  };
@@ -21,6 +21,7 @@ const prefer_lossless_1 = require("./prefer-lossless");
21
21
  const repro_1 = require("./repro");
22
22
  const scale_1 = require("./scale");
23
23
  const separate_audio_1 = require("./separate-audio");
24
+ const throw_if_site_exists_1 = require("./throw-if-site-exists");
24
25
  const timeout_1 = require("./timeout");
25
26
  const video_bitrate_1 = require("./video-bitrate");
26
27
  const video_codec_1 = require("./video-codec");
@@ -138,4 +139,8 @@ exports.optionsMap = {
138
139
  logLevel: log_level_1.logLevelOption,
139
140
  onBrowserDownload: on_browser_download_1.onBrowserDownloadOption,
140
141
  },
142
+ deploySiteLambda: {
143
+ logLevel: log_level_1.logLevelOption,
144
+ throwIfSiteExists: throw_if_site_exists_1.throwIfSiteExistsOption,
145
+ },
141
146
  };
@@ -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" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
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" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
18
+ value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
19
19
  source: string;
20
20
  } | {
21
21
  value: null;
@@ -143,7 +143,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
143
143
  page,
144
144
  timeoutInMilliseconds: actualTimeout,
145
145
  });
146
- const requiredVersion = '10';
146
+ const requiredVersion = '11';
147
147
  if (siteVersion !== requiredVersion) {
148
148
  throw new Error([
149
149
  `Incompatible site: When visiting ${urlToVisit}, a bundle was found, but one that is not compatible with this version of Remotion. Found version: ${siteVersion} - Required version: ${requiredVersion}. To resolve this error:`,
@@ -6,10 +6,11 @@ export type ProcessedTrack = {
6
6
  pad_start: string | null;
7
7
  pad_end: string | null;
8
8
  };
9
- export declare const getActualTrimLeft: ({ asset, fps, trimLeftOffset, }: {
9
+ export declare const getActualTrimLeft: ({ asset, fps, trimLeftOffset, seamless, }: {
10
10
  asset: MediaAsset;
11
11
  fps: number;
12
12
  trimLeftOffset: number;
13
+ seamless: boolean;
13
14
  }) => number;
14
15
  export declare const stringifyFfmpegFilter: ({ channels, volume, fps, assetDuration, chunkLengthInSeconds, forSeamlessAacConcatenation, trimLeftOffset, trimRightOffset, asset, }: {
15
16
  channels: number;
@@ -14,7 +14,20 @@ const stringifyTrim = (trim) => {
14
14
  }
15
15
  return asString;
16
16
  };
17
- const getActualTrimLeft = ({ asset, fps, trimLeftOffset, }) => asset.trimLeft / fps + trimLeftOffset;
17
+ const getActualTrimLeft = ({ asset, fps, trimLeftOffset, seamless, }) => {
18
+ const sinceStart = asset.trimLeft - asset.audioStartFrame;
19
+ if (!seamless) {
20
+ return (asset.audioStartFrame / fps +
21
+ (sinceStart / fps) * asset.playbackRate +
22
+ trimLeftOffset);
23
+ }
24
+ if (seamless) {
25
+ return (asset.audioStartFrame / fps / asset.playbackRate +
26
+ sinceStart / fps +
27
+ trimLeftOffset);
28
+ }
29
+ throw new Error('This should never happen');
30
+ };
18
31
  exports.getActualTrimLeft = getActualTrimLeft;
19
32
  const trimAndSetTempo = ({ forSeamlessAacConcatenation, assetDuration, asset, trimLeftOffset, trimRightOffset, fps, }) => {
20
33
  // If we need seamless AAC stitching, we need to apply the tempo filter first
@@ -22,8 +35,13 @@ const trimAndSetTempo = ({ forSeamlessAacConcatenation, assetDuration, asset, tr
22
35
  // and the offset needs to be the same for all audio tracks, before processing it further.
23
36
  // This also affects the trimLeft and trimRight values, as they need to be adjusted.
24
37
  if (forSeamlessAacConcatenation) {
25
- const trimLeft = (0, exports.getActualTrimLeft)({ asset, fps, trimLeftOffset });
26
- const trimRight = trimLeft + (asset.duration / fps + trimRightOffset);
38
+ const trimLeft = (0, exports.getActualTrimLeft)({
39
+ asset,
40
+ fps,
41
+ trimLeftOffset,
42
+ seamless: true,
43
+ });
44
+ const trimRight = trimLeft + asset.duration / fps - trimLeftOffset + trimRightOffset;
27
45
  const trimRightOrAssetDuration = assetDuration
28
46
  ? Math.min(trimRight, assetDuration / asset.playbackRate)
29
47
  : trimRight;
@@ -48,12 +66,16 @@ const trimAndSetTempo = ({ forSeamlessAacConcatenation, assetDuration, asset, tr
48
66
  // Otherwise, we first trim and then apply playback rate, as then the atempo
49
67
  // filter needs to do less work.
50
68
  if (!forSeamlessAacConcatenation) {
51
- const trimLeft = (0, exports.getActualTrimLeft)({ asset, fps, trimLeftOffset });
52
- const trimRight = (trimLeft + asset.duration / fps) * asset.playbackRate;
69
+ const actualTrimLeft = (0, exports.getActualTrimLeft)({
70
+ asset,
71
+ fps,
72
+ trimLeftOffset,
73
+ seamless: false,
74
+ });
75
+ const trimRight = actualTrimLeft + (asset.duration / fps) * asset.playbackRate;
53
76
  const trimRightOrAssetDuration = assetDuration
54
77
  ? Math.min(trimRight, assetDuration)
55
78
  : trimRight;
56
- const actualTrimLeft = trimLeft * asset.playbackRate;
57
79
  return {
58
80
  filter: [
59
81
  `atrim=${stringifyTrim(actualTrimLeft)}:${stringifyTrim(trimRightOrAssetDuration)}`,
@@ -72,7 +94,12 @@ const stringifyFfmpegFilter = ({ channels, volume, fps, assetDuration, chunkLeng
72
94
  const { toneFrequency, startInVideo, playbackRate } = asset;
73
95
  const startInVideoSeconds = startInVideo / fps;
74
96
  if (assetDuration &&
75
- (0, exports.getActualTrimLeft)({ asset, fps, trimLeftOffset }) >=
97
+ (0, exports.getActualTrimLeft)({
98
+ asset,
99
+ fps,
100
+ trimLeftOffset,
101
+ seamless: forSeamlessAacConcatenation,
102
+ }) >=
76
103
  assetDuration / playbackRate) {
77
104
  return null;
78
105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.140",
3
+ "version": "4.0.141",
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.140"
21
+ "remotion": "4.0.141"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=16.8.0",
@@ -41,13 +41,13 @@
41
41
  "@types/ws": "8.5.10"
42
42
  },
43
43
  "optionalDependencies": {
44
- "@remotion/compositor-darwin-arm64": "4.0.140",
45
- "@remotion/compositor-linux-arm64-musl": "4.0.140",
46
- "@remotion/compositor-linux-arm64-gnu": "4.0.140",
47
- "@remotion/compositor-linux-x64-gnu": "4.0.140",
48
- "@remotion/compositor-linux-x64-musl": "4.0.140",
49
- "@remotion/compositor-win32-x64-msvc": "4.0.140",
50
- "@remotion/compositor-darwin-x64": "4.0.140"
44
+ "@remotion/compositor-darwin-arm64": "4.0.141",
45
+ "@remotion/compositor-darwin-x64": "4.0.141",
46
+ "@remotion/compositor-linux-arm64-musl": "4.0.141",
47
+ "@remotion/compositor-win32-x64-msvc": "4.0.141",
48
+ "@remotion/compositor-linux-x64-musl": "4.0.141",
49
+ "@remotion/compositor-linux-x64-gnu": "4.0.141",
50
+ "@remotion/compositor-linux-arm64-gnu": "4.0.141"
51
51
  },
52
52
  "keywords": [
53
53
  "remotion",