@remotion/vercel 4.0.429 → 4.0.430
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/scripts/upload-blob.d.ts +1 -0
- package/package.json +2 -1
- package/dist/create-snapshot.d.ts +0 -6
- package/dist/get-or-create-sandbox.d.ts +0 -5
- package/dist/get-snapshot.d.ts +0 -1
- package/dist/internals/ensure-browser-script.d.ts +0 -1
- package/dist/internals/render-still-script.d.ts +0 -1
- package/dist/internals/render-video-script.d.ts +0 -1
- package/dist/render-still.d.ts +0 -12
- package/dist/render-video.d.ts +0 -12
- package/dist/upload-to-blob-storage.d.ts +0 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/vercel",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.430",
|
|
4
4
|
"description": "Render Remotion videos on Vercel Sandbox",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"type": "module",
|
|
13
13
|
"scripts": {
|
|
14
14
|
"formatting": "oxfmt src --check",
|
|
15
|
+
"format": "oxfmt src",
|
|
15
16
|
"lint": "eslint src",
|
|
16
17
|
"watch": "tsgo -w",
|
|
17
18
|
"make": "bun --env-file=../.env.bundle bundle.ts && tsgo"
|
package/dist/get-snapshot.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getSnapshot(): Promise<string | null>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const script = "import {ensureBrowser} from '@remotion/renderer';\n\nawait ensureBrowser({\n\tonBrowserDownload: () => {\n\t\treturn {\n\t\t\tversion: null,\n\t\t\tonProgress: ({percent}) => {\n\t\t\t\tconsole.log(JSON.stringify({type: 'browser-progress', percent}));\n\t\t\t},\n\t\t};\n\t},\n});\n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const script = "import {RenderInternals} from '@remotion/renderer';\nimport {statSync} from 'fs';\nimport {NoReactInternals} from 'remotion/no-react';\n\ntype InternalStillOptions = Parameters<\n\ttypeof RenderInternals.internalRenderStill\n>[0];\n\ntype RenderStillConfig = {\n\tcompositionId: string;\n\tinputProps: Record<string, unknown>;\n\toutput: InternalStillOptions['output'];\n\tserveUrl: InternalStillOptions['serveUrl'];\n\tframe: InternalStillOptions['frame'];\n\timageFormat: InternalStillOptions['imageFormat'];\n\tjpegQuality: InternalStillOptions['jpegQuality'];\n\tenvVariables: InternalStillOptions['envVariables'];\n\toverwrite: InternalStillOptions['overwrite'];\n\tbrowserExecutable: InternalStillOptions['browserExecutable'];\n\tchromiumOptions: InternalStillOptions['chromiumOptions'];\n\tscale: InternalStillOptions['scale'];\n\tlogLevel: InternalStillOptions['logLevel'];\n\ttimeoutInMilliseconds: InternalStillOptions['timeoutInMilliseconds'];\n\tbinariesDirectory: InternalStillOptions['binariesDirectory'];\n\tchromeMode: InternalStillOptions['chromeMode'];\n\toffthreadVideoCacheSizeInBytes: InternalStillOptions['offthreadVideoCacheSizeInBytes'];\n\tmediaCacheSizeInBytes: InternalStillOptions['mediaCacheSizeInBytes'];\n\toffthreadVideoThreads: InternalStillOptions['offthreadVideoThreads'];\n\tlicenseKey: InternalStillOptions['licenseKey'];\n};\n\nconst config: RenderStillConfig = JSON.parse(process.argv[2]);\n\nconst noop = () => undefined;\n\ntry {\n\tconst serializedInputProps = NoReactInternals.serializeJSONWithSpecialTypes({\n\t\tdata: config.inputProps,\n\t\tindent: undefined,\n\t\tstaticBase: null,\n\t}).serializedString;\n\n\tconsole.log(JSON.stringify({type: 'opening-browser'}));\n\n\tconst browser = await RenderInternals.internalOpenBrowser({\n\t\tbrowser: 'chrome',\n\t\tbrowserExecutable: config.browserExecutable,\n\t\tchromiumOptions: config.chromiumOptions,\n\t\tforceDeviceScaleFactor: undefined,\n\t\tviewport: null,\n\t\tindent: false,\n\t\tlogLevel: config.logLevel,\n\t\tonBrowserDownload: () => ({\n\t\t\tversion: null,\n\t\t\tonProgress: noop,\n\t\t}),\n\t\tchromeMode: config.chromeMode,\n\t});\n\n\tconsole.log(JSON.stringify({type: 'selecting-composition'}));\n\n\tconst {metadata: composition} =\n\t\tawait RenderInternals.internalSelectComposition({\n\t\t\tserializedInputPropsWithCustomSchema: serializedInputProps,\n\t\t\tenvVariables: config.envVariables,\n\t\t\tpuppeteerInstance: browser,\n\t\t\tonBrowserLog: null,\n\t\t\tbrowserExecutable: config.browserExecutable,\n\t\t\tchromiumOptions: config.chromiumOptions,\n\t\t\tport: null,\n\t\t\tindent: false,\n\t\t\tserver: undefined,\n\t\t\tserveUrl: config.serveUrl,\n\t\t\tid: config.compositionId,\n\t\t\tonServeUrlVisited: noop,\n\t\t\tlogLevel: config.logLevel,\n\t\t\ttimeoutInMilliseconds: config.timeoutInMilliseconds,\n\t\t\tbinariesDirectory: config.binariesDirectory,\n\t\t\tonBrowserDownload: () => ({\n\t\t\t\tversion: null,\n\t\t\t\tonProgress: noop,\n\t\t\t}),\n\t\t\tchromeMode: config.chromeMode,\n\t\t\tmediaCacheSizeInBytes: config.mediaCacheSizeInBytes,\n\t\t\toffthreadVideoCacheSizeInBytes: config.offthreadVideoCacheSizeInBytes,\n\t\t\toffthreadVideoThreads: config.offthreadVideoThreads,\n\t\t});\n\n\tconst serializedResolvedProps =\n\t\tNoReactInternals.serializeJSONWithSpecialTypes({\n\t\t\tdata: composition.props,\n\t\t\tindent: undefined,\n\t\t\tstaticBase: null,\n\t\t}).serializedString;\n\n\tawait RenderInternals.internalRenderStill({\n\t\toutput: config.output,\n\t\tcomposition,\n\t\tserializedInputPropsWithCustomSchema: serializedInputProps,\n\t\tserializedResolvedPropsWithCustomSchema: serializedResolvedProps,\n\t\tserveUrl: config.serveUrl,\n\t\tframe: config.frame,\n\t\timageFormat: config.imageFormat,\n\t\tjpegQuality: config.jpegQuality,\n\t\tenvVariables: config.envVariables,\n\t\toverwrite: config.overwrite,\n\t\tbrowserExecutable: config.browserExecutable,\n\t\tchromiumOptions: config.chromiumOptions,\n\t\tscale: config.scale,\n\t\tlogLevel: config.logLevel,\n\t\ttimeoutInMilliseconds: config.timeoutInMilliseconds,\n\t\tbinariesDirectory: config.binariesDirectory,\n\t\tchromeMode: config.chromeMode,\n\t\toffthreadVideoCacheSizeInBytes: config.offthreadVideoCacheSizeInBytes,\n\t\tmediaCacheSizeInBytes: config.mediaCacheSizeInBytes,\n\t\toffthreadVideoThreads: config.offthreadVideoThreads,\n\t\tlicenseKey: config.licenseKey,\n\t\t// Non-serializable fields with defaults\n\t\tpuppeteerInstance: browser,\n\t\tonBrowserLog: null,\n\t\tonDownload: null,\n\t\tcancelSignal: null,\n\t\tindent: false,\n\t\tserver: undefined,\n\t\tport: null,\n\t\tonArtifact: null,\n\t\tonLog: RenderInternals.defaultOnLog,\n\t\tisProduction: true,\n\t\tonBrowserDownload: () => ({\n\t\t\tversion: null,\n\t\t\tonProgress: noop,\n\t\t}),\n\t});\n\n\tconsole.log(JSON.stringify({type: 'render-complete'}));\n\tawait browser.close({silent: false});\n\n\tconst {size} = statSync(config.output ?? '/tmp/still.png');\n\tconsole.log(JSON.stringify({type: 'done', size}));\n} catch (err) {\n\tconsole.error((err as Error).message);\n\tprocess.exit(1);\n}\n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const script = "import type {InternalRenderMediaOptions} from '@remotion/renderer';\nimport {RenderInternals} from '@remotion/renderer';\nimport {statSync} from 'fs';\nimport {NoReactInternals} from 'remotion/no-react';\n\ntype RenderVideoConfig = {\n\tcompositionId: string;\n\tinputProps: Record<string, unknown>;\n\toutputLocation: InternalRenderMediaOptions['outputLocation'];\n\tserveUrl: InternalRenderMediaOptions['serveUrl'];\n\tcrf: InternalRenderMediaOptions['crf'];\n\timageFormat: InternalRenderMediaOptions['imageFormat'];\n\tpixelFormat: InternalRenderMediaOptions['pixelFormat'];\n\tenvVariables: InternalRenderMediaOptions['envVariables'];\n\tframeRange: InternalRenderMediaOptions['frameRange'];\n\teveryNthFrame: InternalRenderMediaOptions['everyNthFrame'];\n\toverwrite: InternalRenderMediaOptions['overwrite'];\n\tproResProfile: NonNullable<\n\t\tInternalRenderMediaOptions['proResProfile']\n\t> | null;\n\tchromiumOptions: InternalRenderMediaOptions['chromiumOptions'];\n\tscale: InternalRenderMediaOptions['scale'];\n\tbrowserExecutable: InternalRenderMediaOptions['browserExecutable'];\n\tpreferLossless: InternalRenderMediaOptions['preferLossless'];\n\tenforceAudioTrack: InternalRenderMediaOptions['enforceAudioTrack'];\n\tdisallowParallelEncoding: InternalRenderMediaOptions['disallowParallelEncoding'];\n\tconcurrency: InternalRenderMediaOptions['concurrency'];\n\tbinariesDirectory: InternalRenderMediaOptions['binariesDirectory'];\n\tmetadata: InternalRenderMediaOptions['metadata'];\n\tlicenseKey: InternalRenderMediaOptions['licenseKey'];\n\tcodec: InternalRenderMediaOptions['codec'];\n\tvideoBitrate: InternalRenderMediaOptions['videoBitrate'];\n\taudioBitrate: InternalRenderMediaOptions['audioBitrate'];\n\tencodingMaxRate: InternalRenderMediaOptions['encodingMaxRate'];\n\tencodingBufferSize: InternalRenderMediaOptions['encodingBufferSize'];\n\tmuted: InternalRenderMediaOptions['muted'];\n\tnumberOfGifLoops: InternalRenderMediaOptions['numberOfGifLoops'];\n\tx264Preset: InternalRenderMediaOptions['x264Preset'];\n\tcolorSpace: InternalRenderMediaOptions['colorSpace'];\n\tjpegQuality: InternalRenderMediaOptions['jpegQuality'];\n\taudioCodec: InternalRenderMediaOptions['audioCodec'];\n\tlogLevel: InternalRenderMediaOptions['logLevel'];\n\ttimeoutInMilliseconds: InternalRenderMediaOptions['timeoutInMilliseconds'];\n\tforSeamlessAacConcatenation: InternalRenderMediaOptions['forSeamlessAacConcatenation'];\n\tseparateAudioTo: InternalRenderMediaOptions['separateAudioTo'];\n\thardwareAcceleration: InternalRenderMediaOptions['hardwareAcceleration'];\n\tchromeMode: InternalRenderMediaOptions['chromeMode'];\n\toffthreadVideoCacheSizeInBytes: InternalRenderMediaOptions['offthreadVideoCacheSizeInBytes'];\n\tmediaCacheSizeInBytes: InternalRenderMediaOptions['mediaCacheSizeInBytes'];\n\toffthreadVideoThreads: InternalRenderMediaOptions['offthreadVideoThreads'];\n\trepro: InternalRenderMediaOptions['repro'];\n};\n\nconst config: RenderVideoConfig = JSON.parse(process.argv[2]);\n\nconst noop = () => undefined;\n\ntry {\n\tconst serializedInputProps = NoReactInternals.serializeJSONWithSpecialTypes({\n\t\tdata: config.inputProps,\n\t\tindent: undefined,\n\t\tstaticBase: null,\n\t}).serializedString;\n\n\tconsole.log(JSON.stringify({type: 'opening-browser'}));\n\n\tconst browser = await RenderInternals.internalOpenBrowser({\n\t\tbrowser: 'chrome',\n\t\tbrowserExecutable: config.browserExecutable,\n\t\tchromiumOptions: config.chromiumOptions,\n\t\tforceDeviceScaleFactor: undefined,\n\t\tviewport: null,\n\t\tindent: false,\n\t\tlogLevel: config.logLevel,\n\t\tonBrowserDownload: () => ({\n\t\t\tversion: null,\n\t\t\tonProgress: noop,\n\t\t}),\n\t\tchromeMode: config.chromeMode,\n\t});\n\n\tconsole.log(JSON.stringify({type: 'selecting-composition'}));\n\n\tconst {metadata: composition} =\n\t\tawait RenderInternals.internalSelectComposition({\n\t\t\tserializedInputPropsWithCustomSchema: serializedInputProps,\n\t\t\tenvVariables: config.envVariables,\n\t\t\tpuppeteerInstance: browser,\n\t\t\tonBrowserLog: null,\n\t\t\tbrowserExecutable: config.browserExecutable,\n\t\t\tchromiumOptions: config.chromiumOptions,\n\t\t\tport: null,\n\t\t\tindent: false,\n\t\t\tserver: undefined,\n\t\t\tserveUrl: config.serveUrl,\n\t\t\tid: config.compositionId,\n\t\t\tonServeUrlVisited: noop,\n\t\t\tlogLevel: config.logLevel,\n\t\t\ttimeoutInMilliseconds: config.timeoutInMilliseconds,\n\t\t\tbinariesDirectory: config.binariesDirectory,\n\t\t\tonBrowserDownload: () => ({\n\t\t\t\tversion: null,\n\t\t\t\tonProgress: noop,\n\t\t\t}),\n\t\t\tchromeMode: config.chromeMode,\n\t\t\tmediaCacheSizeInBytes: config.mediaCacheSizeInBytes,\n\t\t\toffthreadVideoCacheSizeInBytes: config.offthreadVideoCacheSizeInBytes,\n\t\t\toffthreadVideoThreads: config.offthreadVideoThreads,\n\t\t});\n\n\tconst serializedResolvedProps =\n\t\tNoReactInternals.serializeJSONWithSpecialTypes({\n\t\t\tdata: composition.props,\n\t\t\tindent: undefined,\n\t\t\tstaticBase: null,\n\t\t}).serializedString;\n\n\tawait RenderInternals.internalRenderMedia({\n\t\toutputLocation: config.outputLocation,\n\t\tcomposition,\n\t\tserializedInputPropsWithCustomSchema: serializedInputProps,\n\t\tserializedResolvedPropsWithCustomSchema: serializedResolvedProps,\n\t\tserveUrl: config.serveUrl,\n\t\tcodec: config.codec,\n\t\tcrf: config.crf,\n\t\timageFormat: config.imageFormat,\n\t\tpixelFormat: config.pixelFormat,\n\t\tenvVariables: config.envVariables,\n\t\tframeRange: config.frameRange,\n\t\teveryNthFrame: config.everyNthFrame,\n\t\toverwrite: config.overwrite,\n\t\tproResProfile: config.proResProfile ?? undefined,\n\t\tchromiumOptions: config.chromiumOptions,\n\t\tscale: config.scale,\n\t\tbrowserExecutable: config.browserExecutable,\n\t\tpreferLossless: config.preferLossless,\n\t\tenforceAudioTrack: config.enforceAudioTrack,\n\t\tdisallowParallelEncoding: config.disallowParallelEncoding,\n\t\tconcurrency: config.concurrency,\n\t\tbinariesDirectory: config.binariesDirectory,\n\t\tmetadata: config.metadata,\n\t\tlicenseKey: config.licenseKey,\n\t\tvideoBitrate: config.videoBitrate,\n\t\taudioBitrate: config.audioBitrate,\n\t\tencodingMaxRate: config.encodingMaxRate,\n\t\tencodingBufferSize: config.encodingBufferSize,\n\t\tmuted: config.muted,\n\t\tnumberOfGifLoops: config.numberOfGifLoops,\n\t\tx264Preset: config.x264Preset,\n\t\tcolorSpace: config.colorSpace,\n\t\tjpegQuality: config.jpegQuality,\n\t\taudioCodec: config.audioCodec,\n\t\tlogLevel: config.logLevel,\n\t\ttimeoutInMilliseconds: config.timeoutInMilliseconds,\n\t\tforSeamlessAacConcatenation: config.forSeamlessAacConcatenation,\n\t\tseparateAudioTo: config.separateAudioTo,\n\t\thardwareAcceleration: config.hardwareAcceleration,\n\t\tchromeMode: config.chromeMode,\n\t\toffthreadVideoCacheSizeInBytes: config.offthreadVideoCacheSizeInBytes,\n\t\tmediaCacheSizeInBytes: config.mediaCacheSizeInBytes,\n\t\toffthreadVideoThreads: config.offthreadVideoThreads,\n\t\trepro: config.repro,\n\t\t// Non-serializable fields with defaults\n\t\tpuppeteerInstance: browser,\n\t\tonProgress: (progress) => {\n\t\t\tconsole.log(\n\t\t\t\tJSON.stringify({\n\t\t\t\t\ttype: 'progress',\n\t\t\t\t\trenderedFrames: progress.renderedFrames,\n\t\t\t\t\tencodedFrames: progress.encodedFrames,\n\t\t\t\t\tencodedDoneIn: progress.encodedDoneIn,\n\t\t\t\t\trenderedDoneIn: progress.renderedDoneIn,\n\t\t\t\t\trenderEstimatedTime: progress.renderEstimatedTime,\n\t\t\t\t\tprogress: progress.progress,\n\t\t\t\t\tstitchStage: progress.stitchStage,\n\t\t\t\t}),\n\t\t\t);\n\t\t},\n\t\tonDownload: () => undefined,\n\t\tonBrowserLog: null,\n\t\tonStart: noop,\n\t\tport: null,\n\t\tcancelSignal: undefined,\n\t\tonCtrlCExit: noop,\n\t\tindent: false,\n\t\tserver: undefined,\n\t\tffmpegOverride: undefined,\n\t\tcompositionStart: 0,\n\t\tonArtifact: null,\n\t\tonLog: RenderInternals.defaultOnLog,\n\t\tisProduction: true,\n\t\tonBrowserDownload: () => ({\n\t\t\tversion: null,\n\t\t\tonProgress: noop,\n\t\t}),\n\t});\n\n\tconsole.log(JSON.stringify({type: 'render-complete'}));\n\tawait browser.close({silent: false});\n\n\tconst {size} = statSync(config.outputLocation ?? '/tmp/video.mp4');\n\tconsole.log(JSON.stringify({type: 'done', size}));\n} catch (err) {\n\tconsole.error((err as Error).message);\n\tprocess.exit(1);\n}\n";
|
package/dist/render-still.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { RenderOnVercelProgress, VercelSandbox } from './types';
|
|
2
|
-
export declare function renderStillOnVercel({ sandbox, compositionId, inputProps, imageFormat, outputFile, onProgress, bundleDir }: {
|
|
3
|
-
sandbox: VercelSandbox;
|
|
4
|
-
compositionId: string;
|
|
5
|
-
inputProps: Record<string, unknown>;
|
|
6
|
-
imageFormat?: 'png' | 'jpeg' | 'webp';
|
|
7
|
-
outputFile?: string;
|
|
8
|
-
onProgress?: (progress: RenderOnVercelProgress) => void;
|
|
9
|
-
bundleDir?: string;
|
|
10
|
-
}): Promise<{
|
|
11
|
-
file: string;
|
|
12
|
-
}>;
|
package/dist/render-video.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { RenderOnVercelProgress, VercelSandbox } from './types';
|
|
2
|
-
export declare function renderVideoOnVercel({ sandbox, compositionId, inputProps, codec, outputFile, onProgress, bundleDir }: {
|
|
3
|
-
sandbox: VercelSandbox;
|
|
4
|
-
compositionId: string;
|
|
5
|
-
inputProps: Record<string, unknown>;
|
|
6
|
-
codec?: string;
|
|
7
|
-
outputFile?: string;
|
|
8
|
-
onProgress?: (progress: RenderOnVercelProgress) => void;
|
|
9
|
-
bundleDir?: string;
|
|
10
|
-
}): Promise<{
|
|
11
|
-
file: string;
|
|
12
|
-
}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { VercelSandbox } from './types';
|
|
2
|
-
export declare function uploadToBlobStorage({ sandbox, sandboxFilePath, blobPath, contentType, blobToken }: {
|
|
3
|
-
sandbox: VercelSandbox;
|
|
4
|
-
sandboxFilePath: string;
|
|
5
|
-
blobPath?: string;
|
|
6
|
-
contentType: string;
|
|
7
|
-
blobToken: string;
|
|
8
|
-
}): Promise<{
|
|
9
|
-
url: string;
|
|
10
|
-
size: number;
|
|
11
|
-
}>;
|