@remotion/renderer 3.3.10 → 3.3.12

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.
@@ -65,7 +65,9 @@ const downloadFile = ({ onProgress, url, to: toFn, }) => {
65
65
  res.on('error', (err) => rejectAndFlag(err));
66
66
  res.pipe(writeStream).on('error', (err) => rejectAndFlag(err));
67
67
  res.on('data', (d) => {
68
+ refreshTimeout();
68
69
  downloaded += d.length;
70
+ refreshTimeout();
69
71
  onProgress === null || onProgress === void 0 ? void 0 : onProgress({
70
72
  downloaded,
71
73
  percent: totalSize === null ? null : downloaded / totalSize,
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { OffthreadVideoImageFormat } from 'remotion';
3
2
  import type { DownloadMap } from './assets/download-map';
4
3
  import type { FfmpegExecutable } from './ffmpeg-executable';
@@ -178,8 +178,8 @@ const getBinaryDownloadUrl = (binary) => {
178
178
  contentLength: 42093320,
179
179
  }
180
180
  : {
181
- url: 'https://remotion-ffmpeg-binaries.s3.eu-central-1.amazonaws.com/ffprobe-macos-arm64',
182
- contentLength: 46192536,
181
+ url: 'https://remotion-ffmpeg-binaries.s3.eu-central-1.amazonaws.com/ffprobe-macos-arm64-v2',
182
+ contentLength: 46690008,
183
183
  };
184
184
  }
185
185
  if (os_1.default.platform() === 'darwin' && process.arch === 'x64') {
@@ -1,2 +1,2 @@
1
1
  import type { Codec } from './codec';
2
- export declare const getFileExtensionFromCodec: (codec: Codec, type: 'chunk' | 'final') => "mp3" | "aac" | "wav" | "gif" | "webm" | "mp4" | "mov" | "mkv";
2
+ export declare const getFileExtensionFromCodec: (codec: Codec, type: 'chunk' | 'final') => "mp3" | "aac" | "wav" | "gif" | "mp4" | "mkv" | "mov" | "webm";
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { OffthreadVideoImageFormat } from 'remotion';
3
2
  import type { SpecialVCodecForTransparency } from './assets/download-map';
4
3
  import type { FfmpegExecutable } from './ffmpeg-executable';
@@ -8,7 +7,10 @@ export declare const getFrameOfVideoSlow: ({ src, duration, ffmpegExecutable, im
8
7
  duration: number;
9
8
  imageFormat: OffthreadVideoImageFormat;
10
9
  specialVCodecForTransparency: SpecialVCodecForTransparency;
11
- needsResize: [number, number] | null;
10
+ needsResize: [
11
+ number,
12
+ number
13
+ ] | null;
12
14
  offset: number;
13
15
  fps: number | null;
14
16
  remotionRoot: string;
@@ -2,4 +2,4 @@ export declare const guessExtensionForVideo: ({ src, remotionRoot, ffprobeBinary
2
2
  src: string;
3
3
  remotionRoot: string;
4
4
  ffprobeBinary: string | null;
5
- }) => Promise<"mp3" | "wav" | "webm" | "mp4">;
5
+ }) => Promise<"mp3" | "wav" | "mp4" | "webm">;
package/dist/index.d.ts CHANGED
@@ -61,7 +61,7 @@ export declare const RenderInternals: {
61
61
  scale: number;
62
62
  codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
63
63
  }) => void;
64
- getFileExtensionFromCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif", type: "chunk" | "final") => "mp3" | "aac" | "wav" | "gif" | "webm" | "mp4" | "mov" | "mkv";
64
+ getFileExtensionFromCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif", type: "chunk" | "final") => "mp3" | "aac" | "wav" | "gif" | "mp4" | "mkv" | "mov" | "webm";
65
65
  tmpDir: (str: string) => string;
66
66
  deleteDirectory: (directory: string) => Promise<void>;
67
67
  isServeUrl: (potentialUrl: string) => boolean;
@@ -115,8 +115,8 @@ export declare const RenderInternals: {
115
115
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
116
116
  DEFAULT_BROWSER: import("./browser").Browser;
117
117
  validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
118
- DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | null;
119
- validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | null) => "angle" | "swangle" | "egl" | "swiftshader" | null;
118
+ DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | null;
119
+ validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | null) => "swangle" | "angle" | "egl" | "swiftshader" | null;
120
120
  validImageFormats: readonly ["png", "jpeg", "none"];
121
121
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
122
122
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
@@ -126,7 +126,7 @@ export declare const RenderInternals: {
126
126
  DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
127
127
  isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
128
128
  logLevels: readonly ["verbose", "info", "warn", "error"];
129
- isEqualOrBelowLogLevel: (currentLevel: "error" | "verbose" | "info" | "warn", level: "error" | "verbose" | "info" | "warn") => boolean;
129
+ isEqualOrBelowLogLevel: (currentLevel: "verbose" | "error" | "info" | "warn", level: "verbose" | "error" | "info" | "warn") => boolean;
130
130
  isValidLogLevel: (level: string) => boolean;
131
131
  perf: typeof perf;
132
132
  makeDownloadMap: () => import("./assets/download-map").DownloadMap;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { OffthreadVideoImageFormat } from 'remotion';
3
2
  import type { DownloadMap, SpecialVCodecForTransparency } from './assets/download-map';
4
3
  import type { FfmpegExecutable } from './ffmpeg-executable';
@@ -3,12 +3,15 @@ import type { Browser as PuppeteerBrowser } from './browser/Browser';
3
3
  import type { Viewport } from './browser/PuppeteerViewport';
4
4
  declare const validRenderers: readonly ["swangle", "angle", "egl", "swiftshader"];
5
5
  declare type OpenGlRenderer = typeof validRenderers[number];
6
- export declare type ChromiumOptions = {
6
+ export declare type LambdaChromiumOptions = {
7
7
  ignoreCertificateErrors?: boolean;
8
8
  disableWebSecurity?: boolean;
9
9
  gl?: OpenGlRenderer | null;
10
10
  headless?: boolean;
11
11
  };
12
+ export declare type ChromiumOptions = LambdaChromiumOptions & {
13
+ enableExtensions?: boolean;
14
+ };
12
15
  export declare const killAllBrowsers: () => Promise<void>;
13
16
  export declare const openBrowser: (browser: Browser, options?: {
14
17
  shouldDumpIo?: boolean;
@@ -28,7 +28,7 @@ const killAllBrowsers = async () => {
28
28
  };
29
29
  exports.killAllBrowsers = killAllBrowsers;
30
30
  const openBrowser = async (browser, options) => {
31
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
31
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
32
32
  if (browser === 'firefox') {
33
33
  throw new TypeError('Firefox supported is not yet turned on. Stay tuned for the future.');
34
34
  }
@@ -51,7 +51,9 @@ const openBrowser = async (browser, options) => {
51
51
  '--disable-component-extensions-with-background-pages',
52
52
  '--disable-default-apps',
53
53
  '--disable-dev-shm-usage',
54
- '--disable-extensions',
54
+ ((_f = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _f === void 0 ? void 0 : _f.enableExtensions)
55
+ ? null
56
+ : '--disable-extensions',
55
57
  '--no-proxy-server',
56
58
  "--proxy-server='direct://'",
57
59
  '--proxy-bypass-list=*',
@@ -71,7 +73,7 @@ const openBrowser = async (browser, options) => {
71
73
  '--enable-blink-features=IdleDetection',
72
74
  '--export-tagged-pdf',
73
75
  '--intensive-wake-up-throttling-policy=0',
74
- ((_g = (_f = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _f === void 0 ? void 0 : _f.headless) !== null && _g !== void 0 ? _g : true) ? '--headless' : null,
76
+ ((_h = (_g = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _g === void 0 ? void 0 : _g.headless) !== null && _h !== void 0 ? _h : true) ? '--headless' : null,
75
77
  '--no-sandbox',
76
78
  '--disable-setuid-sandbox',
77
79
  ...customGlRenderer,
@@ -92,14 +94,14 @@ const openBrowser = async (browser, options) => {
92
94
  (options === null || options === void 0 ? void 0 : options.forceDeviceScaleFactor)
93
95
  ? `--force-device-scale-factor=${options.forceDeviceScaleFactor}`
94
96
  : null,
95
- ((_h = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _h === void 0 ? void 0 : _h.ignoreCertificateErrors)
97
+ ((_j = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _j === void 0 ? void 0 : _j.ignoreCertificateErrors)
96
98
  ? '--ignore-certificate-errors'
97
99
  : null,
98
- ...(((_j = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _j === void 0 ? void 0 : _j.disableWebSecurity)
100
+ ...(((_k = options === null || options === void 0 ? void 0 : options.chromiumOptions) === null || _k === void 0 ? void 0 : _k.disableWebSecurity)
99
101
  ? ['--disable-web-security']
100
102
  : []),
101
103
  ].filter(Boolean),
102
- defaultViewport: (_k = options === null || options === void 0 ? void 0 : options.viewport) !== null && _k !== void 0 ? _k : {
104
+ defaultViewport: (_l = options === null || options === void 0 ? void 0 : options.viewport) !== null && _l !== void 0 ? _l : {
103
105
  height: 720,
104
106
  width: 1280,
105
107
  deviceScaleFactor: 1,
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { Page } from './browser/BrowserPage';
3
2
  import type { ImageFormat } from './image-format';
4
3
  export declare const provideScreenshot: ({ page, imageFormat, options, quality, height, width, }: {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { Page } from './browser/BrowserPage';
3
2
  export declare const screenshot: (options: {
4
3
  page: Page;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { SmallTCompMetadata } from 'remotion';
3
2
  import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
4
3
  import type { DownloadMap } from './assets/download-map';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { Page } from './browser/BrowserPage';
3
2
  import type { ImageFormat } from './image-format';
4
3
  export declare const screenshotDOMElement: ({ page, imageFormat, quality, opts, height, width, }: {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { Page } from './browser/BrowserPage';
3
2
  import type { StillImageFormat } from './image-format';
4
3
  export declare const screenshotTask: ({ format, height, omitBackground, page, width, path, quality, }: {
@@ -20,7 +20,8 @@ const stringifyFfmpegFilter = ({ trimLeft, trimRight, channels, startInVideo, vo
20
20
  const actualTrimRight = assetDuration
21
21
  ? Math.min(trimRight, assetDuration)
22
22
  : trimRight;
23
- const padAtEnd = chunkLength - (actualTrimRight - trimLeft) - startInVideoSeconds;
23
+ const audibleDuration = (actualTrimRight - trimLeft) / playbackRate;
24
+ const padAtEnd = chunkLength - audibleDuration - startInVideoSeconds;
24
25
  return (`[0:a]` +
25
26
  [
26
27
  `aformat=sample_fmts=s32:sample_rates=${sample_rate_1.DEFAULT_SAMPLE_RATE}`,
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { OffthreadVideoImageFormat } from 'remotion';
3
2
  import type { NeedsResize, SpecialVCodecForTransparency } from './assets/download-map';
4
3
  import type { FfmpegExecutable } from './ffmpeg-executable';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "3.3.10",
3
+ "version": "3.3.12",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "execa": "5.1.1",
24
24
  "extract-zip": "2.0.1",
25
- "remotion": "3.3.10",
25
+ "remotion": "3.3.12",
26
26
  "source-map": "^0.8.0-beta.0",
27
27
  "ws": "8.7.0"
28
28
  },
@@ -57,5 +57,5 @@
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "4909df63b9663ecc0294f186d5fe7efd59eee143"
60
+ "gitHead": "0c7c54df00df527cd7e395658324102461883e87"
61
61
  }