@remotion/renderer 3.3.7 → 3.3.9
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/get-video-stream-duration.d.ts +1 -1
- package/dist/combine-videos.d.ts +2 -2
- package/dist/convert-to-pcm.d.ts +1 -1
- package/dist/create-silent-audio.d.ts +1 -1
- package/dist/ensure-presentation-timestamp.d.ts +1 -1
- package/dist/extract-frame-from-video.d.ts +3 -2
- package/dist/ffmpeg-flags.d.ts +4 -4
- package/dist/get-audio-codec-name.d.ts +2 -1
- package/dist/get-frame-of-video-slow.d.ts +2 -4
- package/dist/guess-extension-for-media.d.ts +1 -1
- package/dist/offthread-video-server.d.ts +1 -1
- package/dist/redirect-status-codes.js +3 -1
- package/dist/render-still.d.ts +6 -2
- package/dist/render-still.js +14 -13
- package/dist/try-to-extract-frame-of-video-fast.d.ts +2 -1
- package/dist/validate-ffmpeg.d.ts +1 -1
- package/package.json +3 -3
|
@@ -5,5 +5,5 @@ export declare function getVideoStreamDurationwithoutCache({ src, ffprobeExecuta
|
|
|
5
5
|
src: string;
|
|
6
6
|
ffprobeExecutable: FfmpegExecutable;
|
|
7
7
|
remotionRoot: string;
|
|
8
|
-
}):
|
|
8
|
+
}): Promise<VideoDurationResult>;
|
|
9
9
|
export declare const getVideoStreamDuration: (downloadMap: DownloadMap, src: string, ffprobeExecutable: FfmpegExecutable, remotionRoot: string) => Promise<VideoDurationResult>;
|
package/dist/combine-videos.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Codec } from './codec';
|
|
2
2
|
import type { FfmpegExecutable } from './ffmpeg-executable';
|
|
3
|
-
type Options = {
|
|
3
|
+
declare type Options = {
|
|
4
4
|
files: string[];
|
|
5
5
|
filelistDir: string;
|
|
6
6
|
output: string;
|
|
@@ -12,5 +12,5 @@ type Options = {
|
|
|
12
12
|
remotionRoot: string;
|
|
13
13
|
ffmpegExecutable: FfmpegExecutable;
|
|
14
14
|
};
|
|
15
|
-
export declare const combineVideos: (options: Options) =>
|
|
15
|
+
export declare const combineVideos: (options: Options) => Promise<void>;
|
|
16
16
|
export {};
|
package/dist/convert-to-pcm.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const ensurePresentationTimestampWithoutCache: ({ src, remotionRo
|
|
|
5
5
|
remotionRoot: string;
|
|
6
6
|
ffmpegExecutable: FfmpegExecutable;
|
|
7
7
|
ffprobeExecutable: FfmpegExecutable;
|
|
8
|
-
}) =>
|
|
8
|
+
}) => Promise<string>;
|
|
9
9
|
export declare const ensurePresentationTimestamps: ({ downloadMap, src, remotionRoot, ffmpegExecutable, ffprobeExecutable, }: {
|
|
10
10
|
downloadMap: DownloadMap;
|
|
11
11
|
src: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { OffthreadVideoImageFormat } from 'remotion';
|
|
2
3
|
import type { DownloadMap } from './assets/download-map';
|
|
3
4
|
import type { FfmpegExecutable } from './ffmpeg-executable';
|
|
4
5
|
import type { LastFrameOptions } from './last-frame-from-video-cache';
|
|
5
6
|
export declare const getLastFrameOfVideo: (options: LastFrameOptions) => Promise<Buffer>;
|
|
6
|
-
type Options = {
|
|
7
|
+
declare type Options = {
|
|
7
8
|
time: number;
|
|
8
9
|
src: string;
|
|
9
10
|
ffmpegExecutable: FfmpegExecutable;
|
|
@@ -12,5 +13,5 @@ type Options = {
|
|
|
12
13
|
downloadMap: DownloadMap;
|
|
13
14
|
remotionRoot: string;
|
|
14
15
|
};
|
|
15
|
-
export declare const extractFrameFromVideo: (options: Options) =>
|
|
16
|
+
export declare const extractFrameFromVideo: (options: Options) => Promise<Buffer>;
|
|
16
17
|
export {};
|
package/dist/ffmpeg-flags.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { FfmpegExecutable } from './ffmpeg-executable';
|
|
2
|
-
export type FfmpegVersion = [number, number, number] | null;
|
|
2
|
+
export declare type FfmpegVersion = [number, number, number] | null;
|
|
3
3
|
export declare const getFfmpegBuildInfo: (options: {
|
|
4
4
|
ffmpegExecutable: string | null;
|
|
5
5
|
remotionRoot: string;
|
|
6
|
-
}) =>
|
|
6
|
+
}) => Promise<string>;
|
|
7
7
|
export declare const ffmpegInNodeModules: (remotionRoot: string, binary: 'ffmpeg' | 'ffprobe') => string | null;
|
|
8
8
|
export declare const ffmpegHasFeature: ({ ffmpegExecutable, feature, remotionRoot, }: {
|
|
9
9
|
ffmpegExecutable: string | null;
|
|
10
10
|
feature: 'enable-gpl' | 'enable-libx265' | 'enable-libvpx';
|
|
11
11
|
remotionRoot: string;
|
|
12
|
-
}) =>
|
|
12
|
+
}) => Promise<boolean>;
|
|
13
13
|
export declare const parseFfmpegVersion: (buildconf: string) => FfmpegVersion;
|
|
14
14
|
export declare const getFfmpegVersion: (options: {
|
|
15
15
|
ffmpegExecutable: string | null;
|
|
@@ -20,7 +20,7 @@ export declare const lambdaFfmpegPaths: {
|
|
|
20
20
|
readonly ffmpeg: "/opt/bin/ffmpeg";
|
|
21
21
|
readonly ffprobe: "/opt/bin/ffprobe";
|
|
22
22
|
};
|
|
23
|
-
export declare const getExecutableBinary: (ffmpegExecutable: FfmpegExecutable, remotionRoot: string, binary: 'ffmpeg' | 'ffprobe') =>
|
|
23
|
+
export declare const getExecutableBinary: (ffmpegExecutable: FfmpegExecutable, remotionRoot: string, binary: 'ffmpeg' | 'ffprobe') => string | Promise<string>;
|
|
24
24
|
export declare const getBinaryDownloadUrl: (binary: 'ffmpeg' | 'ffprobe') => {
|
|
25
25
|
url: string;
|
|
26
26
|
contentLength: number;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Codec } from './codec';
|
|
2
|
+
export declare const getAudioCodecName: (codec: Codec) => string | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { OffthreadVideoImageFormat } from 'remotion';
|
|
2
3
|
import type { SpecialVCodecForTransparency } from './assets/download-map';
|
|
3
4
|
import type { FfmpegExecutable } from './ffmpeg-executable';
|
|
@@ -7,10 +8,7 @@ export declare const getFrameOfVideoSlow: ({ src, duration, ffmpegExecutable, im
|
|
|
7
8
|
duration: number;
|
|
8
9
|
imageFormat: OffthreadVideoImageFormat;
|
|
9
10
|
specialVCodecForTransparency: SpecialVCodecForTransparency;
|
|
10
|
-
needsResize: [
|
|
11
|
-
number,
|
|
12
|
-
number
|
|
13
|
-
] | null;
|
|
11
|
+
needsResize: [number, number] | null;
|
|
14
12
|
offset: number;
|
|
15
13
|
fps: number | null;
|
|
16
14
|
remotionRoot: string;
|
|
@@ -5,7 +5,7 @@ import type { DownloadMap } from './assets/download-map';
|
|
|
5
5
|
import type { FfmpegExecutable } from './ffmpeg-executable';
|
|
6
6
|
export declare const extractUrlAndSourceFromUrl: (url: string) => {
|
|
7
7
|
src: string;
|
|
8
|
-
time:
|
|
8
|
+
time: number;
|
|
9
9
|
imageFormat: OffthreadVideoImageFormat;
|
|
10
10
|
};
|
|
11
11
|
export declare const startOffthreadVideoServer: ({ ffmpegExecutable, ffprobeExecutable, onDownload, onError, downloadMap, remotionRoot, }: {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.redirectStatusCodes = void 0;
|
|
4
|
-
|
|
4
|
+
// Don't handle 304 status code (Not Modified) as a redirect,
|
|
5
|
+
// since the browser will display the right page.
|
|
6
|
+
exports.redirectStatusCodes = [301, 302, 303, 307, 308];
|
package/dist/render-still.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { SmallTCompMetadata } from 'remotion';
|
|
2
3
|
import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
|
|
3
4
|
import type { DownloadMap } from './assets/download-map';
|
|
@@ -10,7 +11,7 @@ import type { CancelSignal } from './make-cancel-signal';
|
|
|
10
11
|
import type { ChromiumOptions } from './open-browser';
|
|
11
12
|
declare type InnerStillOptions = {
|
|
12
13
|
composition: SmallTCompMetadata;
|
|
13
|
-
output
|
|
14
|
+
output?: string | null;
|
|
14
15
|
frame?: number;
|
|
15
16
|
inputProps?: unknown;
|
|
16
17
|
imageFormat?: StillImageFormat;
|
|
@@ -32,6 +33,9 @@ declare type InnerStillOptions = {
|
|
|
32
33
|
*/
|
|
33
34
|
downloadMap?: DownloadMap;
|
|
34
35
|
};
|
|
36
|
+
declare type RenderStillReturnValue = {
|
|
37
|
+
buffer: Buffer | null;
|
|
38
|
+
};
|
|
35
39
|
export declare type RenderStillOptions = InnerStillOptions & ServeUrlOrWebpackBundle & {
|
|
36
40
|
port?: number | null;
|
|
37
41
|
};
|
|
@@ -40,5 +44,5 @@ export declare type RenderStillOptions = InnerStillOptions & ServeUrlOrWebpackBu
|
|
|
40
44
|
* @description Render a still frame from a composition
|
|
41
45
|
* @link https://www.remotion.dev/docs/renderer/render-still
|
|
42
46
|
*/
|
|
43
|
-
export declare const renderStill: (options: RenderStillOptions) => Promise<
|
|
47
|
+
export declare const renderStill: (options: RenderStillOptions) => Promise<RenderStillReturnValue>;
|
|
44
48
|
export {};
|
package/dist/render-still.js
CHANGED
|
@@ -61,24 +61,24 @@ const innerRenderStill = async ({ composition, quality, imageFormat = 'png', ser
|
|
|
61
61
|
});
|
|
62
62
|
(0, validate_puppeteer_timeout_1.validatePuppeteerTimeout)(timeoutInMilliseconds);
|
|
63
63
|
(0, validate_scale_1.validateScale)(scale);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
output = path_1.default.resolve(process.cwd(), output);
|
|
64
|
+
output =
|
|
65
|
+
typeof output === 'string' ? path_1.default.resolve(process.cwd(), output) : null;
|
|
68
66
|
if (quality !== undefined && imageFormat !== 'jpeg') {
|
|
69
67
|
throw new Error("You can only pass the `quality` option if `imageFormat` is 'jpeg'.");
|
|
70
68
|
}
|
|
71
69
|
(0, quality_1.validateQuality)(quality);
|
|
72
|
-
if (
|
|
73
|
-
if (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
if (output) {
|
|
71
|
+
if (fs_1.default.existsSync(output)) {
|
|
72
|
+
if (!overwrite) {
|
|
73
|
+
throw new Error(`Cannot render still - "overwrite" option was set to false, but the output destination ${output} already exists.`);
|
|
74
|
+
}
|
|
75
|
+
const stat = (0, fs_1.statSync)(output);
|
|
76
|
+
if (!stat.isFile()) {
|
|
77
|
+
throw new Error(`The output location ${output} already exists, but is not a file, but something else (e.g. folder). Cannot save to it.`);
|
|
78
|
+
}
|
|
79
79
|
}
|
|
80
|
+
(0, ensure_output_directory_1.ensureOutputDirectory)(output);
|
|
80
81
|
}
|
|
81
|
-
(0, ensure_output_directory_1.ensureOutputDirectory)(output);
|
|
82
82
|
const browserInstance = puppeteerInstance !== null && puppeteerInstance !== void 0 ? puppeteerInstance : (await (0, open_browser_1.openBrowser)(browser_1.DEFAULT_BROWSER, {
|
|
83
83
|
browserExecutable,
|
|
84
84
|
shouldDumpIo: dumpBrowserLogs,
|
|
@@ -151,7 +151,7 @@ const innerRenderStill = async ({ composition, quality, imageFormat = 'png', ser
|
|
|
151
151
|
page,
|
|
152
152
|
});
|
|
153
153
|
await (0, seek_to_frame_1.seekToFrame)({ frame: stillFrame, page });
|
|
154
|
-
await (0, provide_screenshot_1.provideScreenshot)({
|
|
154
|
+
const buffer = await (0, provide_screenshot_1.provideScreenshot)({
|
|
155
155
|
page,
|
|
156
156
|
imageFormat,
|
|
157
157
|
quality,
|
|
@@ -163,6 +163,7 @@ const innerRenderStill = async ({ composition, quality, imageFormat = 'png', ser
|
|
|
163
163
|
width: composition.width,
|
|
164
164
|
});
|
|
165
165
|
await cleanup();
|
|
166
|
+
return { buffer: output ? null : buffer };
|
|
166
167
|
};
|
|
167
168
|
/**
|
|
168
169
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { OffthreadVideoImageFormat } from 'remotion';
|
|
2
3
|
import type { NeedsResize, SpecialVCodecForTransparency } from './assets/download-map';
|
|
3
4
|
import type { FfmpegExecutable } from './ffmpeg-executable';
|
|
@@ -9,4 +10,4 @@ export declare const tryToExtractFrameOfVideoFast: ({ ffmpegExecutable, remotion
|
|
|
9
10
|
src: string;
|
|
10
11
|
specialVCodecForTransparency: SpecialVCodecForTransparency;
|
|
11
12
|
actualOffset: string;
|
|
12
|
-
}) =>
|
|
13
|
+
}) => Promise<readonly [string, Buffer]>;
|
|
@@ -3,5 +3,5 @@ export declare const binaryExists: (name: 'ffmpeg' | 'ffprobe') => boolean;
|
|
|
3
3
|
export declare const checkAndValidateFfmpegVersion: (options: {
|
|
4
4
|
ffmpegExecutable: string | null;
|
|
5
5
|
remotionRoot: string;
|
|
6
|
-
}) =>
|
|
6
|
+
}) => Promise<void>;
|
|
7
7
|
export declare const validateFfmpeg: (customFfmpegBinary: string | null, remotionRoot: string, binary: 'ffmpeg' | 'ffprobe') => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.9",
|
|
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.
|
|
25
|
+
"remotion": "3.3.9",
|
|
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": "
|
|
60
|
+
"gitHead": "86269c98522cb7ea280f8283fa6c57885b971b3b"
|
|
61
61
|
}
|