@remotion/vercel 4.0.426
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/README.md +18 -0
- package/dist/add-bundle-to-sandbox.d.ts +5 -0
- package/dist/create-sandbox.d.ts +9 -0
- package/dist/esm/index.mjs +2096 -0
- package/dist/index.d.ts +6 -0
- package/dist/internals/add-bundle.d.ts +1 -0
- package/dist/internals/disposable.d.ts +2 -0
- package/dist/internals/install-browser.d.ts +5 -0
- package/dist/internals/install-js-dependencies.d.ts +4 -0
- package/dist/internals/install-system-dependencies.d.ts +5 -0
- package/dist/internals/patch-compositor.d.ts +14 -0
- package/dist/render-media-on-vercel.d.ts +46 -0
- package/dist/render-still-on-vercel.d.ts +24 -0
- package/dist/render-video-on-vercel.d.ts +51 -0
- package/dist/restore-snapshot.d.ts +2 -0
- package/dist/save-snapshot.d.ts +7 -0
- package/dist/scripts/ensure-browser.d.ts +1 -0
- package/dist/scripts/render-still.d.ts +1 -0
- package/dist/scripts/render-video.d.ts +1 -0
- package/dist/scripts/upload-blob.d.ts +1 -0
- package/dist/types.d.ts +58 -0
- package/dist/upload-to-vercel-blob.d.ts +13 -0
- package/package.json +57 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { addBundleToSandbox } from './add-bundle-to-sandbox';
|
|
2
|
+
export { createSandbox } from './create-sandbox';
|
|
3
|
+
export { renderMediaOnVercel } from './render-media-on-vercel';
|
|
4
|
+
export { renderStillOnVercel } from './render-still-on-vercel';
|
|
5
|
+
export type { AudioCodec, Bitrate, ChromeMode, ChromiumOptions, Codec, ColorSpace, CreateSandboxOnProgress, FrameRange, HardwareAccelerationOption, LogLevel, OpenGlRenderer, PixelFormat, ProResProfile, RenderMediaOnProgress, RenderMediaOnVercelProgress, RenderMediaProgress, RenderStillOnVercelProgress, StillImageFormat, StitchingState, VercelBlobAccess, VercelSandbox, VideoImageFormat, X264Preset, } from './types';
|
|
6
|
+
export { uploadToVercelBlob } from './upload-to-vercel-blob';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const REMOTION_SANDBOX_BUNDLE_DIR = "remotion-bundle";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { VercelSandbox } from '../types';
|
|
2
|
+
export declare const createDisposableSandbox: (options: (import("@vercel/sandbox/dist/utils/types").WithPrivate<import("@vercel/sandbox/dist/sandbox").CreateSandboxParams | (import("@vercel/sandbox/dist/sandbox").CreateSandboxParams & import("@vercel/sandbox/dist/utils/get-credentials").Credentials)> & import("@vercel/sandbox/dist/api-client/api-client").WithFetchOptions) | undefined) => Promise<VercelSandbox>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Sandbox } from '@vercel/sandbox';
|
|
2
|
+
/**
|
|
3
|
+
* Remotion does not officially support glibc 2.34, but it can be patched.
|
|
4
|
+
*
|
|
5
|
+
* Vercel Sandbox runs Amazon Linux 2023 which ships glibc 2.34,
|
|
6
|
+
* but the compositor binary requires glibc 2.35.
|
|
7
|
+
* We download Ubuntu 22.04's libc6 package and use patchelf to
|
|
8
|
+
* point the compositor at the bundled glibc.
|
|
9
|
+
*
|
|
10
|
+
* Only the `remotion` binary needs patching - ffmpeg/ffprobe work fine on glibc 2.34.
|
|
11
|
+
*/
|
|
12
|
+
export declare function patchCompositor({ sandbox }: {
|
|
13
|
+
sandbox: Sandbox;
|
|
14
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Sandbox } from '@vercel/sandbox';
|
|
2
|
+
import type { AudioCodec, Bitrate, ChromiumOptions, Codec, ColorSpace, FrameRange, HardwareAccelerationOption, LogLevel, PixelFormat, ProResProfile, RenderMediaOnVercelProgress, VideoImageFormat, X264Preset } from './types';
|
|
3
|
+
export declare function renderMediaOnVercel({ sandbox, compositionId, inputProps, onProgress, outputFile, codec, crf, imageFormat, pixelFormat, envVariables, frameRange, everyNthFrame, proResProfile, chromiumOptions, scale, preferLossless, enforceAudioTrack, disallowParallelEncoding, concurrency, metadata, licenseKey, videoBitrate, audioBitrate, encodingMaxRate, encodingBufferSize, muted, numberOfGifLoops, x264Preset, colorSpace, jpegQuality, audioCodec, logLevel, timeoutInMilliseconds, forSeamlessAacConcatenation, separateAudioTo, hardwareAcceleration, offthreadVideoCacheSizeInBytes, mediaCacheSizeInBytes, offthreadVideoThreads }: {
|
|
4
|
+
sandbox: Sandbox;
|
|
5
|
+
compositionId: string;
|
|
6
|
+
inputProps: Record<string, unknown>;
|
|
7
|
+
onProgress?: (progress: RenderMediaOnVercelProgress) => Promise<void> | void;
|
|
8
|
+
outputFile?: string;
|
|
9
|
+
codec?: Codec;
|
|
10
|
+
crf?: number | null;
|
|
11
|
+
imageFormat?: VideoImageFormat | null;
|
|
12
|
+
pixelFormat?: PixelFormat | null;
|
|
13
|
+
envVariables?: Record<string, string>;
|
|
14
|
+
frameRange?: FrameRange | null;
|
|
15
|
+
everyNthFrame?: number;
|
|
16
|
+
proResProfile?: ProResProfile;
|
|
17
|
+
chromiumOptions?: ChromiumOptions;
|
|
18
|
+
scale?: number;
|
|
19
|
+
preferLossless?: boolean;
|
|
20
|
+
enforceAudioTrack?: boolean;
|
|
21
|
+
disallowParallelEncoding?: boolean;
|
|
22
|
+
concurrency?: number | string | null;
|
|
23
|
+
metadata?: Record<string, string> | null;
|
|
24
|
+
licenseKey?: string | null;
|
|
25
|
+
videoBitrate?: Bitrate | null;
|
|
26
|
+
audioBitrate?: Bitrate | null;
|
|
27
|
+
encodingMaxRate?: Bitrate | null;
|
|
28
|
+
encodingBufferSize?: Bitrate | null;
|
|
29
|
+
muted?: boolean;
|
|
30
|
+
numberOfGifLoops?: number | null;
|
|
31
|
+
x264Preset?: X264Preset | null;
|
|
32
|
+
colorSpace?: ColorSpace;
|
|
33
|
+
jpegQuality?: number;
|
|
34
|
+
audioCodec?: AudioCodec | null;
|
|
35
|
+
logLevel?: LogLevel;
|
|
36
|
+
timeoutInMilliseconds?: number;
|
|
37
|
+
forSeamlessAacConcatenation?: boolean;
|
|
38
|
+
separateAudioTo?: string | null;
|
|
39
|
+
hardwareAcceleration?: HardwareAccelerationOption;
|
|
40
|
+
offthreadVideoCacheSizeInBytes?: number | null;
|
|
41
|
+
mediaCacheSizeInBytes?: number | null;
|
|
42
|
+
offthreadVideoThreads?: number | null;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
sandboxFilePath: string;
|
|
45
|
+
contentType: string;
|
|
46
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Sandbox } from '@vercel/sandbox';
|
|
2
|
+
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
|
+
sandbox: Sandbox;
|
|
5
|
+
compositionId: string;
|
|
6
|
+
inputProps: Record<string, unknown>;
|
|
7
|
+
onProgress?: (progress: RenderStillOnVercelProgress) => Promise<void> | void;
|
|
8
|
+
outputFile?: string;
|
|
9
|
+
frame?: number;
|
|
10
|
+
imageFormat?: StillImageFormat;
|
|
11
|
+
jpegQuality?: number;
|
|
12
|
+
envVariables?: Record<string, string>;
|
|
13
|
+
chromiumOptions?: ChromiumOptions;
|
|
14
|
+
scale?: number;
|
|
15
|
+
logLevel?: LogLevel;
|
|
16
|
+
timeoutInMilliseconds?: number;
|
|
17
|
+
offthreadVideoCacheSizeInBytes?: number | null;
|
|
18
|
+
mediaCacheSizeInBytes?: number | null;
|
|
19
|
+
offthreadVideoThreads?: number | null;
|
|
20
|
+
licenseKey?: string | null;
|
|
21
|
+
}): Promise<{
|
|
22
|
+
sandboxFilePath: string;
|
|
23
|
+
contentType: string;
|
|
24
|
+
}>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Sandbox } from '@vercel/sandbox';
|
|
2
|
+
import type { AudioCodec, Bitrate, ChromeMode, ChromiumOptions, Codec, ColorSpace, FrameRange, HardwareAccelerationOption, LogLevel, PixelFormat, ProResProfile, RenderOnVercelProgress, VideoImageFormat, X264Preset } from './types';
|
|
3
|
+
export declare function renderVideoOnVercel({ sandbox, compositionId, inputProps, onProgress, bundleDir, outputFile, codec, crf, imageFormat, pixelFormat, envVariables, frameRange, everyNthFrame, overwrite, proResProfile, chromiumOptions, scale, browserExecutable, preferLossless, enforceAudioTrack, disallowParallelEncoding, concurrency, binariesDirectory, metadata, licenseKey, videoBitrate, audioBitrate, encodingMaxRate, encodingBufferSize, muted, numberOfGifLoops, x264Preset, colorSpace, jpegQuality, audioCodec, logLevel, timeoutInMilliseconds, forSeamlessAacConcatenation, separateAudioTo, hardwareAcceleration, chromeMode, offthreadVideoCacheSizeInBytes, mediaCacheSizeInBytes, offthreadVideoThreads, repro }: {
|
|
4
|
+
sandbox: Sandbox;
|
|
5
|
+
compositionId: string;
|
|
6
|
+
inputProps: Record<string, unknown>;
|
|
7
|
+
onProgress?: (progress: RenderOnVercelProgress) => void;
|
|
8
|
+
bundleDir?: string;
|
|
9
|
+
outputFile?: string;
|
|
10
|
+
codec?: Codec;
|
|
11
|
+
crf?: number | null;
|
|
12
|
+
imageFormat?: VideoImageFormat | null;
|
|
13
|
+
pixelFormat?: PixelFormat | null;
|
|
14
|
+
envVariables?: Record<string, string>;
|
|
15
|
+
frameRange?: FrameRange | null;
|
|
16
|
+
everyNthFrame?: number;
|
|
17
|
+
overwrite?: boolean;
|
|
18
|
+
proResProfile?: ProResProfile;
|
|
19
|
+
chromiumOptions?: ChromiumOptions;
|
|
20
|
+
scale?: number;
|
|
21
|
+
browserExecutable?: string | null;
|
|
22
|
+
preferLossless?: boolean;
|
|
23
|
+
enforceAudioTrack?: boolean;
|
|
24
|
+
disallowParallelEncoding?: boolean;
|
|
25
|
+
concurrency?: number | string | null;
|
|
26
|
+
binariesDirectory?: string | null;
|
|
27
|
+
metadata?: Record<string, string> | null;
|
|
28
|
+
licenseKey?: string | null;
|
|
29
|
+
videoBitrate?: Bitrate | null;
|
|
30
|
+
audioBitrate?: Bitrate | null;
|
|
31
|
+
encodingMaxRate?: Bitrate | null;
|
|
32
|
+
encodingBufferSize?: Bitrate | null;
|
|
33
|
+
muted?: boolean;
|
|
34
|
+
numberOfGifLoops?: number | null;
|
|
35
|
+
x264Preset?: X264Preset | null;
|
|
36
|
+
colorSpace?: ColorSpace;
|
|
37
|
+
jpegQuality?: number;
|
|
38
|
+
audioCodec?: AudioCodec | null;
|
|
39
|
+
logLevel?: LogLevel;
|
|
40
|
+
timeoutInMilliseconds?: number;
|
|
41
|
+
forSeamlessAacConcatenation?: boolean;
|
|
42
|
+
separateAudioTo?: string | null;
|
|
43
|
+
hardwareAcceleration?: HardwareAccelerationOption;
|
|
44
|
+
chromeMode?: ChromeMode;
|
|
45
|
+
offthreadVideoCacheSizeInBytes?: number | null;
|
|
46
|
+
mediaCacheSizeInBytes?: number | null;
|
|
47
|
+
offthreadVideoThreads?: number | null;
|
|
48
|
+
repro?: boolean;
|
|
49
|
+
}): Promise<{
|
|
50
|
+
file: string;
|
|
51
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Sandbox } from '@vercel/sandbox';
|
|
2
|
+
export type VercelSandbox = Sandbox & AsyncDisposable;
|
|
3
|
+
export type CreateSandboxOnProgress = (update: {
|
|
4
|
+
progress: number;
|
|
5
|
+
message: string;
|
|
6
|
+
}) => Promise<void> | void;
|
|
7
|
+
export type { AudioCodec, Bitrate, ChromeMode, ChromiumOptions, Codec, ColorSpace, FrameRange, LogLevel, OpenGlRenderer, PixelFormat, RenderMediaOnProgress, RenderMediaProgress, StillImageFormat, StitchingState, VideoImageFormat, X264Preset, } from '@remotion/renderer';
|
|
8
|
+
import type { RenderMediaProgress } from '@remotion/renderer';
|
|
9
|
+
export type RenderMediaOnVercelProgress = {
|
|
10
|
+
stage: 'opening-browser';
|
|
11
|
+
overallProgress: number;
|
|
12
|
+
} | {
|
|
13
|
+
stage: 'selecting-composition';
|
|
14
|
+
overallProgress: number;
|
|
15
|
+
} | {
|
|
16
|
+
stage: 'render-progress';
|
|
17
|
+
progress: RenderMediaProgress;
|
|
18
|
+
overallProgress: number;
|
|
19
|
+
};
|
|
20
|
+
export type RenderStillOnVercelProgress = {
|
|
21
|
+
stage: 'opening-browser';
|
|
22
|
+
overallProgress: number;
|
|
23
|
+
} | {
|
|
24
|
+
stage: 'selecting-composition';
|
|
25
|
+
overallProgress: number;
|
|
26
|
+
};
|
|
27
|
+
export type { HardwareAccelerationOption, ProResProfile, } from '@remotion/renderer/client';
|
|
28
|
+
export type VercelBlobAccess = 'public';
|
|
29
|
+
export type SandboxRenderMediaMessage = {
|
|
30
|
+
stage: 'opening-browser';
|
|
31
|
+
overallProgress: number;
|
|
32
|
+
} | {
|
|
33
|
+
stage: 'selecting-composition';
|
|
34
|
+
overallProgress: number;
|
|
35
|
+
} | {
|
|
36
|
+
stage: 'render-progress';
|
|
37
|
+
progress: RenderMediaProgress;
|
|
38
|
+
overallProgress: number;
|
|
39
|
+
} | {
|
|
40
|
+
stage: 'render-complete';
|
|
41
|
+
overallProgress: number;
|
|
42
|
+
} | {
|
|
43
|
+
stage: 'done';
|
|
44
|
+
size: number;
|
|
45
|
+
contentType: string;
|
|
46
|
+
overallProgress: number;
|
|
47
|
+
};
|
|
48
|
+
export type SandboxRenderStillMessage = {
|
|
49
|
+
type: 'opening-browser';
|
|
50
|
+
} | {
|
|
51
|
+
type: 'selecting-composition';
|
|
52
|
+
} | {
|
|
53
|
+
type: 'render-complete';
|
|
54
|
+
} | {
|
|
55
|
+
type: 'done';
|
|
56
|
+
size: number;
|
|
57
|
+
contentType: string;
|
|
58
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Sandbox } from '@vercel/sandbox';
|
|
2
|
+
import type { VercelBlobAccess } from './types';
|
|
3
|
+
export declare function uploadToVercelBlob({ sandbox, sandboxFilePath, blobPath, contentType, blobToken, access }: {
|
|
4
|
+
sandbox: Sandbox;
|
|
5
|
+
sandboxFilePath: string;
|
|
6
|
+
blobPath?: string;
|
|
7
|
+
contentType: string;
|
|
8
|
+
blobToken: string;
|
|
9
|
+
access: VercelBlobAccess;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
url: string;
|
|
12
|
+
size: number;
|
|
13
|
+
}>;
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@remotion/vercel",
|
|
3
|
+
"version": "4.0.426",
|
|
4
|
+
"description": "Render Remotion videos on Vercel Sandbox",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"module": "dist/esm/index.mjs",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/vercel"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"type": "module",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"formatting": "prettier src --check",
|
|
15
|
+
"lint": "eslint src",
|
|
16
|
+
"watch": "tsgo -w",
|
|
17
|
+
"make": "bun --env-file=../.env.bundle bundle.ts && tsgo"
|
|
18
|
+
},
|
|
19
|
+
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
20
|
+
"contributors": [],
|
|
21
|
+
"license": "Remotion License",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@remotion/renderer": "4.0.426",
|
|
27
|
+
"remotion": "4.0.426"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@vercel/sandbox": ">=1.0.0"
|
|
31
|
+
},
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"module": "./dist/esm/index.mjs",
|
|
36
|
+
"import": "./dist/esm/index.mjs"
|
|
37
|
+
},
|
|
38
|
+
"./package.json": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@remotion/eslint-config-internal": "4.0.426",
|
|
42
|
+
"@vercel/blob": "2.0.1",
|
|
43
|
+
"@vercel/sandbox": "1.6.0",
|
|
44
|
+
"eslint": "9.19.0",
|
|
45
|
+
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"remotion",
|
|
49
|
+
"vercel",
|
|
50
|
+
"sandbox",
|
|
51
|
+
"video"
|
|
52
|
+
],
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
},
|
|
56
|
+
"homepage": "https://www.remotion.dev/docs/vercel/api"
|
|
57
|
+
}
|