@remotion/renderer 4.0.363 → 4.0.365
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/package.json +12 -12
- package/.prettierignore +0 -2
- package/dist/test/actual-concurrency.test.d.ts +0 -1
- package/dist/test/artifacts.test.d.ts +0 -1
- package/dist/test/asset-calculation.test.d.ts +0 -1
- package/dist/test/asset-compression.test.d.ts +0 -1
- package/dist/test/avoid-ffmpeg-stackoverflow.test.d.ts +0 -1
- package/dist/test/browser-log-message.test.d.ts +0 -1
- package/dist/test/calculate-atempo.test.d.ts +0 -1
- package/dist/test/compositor-rust.test.d.ts +0 -1
- package/dist/test/crf.test.d.ts +0 -1
- package/dist/test/derive-codec-from-file-extension.test.d.ts +0 -1
- package/dist/test/dont-skip-assets.test.d.ts +0 -1
- package/dist/test/download-file.test.d.ts +0 -1
- package/dist/test/even-dimensions.test.d.ts +0 -1
- package/dist/test/extra-frames-to-capture.test.d.ts +0 -1
- package/dist/test/extract-audio.test.d.ts +0 -1
- package/dist/test/extract-frame-rust.test.d.ts +0 -1
- package/dist/test/ffmpeg-filters.test.d.ts +0 -1
- package/dist/test/ffmpeg-merge-filter.test.d.ts +0 -1
- package/dist/test/ffmpeg-volume-expression.test.d.ts +0 -1
- package/dist/test/file-extension.test.d.ts +0 -1
- package/dist/test/find-closest-package-json.test.d.ts +0 -1
- package/dist/test/flatten-volume-array.test.d.ts +0 -1
- package/dist/test/format-logs.test.d.ts +0 -1
- package/dist/test/frame-padded-index.test.d.ts +0 -1
- package/dist/test/frame.test.d.ts +0 -1
- package/dist/test/get-assets-for-markup.d.ts +0 -8
- package/dist/test/get-audio-channels.test.d.ts +0 -1
- package/dist/test/get-bundle-url-from-serve-url.test.d.ts +0 -1
- package/dist/test/get-silent-parts.test.d.ts +0 -1
- package/dist/test/guess-extension-for-media.test.d.ts +0 -1
- package/dist/test/handle-weird-file-names.test.d.ts +0 -1
- package/dist/test/log-level.test.d.ts +0 -1
- package/dist/test/mime-types.test.d.ts +0 -1
- package/dist/test/offthread-extract-url.test.d.ts +0 -1
- package/dist/test/parse-ffmpeg-progress.test.d.ts +0 -1
- package/dist/test/partitions.test.d.ts +0 -1
- package/dist/test/pixel-format.test.d.ts +0 -1
- package/dist/test/port-config.test.d.ts +0 -1
- package/dist/test/port-selection.test.d.ts +0 -1
- package/dist/test/prores-profile.test.d.ts +0 -1
- package/dist/test/render-still.test.d.ts +0 -1
- package/dist/test/rust-errors.test.d.ts +0 -1
- package/dist/test/rust-get-video-metadata.test.d.ts +0 -1
- package/dist/test/rust-memory-usage.test.d.ts +0 -1
- package/dist/test/sanitize-file-path.test.d.ts +0 -1
- package/dist/test/serve-url.test.d.ts +0 -1
- package/dist/test/symbolicate-remote-stack.test.d.ts +0 -1
- package/dist/test/validate-concurrency.test.d.ts +0 -1
- package/dist/test/validate-config-stitcher.test.d.ts +0 -1
- package/dist/test/validate-config.test.d.ts +0 -1
- package/dist/test/validate-even-dimensions-with-codec.test.d.ts +0 -1
- package/dist/test/validate-image-format.test.d.ts +0 -1
- package/dist/test/webpack-to-serve-url.test.d.ts +0 -1
- package/ensure-browser.mjs +0 -3337
- package/package/dist/assets/apply-tone-frequency.d.ts +0 -11
- package/package/dist/assets/apply-tone-frequency.js +0 -34
- package/package/dist/assets/calculate-asset-positions.d.ts +0 -3
- package/package/dist/assets/calculate-asset-positions.js +0 -72
- package/package/dist/assets/calculate-atempo.d.ts +0 -1
- package/package/dist/assets/calculate-atempo.js +0 -16
- package/package/dist/assets/convert-assets-to-file-urls.d.ts +0 -13
- package/package/dist/assets/convert-assets-to-file-urls.js +0 -36
- package/package/dist/assets/download-and-map-assets-to-file.d.ts +0 -37
- package/package/dist/assets/download-and-map-assets-to-file.js +0 -312
- package/package/dist/assets/download-file.d.ts +0 -18
- package/package/dist/assets/download-file.js +0 -135
- package/package/dist/assets/download-map.d.ts +0 -55
- package/package/dist/assets/download-map.js +0 -63
- package/package/dist/assets/ffmpeg-volume-expression.d.ts +0 -12
- package/package/dist/assets/ffmpeg-volume-expression.js +0 -96
- package/package/dist/assets/flatten-volume-array.d.ts +0 -3
- package/package/dist/assets/flatten-volume-array.js +0 -26
- package/package/dist/assets/get-audio-channels.d.ts +0 -20
- package/package/dist/assets/get-audio-channels.js +0 -78
- package/package/dist/assets/inline-audio-mixing.d.ts +0 -22
- package/package/dist/assets/inline-audio-mixing.js +0 -189
- package/package/dist/assets/read-file.d.ts +0 -7
- package/package/dist/assets/read-file.js +0 -97
- package/package/dist/assets/round-volume-to-avoid-stack-overflow.d.ts +0 -1
- package/package/dist/assets/round-volume-to-avoid-stack-overflow.js +0 -17
- package/package/dist/assets/sanitize-filename.d.ts +0 -1
- package/package/dist/assets/sanitize-filename.js +0 -58
- package/package/dist/assets/sanitize-filepath.d.ts +0 -1
- package/package/dist/assets/sanitize-filepath.js +0 -16
- package/package/dist/assets/truncate-utf8-bytes.d.ts +0 -1
- package/package/dist/assets/truncate-utf8-bytes.js +0 -36
- package/package/dist/assets/types.d.ts +0 -18
- package/package/dist/assets/types.js +0 -21
- package/package/dist/browser/Browser.d.ts +0 -97
- package/package/dist/browser/Browser.js +0 -246
- package/package/dist/browser/BrowserFetcher.d.ts +0 -33
- package/package/dist/browser/BrowserFetcher.js +0 -215
- package/package/dist/browser/BrowserPage.d.ts +0 -104
- package/package/dist/browser/BrowserPage.js +0 -436
- package/package/dist/browser/BrowserRunner.d.ts +0 -33
- package/package/dist/browser/BrowserRunner.js +0 -303
- package/package/dist/browser/Connection.d.ts +0 -49
- package/package/dist/browser/Connection.js +0 -258
- package/package/dist/browser/ConsoleMessage.d.ts +0 -42
- package/package/dist/browser/ConsoleMessage.js +0 -47
- package/package/dist/browser/DOMWorld.d.ts +0 -56
- package/package/dist/browser/DOMWorld.js +0 -272
- package/package/dist/browser/Errors.d.ts +0 -25
- package/package/dist/browser/Errors.js +0 -35
- package/package/dist/browser/EvalTypes.d.ts +0 -27
- package/package/dist/browser/EvalTypes.js +0 -17
- package/package/dist/browser/EventEmitter.d.ts +0 -23
- package/package/dist/browser/EventEmitter.js +0 -53
- package/package/dist/browser/ExecutionContext.d.ts +0 -34
- package/package/dist/browser/ExecutionContext.js +0 -174
- package/package/dist/browser/FrameManager.d.ts +0 -89
- package/package/dist/browser/FrameManager.js +0 -487
- package/package/dist/browser/HTTPRequest.d.ts +0 -29
- package/package/dist/browser/HTTPRequest.js +0 -39
- package/package/dist/browser/HTTPResponse.d.ts +0 -21
- package/package/dist/browser/HTTPResponse.js +0 -41
- package/package/dist/browser/JSHandle.d.ts +0 -35
- package/package/dist/browser/JSHandle.js +0 -90
- package/package/dist/browser/LaunchOptions.d.ts +0 -26
- package/package/dist/browser/LaunchOptions.js +0 -17
- package/package/dist/browser/Launcher.d.ts +0 -18
- package/package/dist/browser/Launcher.js +0 -41
- package/package/dist/browser/LifecycleWatcher.d.ts +0 -29
- package/package/dist/browser/LifecycleWatcher.js +0 -180
- package/package/dist/browser/NetworkEventManager.d.ts +0 -34
- package/package/dist/browser/NetworkEventManager.js +0 -85
- package/package/dist/browser/NetworkManager.d.ts +0 -37
- package/package/dist/browser/NetworkManager.js +0 -246
- package/package/dist/browser/NodeWebSocketTransport.d.ts +0 -19
- package/package/dist/browser/NodeWebSocketTransport.js +0 -81
- package/package/dist/browser/PuppeteerViewport.d.ts +0 -5
- package/package/dist/browser/PuppeteerViewport.js +0 -2
- package/package/dist/browser/ScreenshotOptions.d.ts +0 -0
- package/package/dist/browser/ScreenshotOptions.js +0 -1
- package/package/dist/browser/Target.d.ts +0 -72
- package/package/dist/browser/Target.js +0 -161
- package/package/dist/browser/TaskQueue.d.ts +0 -20
- package/package/dist/browser/TaskQueue.js +0 -47
- package/package/dist/browser/TimeoutSettings.d.ts +0 -24
- package/package/dist/browser/TimeoutSettings.js +0 -62
- package/package/dist/browser/assert.d.ts +0 -1
- package/package/dist/browser/assert.js +0 -9
- package/package/dist/browser/browser-download-progress-bar.d.ts +0 -7
- package/package/dist/browser/browser-download-progress-bar.js +0 -31
- package/package/dist/browser/devtools-commands.d.ts +0 -274
- package/package/dist/browser/devtools-commands.js +0 -2
- package/package/dist/browser/devtools-types.d.ts +0 -1263
- package/package/dist/browser/devtools-types.js +0 -2
- package/package/dist/browser/flaky-errors.d.ts +0 -2
- package/package/dist/browser/flaky-errors.js +0 -20
- package/package/dist/browser/get-download-destination.d.ts +0 -1
- package/package/dist/browser/get-download-destination.js +0 -38
- package/package/dist/browser/handle-failed-resource.d.ts +0 -10
- package/package/dist/browser/handle-failed-resource.js +0 -21
- package/package/dist/browser/mitt/index.d.ts +0 -22
- package/package/dist/browser/mitt/index.js +0 -49
- package/package/dist/browser/should-log-message.d.ts +0 -24
- package/package/dist/browser/should-log-message.js +0 -104
- package/package/dist/browser/source-map-getter.d.ts +0 -2
- package/package/dist/browser/source-map-getter.js +0 -2
- package/package/dist/browser/util.d.ts +0 -37
- package/package/dist/browser/util.js +0 -169
- package/package/dist/browser-executable.d.ts +0 -1
- package/package/dist/browser-executable.js +0 -2
- package/package/dist/browser-log.d.ts +0 -6
- package/package/dist/browser-log.js +0 -2
- package/package/dist/browser.d.ts +0 -2
- package/package/dist/browser.js +0 -4
- package/package/dist/call-ffmpeg.d.ts +0 -22
- package/package/dist/call-ffmpeg.js +0 -53
- package/package/dist/can-concat-seamlessly.d.ts +0 -4
- package/package/dist/can-concat-seamlessly.js +0 -17
- package/package/dist/can-use-parallel-encoding.d.ts +0 -3
- package/package/dist/can-use-parallel-encoding.js +0 -19
- package/package/dist/chalk/index.d.ts +0 -55
- package/package/dist/chalk/index.js +0 -130
- package/package/dist/chalk/is-color-supported.d.ts +0 -1
- package/package/dist/chalk/is-color-supported.js +0 -55
- package/package/dist/check-version-requirements.d.ts +0 -3
- package/package/dist/check-version-requirements.js +0 -82
- package/package/dist/chunk.d.ts +0 -1
- package/package/dist/chunk.js +0 -11
- package/package/dist/client.d.ts +0 -3016
- package/package/dist/client.js +0 -57
- package/package/dist/codec-supports-media.d.ts +0 -9
- package/package/dist/codec-supports-media.js +0 -76
- package/package/dist/codec.d.ts +0 -4
- package/package/dist/codec.js +0 -17
- package/package/dist/collect-assets.d.ts +0 -7
- package/package/dist/collect-assets.js +0 -38
- package/package/dist/combine-audio.d.ts +0 -21
- package/package/dist/combine-audio.js +0 -183
- package/package/dist/combine-chunks.d.ts +0 -39
- package/package/dist/combine-chunks.js +0 -171
- package/package/dist/combine-video-streams-seamlessly.d.ts +0 -3
- package/package/dist/combine-video-streams-seamlessly.js +0 -8
- package/package/dist/combine-video-streams.d.ts +0 -17
- package/package/dist/combine-video-streams.js +0 -75
- package/package/dist/compositor/compositor.d.ts +0 -22
- package/package/dist/compositor/compositor.js +0 -182
- package/package/dist/compositor/get-executable-path.d.ts +0 -12
- package/package/dist/compositor/get-executable-path.js +0 -95
- package/package/dist/compositor/get-explicit-env.d.ts +0 -3
- package/package/dist/compositor/get-explicit-env.js +0 -13
- package/package/dist/compositor/make-file-executable.d.ts +0 -1
- package/package/dist/compositor/make-file-executable.js +0 -44
- package/package/dist/compositor/make-nonce.d.ts +0 -1
- package/package/dist/compositor/make-nonce.js +0 -8
- package/package/dist/compositor/payloads.d.ts +0 -73
- package/package/dist/compositor/payloads.js +0 -2
- package/package/dist/compositor/serialize-command.d.ts +0 -2
- package/package/dist/compositor/serialize-command.js +0 -14
- package/package/dist/compress-assets.d.ts +0 -7
- package/package/dist/compress-assets.js +0 -25
- package/package/dist/compress-audio.d.ts +0 -16
- package/package/dist/compress-audio.js +0 -44
- package/package/dist/convert-number-of-gif-loops-to-ffmpeg.d.ts +0 -1
- package/package/dist/convert-number-of-gif-loops-to-ffmpeg.js +0 -17
- package/package/dist/convert-to-positive-frame-index.d.ts +0 -4
- package/package/dist/convert-to-positive-frame-index.js +0 -8
- package/package/dist/create-audio.d.ts +0 -29
- package/package/dist/create-audio.js +0 -127
- package/package/dist/create-ffmpeg-complex-filter.d.ts +0 -10
- package/package/dist/create-ffmpeg-complex-filter.js +0 -24
- package/package/dist/create-ffmpeg-merge-filter.d.ts +0 -5
- package/package/dist/create-ffmpeg-merge-filter.js +0 -25
- package/package/dist/create-silent-audio.d.ts +0 -10
- package/package/dist/create-silent-audio.js +0 -28
- package/package/dist/crf.d.ts +0 -13
- package/package/dist/crf.js +0 -103
- package/package/dist/cycle-browser-tabs.d.ts +0 -10
- package/package/dist/cycle-browser-tabs.js +0 -50
- package/package/dist/default-on-log.d.ts +0 -2
- package/package/dist/default-on-log.js +0 -8
- package/package/dist/delay-render-embedded-stack.d.ts +0 -2
- package/package/dist/delay-render-embedded-stack.js +0 -17
- package/package/dist/delete-directory.d.ts +0 -1
- package/package/dist/delete-directory.js +0 -68
- package/package/dist/ensure-browser.d.ts +0 -24
- package/package/dist/ensure-browser.js +0 -58
- package/package/dist/ensure-frames-in-order.d.ts +0 -5
- package/package/dist/ensure-frames-in-order.js +0 -39
- package/package/dist/ensure-output-directory.d.ts +0 -1
- package/package/dist/ensure-output-directory.js +0 -17
- package/package/dist/error-handling/handle-javascript-exception.d.ts +0 -23
- package/package/dist/error-handling/handle-javascript-exception.js +0 -86
- package/package/dist/error-handling/symbolicate-error.d.ts +0 -3
- package/package/dist/error-handling/symbolicate-error.js +0 -26
- package/package/dist/error-handling/symbolicateable-error.d.ts +0 -18
- package/package/dist/error-handling/symbolicateable-error.js +0 -19
- package/package/dist/error-handling.d.ts +0 -1
- package/package/dist/error-handling.js +0 -5
- package/package/dist/esm/client.mjs +0 -3270
- package/package/dist/esm/error-handling.mjs +0 -363
- package/package/dist/esm/index.mjs +0 -23201
- package/package/dist/esm/pure.mjs +0 -526
- package/package/dist/extract-audio.d.ts +0 -7
- package/package/dist/extract-audio.js +0 -25
- package/package/dist/ffmpeg-args.d.ts +0 -21
- package/package/dist/ffmpeg-args.js +0 -96
- package/package/dist/ffmpeg-filter-file.d.ts +0 -13
- package/package/dist/ffmpeg-filter-file.js +0 -70
- package/package/dist/ffmpeg-override.d.ts +0 -4
- package/package/dist/ffmpeg-override.js +0 -2
- package/package/dist/file-extensions.d.ts +0 -14
- package/package/dist/file-extensions.js +0 -85
- package/package/dist/filter-asset-types.d.ts +0 -8
- package/package/dist/filter-asset-types.js +0 -44
- package/package/dist/find-closest-package-json.d.ts +0 -2
- package/package/dist/find-closest-package-json.js +0 -31
- package/package/dist/format-logs.d.ts +0 -3
- package/package/dist/format-logs.js +0 -214
- package/package/dist/frame-range.d.ts +0 -2
- package/package/dist/frame-range.js +0 -49
- package/package/dist/get-browser-instance.d.ts +0 -24
- package/package/dist/get-browser-instance.js +0 -63
- package/package/dist/get-bundle-url-from-serve-url.d.ts +0 -2
- package/package/dist/get-bundle-url-from-serve-url.js +0 -30
- package/package/dist/get-codec-name.d.ts +0 -21
- package/package/dist/get-codec-name.js +0 -87
- package/package/dist/get-compositions.d.ts +0 -34
- package/package/dist/get-compositions.js +0 -196
- package/package/dist/get-concurrency.d.ts +0 -1
- package/package/dist/get-concurrency.js +0 -27
- package/package/dist/get-cpu-count.d.ts +0 -2
- package/package/dist/get-cpu-count.js +0 -33
- package/package/dist/get-duration-from-frame-range.d.ts +0 -1
- package/package/dist/get-duration-from-frame-range.js +0 -17
- package/package/dist/get-extension-from-codec.d.ts +0 -6
- package/package/dist/get-extension-from-codec.js +0 -61
- package/package/dist/get-extension-of-filename.d.ts +0 -1
- package/package/dist/get-extension-of-filename.js +0 -15
- package/package/dist/get-extra-frames-to-capture.d.ts +0 -14
- package/package/dist/get-extra-frames-to-capture.js +0 -62
- package/package/dist/get-frame-padded-index.d.ts +0 -21
- package/package/dist/get-frame-padded-index.js +0 -43
- package/package/dist/get-frame-to-render.d.ts +0 -2
- package/package/dist/get-frame-to-render.js +0 -19
- package/package/dist/get-local-browser-executable.d.ts +0 -9
- package/package/dist/get-local-browser-executable.js +0 -36
- package/package/dist/get-port.d.ts +0 -15
- package/package/dist/get-port.js +0 -86
- package/package/dist/get-prores-profile-name.d.ts +0 -3
- package/package/dist/get-prores-profile-name.js +0 -25
- package/package/dist/get-silent-parts.d.ts +0 -10
- package/package/dist/get-silent-parts.js +0 -66
- package/package/dist/get-video-metadata.d.ts +0 -10
- package/package/dist/get-video-metadata.js +0 -25
- package/package/dist/get-video-threads-flag.d.ts +0 -2
- package/package/dist/get-video-threads-flag.js +0 -16
- package/package/dist/goto-page-or-throw.d.ts +0 -3
- package/package/dist/goto-page-or-throw.js +0 -16
- package/package/dist/guess-extension-for-media.d.ts +0 -9
- package/package/dist/guess-extension-for-media.js +0 -31
- package/package/dist/image-format.d.ts +0 -13
- package/package/dist/image-format.js +0 -37
- package/package/dist/index.d.ts +0 -1256
- package/package/dist/index.js +0 -227
- package/package/dist/is-audio-codec.d.ts +0 -2
- package/package/dist/is-audio-codec.js +0 -7
- package/package/dist/is-delay-render-error-with-retry.d.ts +0 -1
- package/package/dist/is-delay-render-error-with-retry.js +0 -28
- package/package/dist/is-serve-url.d.ts +0 -1
- package/package/dist/is-serve-url.js +0 -15
- package/package/dist/jpeg-quality.d.ts +0 -2
- package/package/dist/jpeg-quality.js +0 -22
- package/package/dist/locks.d.ts +0 -7
- package/package/dist/locks.js +0 -47
- package/package/dist/log-level.d.ts +0 -4
- package/package/dist/log-level.js +0 -15
- package/package/dist/logger.d.ts +0 -20
- package/package/dist/logger.js +0 -89
- package/package/dist/make-cancel-signal.d.ts +0 -14
- package/package/dist/make-cancel-signal.js +0 -48
- package/package/dist/make-metadata-args.d.ts +0 -2
- package/package/dist/make-metadata-args.js +0 -22
- package/package/dist/make-page.d.ts +0 -30
- package/package/dist/make-page.js +0 -70
- package/package/dist/memory/from-docker-cgroup.d.ts +0 -1
- package/package/dist/memory/from-docker-cgroup.js +0 -66
- package/package/dist/memory/from-lambda-env.d.ts +0 -1
- package/package/dist/memory/from-lambda-env.js +0 -10
- package/package/dist/memory/from-proc-meminfo.d.ts +0 -2
- package/package/dist/memory/from-proc-meminfo.js +0 -44
- package/package/dist/memory/get-available-memory.d.ts +0 -2
- package/package/dist/memory/get-available-memory.js +0 -44
- package/package/dist/merge-audio-track.d.ts +0 -19
- package/package/dist/merge-audio-track.js +0 -133
- package/package/dist/mime-db.d.ts +0 -6
- package/package/dist/mime-db.js +0 -8636
- package/package/dist/mime-types.d.ts +0 -3
- package/package/dist/mime-types.js +0 -94
- package/package/dist/mux-video-and-audio.d.ts +0 -15
- package/package/dist/mux-video-and-audio.js +0 -54
- package/package/dist/next-frame-to-render.d.ts +0 -11
- package/package/dist/next-frame-to-render.js +0 -41
- package/package/dist/normalize-serve-url.d.ts +0 -1
- package/package/dist/normalize-serve-url.js +0 -19
- package/package/dist/offthread-video-server.d.ts +0 -51
- package/package/dist/offthread-video-server.js +0 -217
- package/package/dist/open-browser.d.ts +0 -47
- package/package/dist/open-browser.js +0 -200
- package/package/dist/options/api-key.d.ts +0 -15
- package/package/dist/options/api-key.js +0 -29
- package/package/dist/options/audio-bitrate.d.ts +0 -18
- package/package/dist/options/audio-bitrate.js +0 -35
- package/package/dist/options/audio-codec.d.ts +0 -55
- package/package/dist/options/audio-codec.js +0 -188
- package/package/dist/options/beep-on-finish.d.ts +0 -15
- package/package/dist/options/beep-on-finish.js +0 -35
- package/package/dist/options/binaries-directory.d.ts +0 -15
- package/package/dist/options/binaries-directory.js +0 -35
- package/package/dist/options/chrome-mode.d.ts +0 -17
- package/package/dist/options/chrome-mode.js +0 -46
- package/package/dist/options/color-space.d.ts +0 -23
- package/package/dist/options/color-space.js +0 -49
- package/package/dist/options/crf.d.ts +0 -17
- package/package/dist/options/crf.js +0 -43
- package/package/dist/options/cross-site-isolation.d.ts +0 -15
- package/package/dist/options/cross-site-isolation.js +0 -29
- package/package/dist/options/delete-after.d.ts +0 -19
- package/package/dist/options/delete-after.js +0 -37
- package/package/dist/options/disable-git-source.d.ts +0 -15
- package/package/dist/options/disable-git-source.js +0 -28
- package/package/dist/options/disallow-parallel-encoding.d.ts +0 -15
- package/package/dist/options/disallow-parallel-encoding.js +0 -35
- package/package/dist/options/enable-lambda-insights.d.ts +0 -15
- package/package/dist/options/enable-lambda-insights.js +0 -35
- package/package/dist/options/enable-multiprocess-on-linux.d.ts +0 -15
- package/package/dist/options/enable-multiprocess-on-linux.js +0 -36
- package/package/dist/options/encoding-buffer-size.d.ts +0 -18
- package/package/dist/options/encoding-buffer-size.js +0 -39
- package/package/dist/options/encoding-max-rate.d.ts +0 -18
- package/package/dist/options/encoding-max-rate.js +0 -35
- package/package/dist/options/enforce-audio.d.ts +0 -18
- package/package/dist/options/enforce-audio.js +0 -36
- package/package/dist/options/folder-expiry.d.ts +0 -15
- package/package/dist/options/folder-expiry.js +0 -37
- package/package/dist/options/for-seamless-aac-concatenation.d.ts +0 -19
- package/package/dist/options/for-seamless-aac-concatenation.js +0 -40
- package/package/dist/options/gl.d.ts +0 -24
- package/package/dist/options/gl.js +0 -68
- package/package/dist/options/hardware-acceleration.d.ts +0 -18
- package/package/dist/options/hardware-acceleration.js +0 -56
- package/package/dist/options/headless.d.ts +0 -15
- package/package/dist/options/headless.js +0 -36
- package/package/dist/options/image-sequence-pattern.d.ts +0 -15
- package/package/dist/options/image-sequence-pattern.js +0 -30
- package/package/dist/options/index.d.ts +0 -747
- package/package/dist/options/index.js +0 -97
- package/package/dist/options/jpeg-quality.d.ts +0 -17
- package/package/dist/options/jpeg-quality.js +0 -47
- package/package/dist/options/latency-hint.d.ts +0 -18
- package/package/dist/options/latency-hint.js +0 -27
- package/package/dist/options/log-level.d.ts +0 -16
- package/package/dist/options/log-level.js +0 -32
- package/package/dist/options/metadata.d.ts +0 -18
- package/package/dist/options/metadata.js +0 -47
- package/package/dist/options/mute.d.ts +0 -15
- package/package/dist/options/mute.js +0 -37
- package/package/dist/options/number-of-gif-loops.d.ts +0 -19
- package/package/dist/options/number-of-gif-loops.js +0 -44
- package/package/dist/options/offthreadvideo-cache-size.d.ts +0 -20
- package/package/dist/options/offthreadvideo-cache-size.js +0 -60
- package/package/dist/options/offthreadvideo-threads.d.ts +0 -20
- package/package/dist/options/offthreadvideo-threads.js +0 -40
- package/package/dist/options/on-browser-download.d.ts +0 -22
- package/package/dist/options/on-browser-download.js +0 -19
- package/package/dist/options/option.d.ts +0 -20
- package/package/dist/options/option.js +0 -2
- package/package/dist/options/options-map.d.ts +0 -2040
- package/package/dist/options/options-map.js +0 -192
- package/package/dist/options/overwrite.d.ts +0 -15
- package/package/dist/options/overwrite.js +0 -42
- package/package/dist/options/prefer-lossless.d.ts +0 -18
- package/package/dist/options/prefer-lossless.js +0 -26
- package/package/dist/options/public-dir.d.ts +0 -18
- package/package/dist/options/public-dir.js +0 -37
- package/package/dist/options/public-path.d.ts +0 -18
- package/package/dist/options/public-path.js +0 -37
- package/package/dist/options/repro.d.ts +0 -15
- package/package/dist/options/repro.js +0 -36
- package/package/dist/options/scale.d.ts +0 -15
- package/package/dist/options/scale.js +0 -41
- package/package/dist/options/separate-audio.d.ts +0 -18
- package/package/dist/options/separate-audio.js +0 -28
- package/package/dist/options/throw-if-site-exists.d.ts +0 -15
- package/package/dist/options/throw-if-site-exists.js +0 -28
- package/package/dist/options/timeout.d.ts +0 -15
- package/package/dist/options/timeout.js +0 -44
- package/package/dist/options/video-bitrate.d.ts +0 -15
- package/package/dist/options/video-bitrate.js +0 -35
- package/package/dist/options/video-cache-size.d.ts +0 -19
- package/package/dist/options/video-cache-size.js +0 -39
- package/package/dist/options/video-codec.d.ts +0 -23
- package/package/dist/options/video-codec.js +0 -104
- package/package/dist/options/webhook-custom-data.d.ts +0 -10
- package/package/dist/options/webhook-custom-data.js +0 -21
- package/package/dist/options/x264-preset.d.ts +0 -25
- package/package/dist/options/x264-preset.js +0 -55
- package/package/dist/overwrite.d.ts +0 -1
- package/package/dist/overwrite.js +0 -4
- package/package/dist/p-limit.d.ts +0 -1
- package/package/dist/p-limit.js +0 -57
- package/package/dist/parse-browser-error-stack.d.ts +0 -7
- package/package/dist/parse-browser-error-stack.js +0 -87
- package/package/dist/parse-ffmpeg-progress.d.ts +0 -1
- package/package/dist/parse-ffmpeg-progress.js +0 -18
- package/package/dist/path-normalize.d.ts +0 -1
- package/package/dist/path-normalize.js +0 -132
- package/package/dist/perf.d.ts +0 -5
- package/package/dist/perf.js +0 -37
- package/package/dist/pixel-format.d.ts +0 -6
- package/package/dist/pixel-format.js +0 -37
- package/package/dist/pool.d.ts +0 -8
- package/package/dist/pool.js +0 -30
- package/package/dist/port-config.d.ts +0 -14
- package/package/dist/port-config.js +0 -79
- package/package/dist/prepare-server.d.ts +0 -32
- package/package/dist/prepare-server.js +0 -123
- package/package/dist/preprocess-audio-track.d.ts +0 -27
- package/package/dist/preprocess-audio-track.js +0 -82
- package/package/dist/prespawn-ffmpeg.d.ts +0 -49
- package/package/dist/prespawn-ffmpeg.js +0 -112
- package/package/dist/prestitcher-memory-usage.d.ts +0 -10
- package/package/dist/prestitcher-memory-usage.js +0 -26
- package/package/dist/print-useful-error-message.d.ts +0 -2
- package/package/dist/print-useful-error-message.js +0 -110
- package/package/dist/prores-profile.d.ts +0 -7
- package/package/dist/prores-profile.js +0 -23
- package/package/dist/puppeteer-evaluate.d.ts +0 -17
- package/package/dist/puppeteer-evaluate.js +0 -162
- package/package/dist/puppeteer-screenshot.d.ts +0 -12
- package/package/dist/puppeteer-screenshot.js +0 -58
- package/package/dist/pure.d.ts +0 -17
- package/package/dist/pure.js +0 -17
- package/package/dist/redirect-status-codes.d.ts +0 -1
- package/package/dist/redirect-status-codes.js +0 -6
- package/package/dist/render-frame-and-retry-target-close.d.ts +0 -54
- package/package/dist/render-frame-and-retry-target-close.js +0 -179
- package/package/dist/render-frame-with-option-to-reject.d.ts +0 -48
- package/package/dist/render-frame-with-option-to-reject.js +0 -156
- package/package/dist/render-frame.d.ts +0 -47
- package/package/dist/render-frame.js +0 -51
- package/package/dist/render-frames.d.ts +0 -97
- package/package/dist/render-frames.js +0 -413
- package/package/dist/render-has-audio.d.ts +0 -8
- package/package/dist/render-has-audio.js +0 -20
- package/package/dist/render-media.d.ts +0 -135
- package/package/dist/render-media.js +0 -621
- package/package/dist/render-partitions.d.ts +0 -7
- package/package/dist/render-partitions.js +0 -50
- package/package/dist/render-still.d.ts +0 -74
- package/package/dist/render-still.js +0 -356
- package/package/dist/replace-browser.d.ts +0 -7
- package/package/dist/replace-browser.js +0 -48
- package/package/dist/repro.d.ts +0 -25
- package/package/dist/repro.js +0 -184
- package/package/dist/resolve-asset-src.d.ts +0 -1
- package/package/dist/resolve-asset-src.js +0 -17
- package/package/dist/sample-rate.d.ts +0 -1
- package/package/dist/sample-rate.js +0 -4
- package/package/dist/screenshot-task.d.ts +0 -12
- package/package/dist/screenshot-task.js +0 -86
- package/package/dist/seamless-aac-trim.d.ts +0 -12
- package/package/dist/seamless-aac-trim.js +0 -24
- package/package/dist/seek-to-frame.d.ts +0 -18
- package/package/dist/seek-to-frame.js +0 -148
- package/package/dist/select-composition.d.ts +0 -45
- package/package/dist/select-composition.js +0 -219
- package/package/dist/serialize-artifact.d.ts +0 -7
- package/package/dist/serialize-artifact.js +0 -2
- package/package/dist/serve-handler/index.d.ts +0 -4
- package/package/dist/serve-handler/index.js +0 -208
- package/package/dist/serve-handler/is-path-inside.d.ts +0 -1
- package/package/dist/serve-handler/is-path-inside.js +0 -27
- package/package/dist/serve-handler/range-parser.d.ts +0 -13
- package/package/dist/serve-handler/range-parser.js +0 -57
- package/package/dist/serve-static.d.ts +0 -18
- package/package/dist/serve-static.js +0 -141
- package/package/dist/set-props-and-env.d.ts +0 -22
- package/package/dist/set-props-and-env.js +0 -219
- package/package/dist/stitch-frames-to-video.d.ts +0 -77
- package/package/dist/stitch-frames-to-video.js +0 -350
- package/package/dist/stringify-ffmpeg-filter.d.ts +0 -24
- package/package/dist/stringify-ffmpeg-filter.js +0 -140
- package/package/dist/succeed-or-cancel.d.ts +0 -6
- package/package/dist/succeed-or-cancel.js +0 -23
- package/package/dist/symbolicate-stacktrace.d.ts +0 -29
- package/package/dist/symbolicate-stacktrace.js +0 -155
- package/package/dist/take-frame.d.ts +0 -13
- package/package/dist/take-frame.js +0 -47
- package/package/dist/test/actual-concurrency.test.d.ts +0 -1
- package/package/dist/test/artifacts.test.d.ts +0 -1
- package/package/dist/test/asset-calculation.test.d.ts +0 -1
- package/package/dist/test/asset-compression.test.d.ts +0 -1
- package/package/dist/test/avoid-ffmpeg-stackoverflow.test.d.ts +0 -1
- package/package/dist/test/browser-log-message.test.d.ts +0 -1
- package/package/dist/test/calculate-atempo.test.d.ts +0 -1
- package/package/dist/test/compositor-rust.test.d.ts +0 -1
- package/package/dist/test/crf.test.d.ts +0 -1
- package/package/dist/test/derive-codec-from-file-extension.test.d.ts +0 -1
- package/package/dist/test/dont-skip-assets.test.d.ts +0 -1
- package/package/dist/test/download-file.test.d.ts +0 -1
- package/package/dist/test/even-dimensions.test.d.ts +0 -1
- package/package/dist/test/extra-frames-to-capture.test.d.ts +0 -1
- package/package/dist/test/extract-audio.test.d.ts +0 -1
- package/package/dist/test/extract-frame-rust.test.d.ts +0 -1
- package/package/dist/test/ffmpeg-filters.test.d.ts +0 -1
- package/package/dist/test/ffmpeg-merge-filter.test.d.ts +0 -1
- package/package/dist/test/ffmpeg-volume-expression.test.d.ts +0 -1
- package/package/dist/test/file-extension.test.d.ts +0 -1
- package/package/dist/test/find-closest-package-json.test.d.ts +0 -1
- package/package/dist/test/flatten-volume-array.test.d.ts +0 -1
- package/package/dist/test/format-logs.test.d.ts +0 -1
- package/package/dist/test/frame-padded-index.test.d.ts +0 -1
- package/package/dist/test/frame.test.d.ts +0 -1
- package/package/dist/test/get-assets-for-markup.d.ts +0 -8
- package/package/dist/test/get-audio-channels.test.d.ts +0 -1
- package/package/dist/test/get-bundle-url-from-serve-url.test.d.ts +0 -1
- package/package/dist/test/get-silent-parts.test.d.ts +0 -1
- package/package/dist/test/guess-extension-for-media.test.d.ts +0 -1
- package/package/dist/test/handle-weird-file-names.test.d.ts +0 -1
- package/package/dist/test/log-level.test.d.ts +0 -1
- package/package/dist/test/mime-types.test.d.ts +0 -1
- package/package/dist/test/offthread-extract-url.test.d.ts +0 -1
- package/package/dist/test/parse-ffmpeg-progress.test.d.ts +0 -1
- package/package/dist/test/partitions.test.d.ts +0 -1
- package/package/dist/test/pixel-format.test.d.ts +0 -1
- package/package/dist/test/port-config.test.d.ts +0 -1
- package/package/dist/test/port-selection.test.d.ts +0 -1
- package/package/dist/test/prores-profile.test.d.ts +0 -1
- package/package/dist/test/render-still.test.d.ts +0 -1
- package/package/dist/test/rust-errors.test.d.ts +0 -1
- package/package/dist/test/rust-get-video-metadata.test.d.ts +0 -1
- package/package/dist/test/rust-memory-usage.test.d.ts +0 -1
- package/package/dist/test/sanitize-file-path.test.d.ts +0 -1
- package/package/dist/test/serve-url.test.d.ts +0 -1
- package/package/dist/test/symbolicate-remote-stack.test.d.ts +0 -1
- package/package/dist/test/validate-concurrency.test.d.ts +0 -1
- package/package/dist/test/validate-config-stitcher.test.d.ts +0 -1
- package/package/dist/test/validate-config.test.d.ts +0 -1
- package/package/dist/test/validate-even-dimensions-with-codec.test.d.ts +0 -1
- package/package/dist/test/validate-image-format.test.d.ts +0 -1
- package/package/dist/test/webpack-to-serve-url.test.d.ts +0 -1
- package/package/dist/test-gpu.d.ts +0 -21
- package/package/dist/test-gpu.js +0 -45
- package/package/dist/tmp-dir.d.ts +0 -1
- package/package/dist/tmp-dir.js +0 -63
- package/package/dist/to-megabytes.d.ts +0 -1
- package/package/dist/to-megabytes.js +0 -7
- package/package/dist/truthy.d.ts +0 -3
- package/package/dist/truthy.js +0 -6
- package/package/dist/types.d.ts +0 -10
- package/package/dist/types.js +0 -2
- package/package/dist/v5-required-input-props.d.ts +0 -6
- package/package/dist/v5-required-input-props.js +0 -2
- package/package/dist/validate-concurrency.d.ts +0 -7
- package/package/dist/validate-concurrency.js +0 -38
- package/package/dist/validate-even-dimensions-with-codec.d.ts +0 -14
- package/package/dist/validate-even-dimensions-with-codec.js +0 -40
- package/package/dist/validate-every-nth-frame.d.ts +0 -1
- package/package/dist/validate-every-nth-frame.js +0 -24
- package/package/dist/validate-ffmpeg-override.d.ts +0 -2
- package/package/dist/validate-ffmpeg-override.js +0 -12
- package/package/dist/validate-number-of-gif-loops.d.ts +0 -2
- package/package/dist/validate-number-of-gif-loops.js +0 -24
- package/package/dist/validate-output-filename.d.ts +0 -9
- package/package/dist/validate-output-filename.js +0 -32
- package/package/dist/validate-puppeteer-timeout.d.ts +0 -1
- package/package/dist/validate-puppeteer-timeout.js +0 -25
- package/package/dist/validate-scale.d.ts +0 -1
- package/package/dist/validate-scale.js +0 -26
- package/package/dist/validate-videobitrate.d.ts +0 -1
- package/package/dist/validate-videobitrate.js +0 -20
- package/package/dist/validate.d.ts +0 -4
- package/package/dist/validate.js +0 -8
- package/package/dist/wait-for-symbolication-error-to-be-done.d.ts +0 -3
- package/package/dist/wait-for-symbolication-error-to-be-done.js +0 -8
- package/package/dist/wrap-with-error-handling.d.ts +0 -8
- package/package/dist/wrap-with-error-handling.js +0 -18
- package/package/dist/ws/ws-types.d.ts +0 -15
- package/package/dist/ws/ws-types.js +0 -8
- package/package/ensure-browser.mjs +0 -3337
|
@@ -1,3270 +0,0 @@
|
|
|
1
|
-
// src/browser/TimeoutSettings.ts
|
|
2
|
-
var DEFAULT_TIMEOUT = 30000;
|
|
3
|
-
|
|
4
|
-
class TimeoutSettings {
|
|
5
|
-
#defaultTimeout;
|
|
6
|
-
#defaultNavigationTimeout;
|
|
7
|
-
constructor() {
|
|
8
|
-
this.#defaultTimeout = null;
|
|
9
|
-
this.#defaultNavigationTimeout = null;
|
|
10
|
-
}
|
|
11
|
-
setDefaultTimeout(timeout) {
|
|
12
|
-
this.#defaultTimeout = timeout;
|
|
13
|
-
}
|
|
14
|
-
setDefaultNavigationTimeout(timeout) {
|
|
15
|
-
this.#defaultNavigationTimeout = timeout;
|
|
16
|
-
}
|
|
17
|
-
navigationTimeout() {
|
|
18
|
-
if (this.#defaultNavigationTimeout !== null) {
|
|
19
|
-
return this.#defaultNavigationTimeout;
|
|
20
|
-
}
|
|
21
|
-
if (this.#defaultTimeout !== null) {
|
|
22
|
-
return this.#defaultTimeout;
|
|
23
|
-
}
|
|
24
|
-
return DEFAULT_TIMEOUT;
|
|
25
|
-
}
|
|
26
|
-
timeout() {
|
|
27
|
-
if (this.#defaultTimeout !== null) {
|
|
28
|
-
return this.#defaultTimeout;
|
|
29
|
-
}
|
|
30
|
-
return DEFAULT_TIMEOUT;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// src/codec.ts
|
|
35
|
-
var validCodecs = [
|
|
36
|
-
"h264",
|
|
37
|
-
"h265",
|
|
38
|
-
"vp8",
|
|
39
|
-
"vp9",
|
|
40
|
-
"mp3",
|
|
41
|
-
"aac",
|
|
42
|
-
"wav",
|
|
43
|
-
"prores",
|
|
44
|
-
"h264-mkv",
|
|
45
|
-
"h264-ts",
|
|
46
|
-
"gif"
|
|
47
|
-
];
|
|
48
|
-
var DEFAULT_CODEC = "h264";
|
|
49
|
-
|
|
50
|
-
// src/crf.ts
|
|
51
|
-
var defaultCrfMap = {
|
|
52
|
-
h264: 18,
|
|
53
|
-
h265: 23,
|
|
54
|
-
vp8: 9,
|
|
55
|
-
vp9: 28,
|
|
56
|
-
prores: null,
|
|
57
|
-
gif: null,
|
|
58
|
-
"h264-mkv": 18,
|
|
59
|
-
"h264-ts": 18,
|
|
60
|
-
aac: null,
|
|
61
|
-
mp3: null,
|
|
62
|
-
wav: null
|
|
63
|
-
};
|
|
64
|
-
var getDefaultCrfForCodec = (codec) => {
|
|
65
|
-
const val = defaultCrfMap[codec];
|
|
66
|
-
if (val === undefined) {
|
|
67
|
-
throw new TypeError(`Got unexpected codec "${codec}"`);
|
|
68
|
-
}
|
|
69
|
-
return val;
|
|
70
|
-
};
|
|
71
|
-
var crfRanges = {
|
|
72
|
-
h264: [1, 51],
|
|
73
|
-
h265: [0, 51],
|
|
74
|
-
vp8: [4, 63],
|
|
75
|
-
vp9: [0, 63],
|
|
76
|
-
prores: [0, 0],
|
|
77
|
-
gif: [0, 0],
|
|
78
|
-
"h264-mkv": [1, 51],
|
|
79
|
-
"h264-ts": [1, 51],
|
|
80
|
-
aac: [0, 0],
|
|
81
|
-
mp3: [0, 0],
|
|
82
|
-
wav: [0, 0]
|
|
83
|
-
};
|
|
84
|
-
var getValidCrfRanges = (codec) => {
|
|
85
|
-
const val = crfRanges[codec];
|
|
86
|
-
if (val === undefined) {
|
|
87
|
-
throw new TypeError(`Got unexpected codec "${codec}"`);
|
|
88
|
-
}
|
|
89
|
-
return val;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
// src/codec-supports-media.ts
|
|
93
|
-
var codecSupportsVideoBitrateMap = {
|
|
94
|
-
"h264-mkv": true,
|
|
95
|
-
"h264-ts": true,
|
|
96
|
-
aac: false,
|
|
97
|
-
gif: false,
|
|
98
|
-
h264: true,
|
|
99
|
-
h265: true,
|
|
100
|
-
mp3: false,
|
|
101
|
-
prores: false,
|
|
102
|
-
vp8: true,
|
|
103
|
-
vp9: true,
|
|
104
|
-
wav: false
|
|
105
|
-
};
|
|
106
|
-
var codecSupportsCrf = (codec) => {
|
|
107
|
-
const range = getValidCrfRanges(codec);
|
|
108
|
-
return range[0] !== range[1];
|
|
109
|
-
};
|
|
110
|
-
var codecSupportsVideoBitrate = (codec) => {
|
|
111
|
-
return codecSupportsVideoBitrateMap[codec];
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
// src/file-extensions.ts
|
|
115
|
-
var defaultFileExtensionMap = {
|
|
116
|
-
"h264-mkv": {
|
|
117
|
-
default: "mkv",
|
|
118
|
-
forAudioCodec: {
|
|
119
|
-
"pcm-16": { possible: ["mkv"], default: "mkv" },
|
|
120
|
-
mp3: { possible: ["mkv"], default: "mkv" }
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
"h264-ts": {
|
|
124
|
-
default: "ts",
|
|
125
|
-
forAudioCodec: {
|
|
126
|
-
"pcm-16": { possible: ["ts"], default: "ts" },
|
|
127
|
-
aac: { possible: ["ts"], default: "ts" }
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
aac: {
|
|
131
|
-
default: "aac",
|
|
132
|
-
forAudioCodec: {
|
|
133
|
-
aac: {
|
|
134
|
-
possible: ["aac", "3gp", "m4a", "m4b", "mpg", "mpeg"],
|
|
135
|
-
default: "aac"
|
|
136
|
-
},
|
|
137
|
-
"pcm-16": {
|
|
138
|
-
possible: ["wav"],
|
|
139
|
-
default: "wav"
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
gif: {
|
|
144
|
-
default: "gif",
|
|
145
|
-
forAudioCodec: {}
|
|
146
|
-
},
|
|
147
|
-
h264: {
|
|
148
|
-
default: "mp4",
|
|
149
|
-
forAudioCodec: {
|
|
150
|
-
"pcm-16": { possible: ["mkv", "mov"], default: "mkv" },
|
|
151
|
-
aac: { possible: ["mp4", "mkv", "mov"], default: "mp4" },
|
|
152
|
-
mp3: { possible: ["mp4", "mkv", "mov"], default: "mp4" }
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
h265: {
|
|
156
|
-
default: "mp4",
|
|
157
|
-
forAudioCodec: {
|
|
158
|
-
aac: { possible: ["mp4", "mkv", "hevc"], default: "mp4" },
|
|
159
|
-
"pcm-16": { possible: ["mkv"], default: "mkv" }
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
mp3: {
|
|
163
|
-
default: "mp3",
|
|
164
|
-
forAudioCodec: {
|
|
165
|
-
mp3: { possible: ["mp3"], default: "mp3" },
|
|
166
|
-
"pcm-16": { possible: ["wav"], default: "wav" }
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
prores: {
|
|
170
|
-
default: "mov",
|
|
171
|
-
forAudioCodec: {
|
|
172
|
-
aac: { possible: ["mov", "mkv", "mxf"], default: "mov" },
|
|
173
|
-
"pcm-16": { possible: ["mov", "mkv", "mxf"], default: "mov" }
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
vp8: {
|
|
177
|
-
default: "webm",
|
|
178
|
-
forAudioCodec: {
|
|
179
|
-
"pcm-16": { possible: ["mkv"], default: "mkv" },
|
|
180
|
-
opus: { possible: ["webm"], default: "webm" }
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
vp9: {
|
|
184
|
-
default: "webm",
|
|
185
|
-
forAudioCodec: {
|
|
186
|
-
"pcm-16": { possible: ["mkv"], default: "mkv" },
|
|
187
|
-
opus: { possible: ["webm"], default: "webm" }
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
wav: {
|
|
191
|
-
default: "wav",
|
|
192
|
-
forAudioCodec: {
|
|
193
|
-
"pcm-16": { possible: ["wav"], default: "wav" }
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
// src/get-extension-from-codec.ts
|
|
199
|
-
var getFileExtensionFromCodec = (codec, audioCodec) => {
|
|
200
|
-
if (!validCodecs.includes(codec)) {
|
|
201
|
-
throw new Error(`Codec must be one of the following: ${validCodecs.join(", ")}, but got ${codec}`);
|
|
202
|
-
}
|
|
203
|
-
const map = defaultFileExtensionMap[codec];
|
|
204
|
-
if (audioCodec === null) {
|
|
205
|
-
return map.default;
|
|
206
|
-
}
|
|
207
|
-
const typedAudioCodec = audioCodec;
|
|
208
|
-
if (!(typedAudioCodec in map.forAudioCodec)) {
|
|
209
|
-
throw new Error(`Audio codec ${typedAudioCodec} is not supported for codec ${codec}`);
|
|
210
|
-
}
|
|
211
|
-
return map.forAudioCodec[audioCodec].default;
|
|
212
|
-
};
|
|
213
|
-
var makeFileExtensionMap = () => {
|
|
214
|
-
const map = {};
|
|
215
|
-
Object.keys(defaultFileExtensionMap).forEach((_codec) => {
|
|
216
|
-
const codec = _codec;
|
|
217
|
-
const fileExtMap = defaultFileExtensionMap[codec];
|
|
218
|
-
const audioCodecs = Object.keys(fileExtMap.forAudioCodec);
|
|
219
|
-
const possibleExtensionsForAudioCodec = audioCodecs.map((audioCodec) => fileExtMap.forAudioCodec[audioCodec].possible);
|
|
220
|
-
const allPossibleExtensions = [
|
|
221
|
-
fileExtMap.default,
|
|
222
|
-
...possibleExtensionsForAudioCodec.flat(1)
|
|
223
|
-
];
|
|
224
|
-
for (const extension of allPossibleExtensions) {
|
|
225
|
-
if (!map[extension]) {
|
|
226
|
-
map[extension] = [];
|
|
227
|
-
}
|
|
228
|
-
if (!map[extension].includes(codec)) {
|
|
229
|
-
map[extension].push(codec);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
return map;
|
|
234
|
-
};
|
|
235
|
-
var defaultCodecsForFileExtension = {
|
|
236
|
-
"3gp": "aac",
|
|
237
|
-
aac: "aac",
|
|
238
|
-
gif: "gif",
|
|
239
|
-
hevc: "h265",
|
|
240
|
-
m4a: "aac",
|
|
241
|
-
m4b: "aac",
|
|
242
|
-
mkv: "h264-mkv",
|
|
243
|
-
mov: "prores",
|
|
244
|
-
mp3: "mp3",
|
|
245
|
-
mp4: "h264",
|
|
246
|
-
mpeg: "aac",
|
|
247
|
-
mpg: "aac",
|
|
248
|
-
mxf: "prores",
|
|
249
|
-
wav: "wav",
|
|
250
|
-
webm: "vp8",
|
|
251
|
-
ts: "h264-ts"
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
// src/image-format.ts
|
|
255
|
-
var validVideoImageFormats = ["png", "jpeg", "none"];
|
|
256
|
-
var validStillImageFormats = ["png", "jpeg", "pdf", "webp"];
|
|
257
|
-
|
|
258
|
-
// src/jpeg-quality.ts
|
|
259
|
-
var DEFAULT_JPEG_QUALITY = 80;
|
|
260
|
-
var validateJpegQuality = (q) => {
|
|
261
|
-
if (typeof q !== "undefined" && typeof q !== "number") {
|
|
262
|
-
throw new Error(`JPEG Quality option must be a number or undefined. Got ${typeof q} (${JSON.stringify(q)})`);
|
|
263
|
-
}
|
|
264
|
-
if (typeof q === "undefined") {
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
if (!Number.isFinite(q)) {
|
|
268
|
-
throw new RangeError(`JPEG Quality must be a finite number, but is ${q}`);
|
|
269
|
-
}
|
|
270
|
-
if (Number.isNaN(q)) {
|
|
271
|
-
throw new RangeError(`JPEG Quality is NaN, but must be a real number`);
|
|
272
|
-
}
|
|
273
|
-
if (q > 100 || q < 0) {
|
|
274
|
-
throw new RangeError("JPEG Quality option must be between 0 and 100.");
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
// src/log-level.ts
|
|
279
|
-
var logLevels = ["trace", "verbose", "info", "warn", "error"];
|
|
280
|
-
var getNumberForLogLevel = (level) => {
|
|
281
|
-
return logLevels.indexOf(level);
|
|
282
|
-
};
|
|
283
|
-
var isValidLogLevel = (level) => {
|
|
284
|
-
return getNumberForLogLevel(level) > -1;
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
// src/options/api-key.tsx
|
|
288
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
289
|
-
var currentApiKey = null;
|
|
290
|
-
var cliFlag = "api-key";
|
|
291
|
-
var apiKeyOption = {
|
|
292
|
-
name: "API key",
|
|
293
|
-
cliFlag,
|
|
294
|
-
description: () => /* @__PURE__ */ jsxs(Fragment, {
|
|
295
|
-
children: [
|
|
296
|
-
"API key for sending a usage event using ",
|
|
297
|
-
/* @__PURE__ */ jsx("code", {
|
|
298
|
-
children: "@remotion/licensing"
|
|
299
|
-
}),
|
|
300
|
-
"."
|
|
301
|
-
]
|
|
302
|
-
}),
|
|
303
|
-
ssrName: "apiKey",
|
|
304
|
-
docLink: "https://www.remotion.dev/docs/licensing",
|
|
305
|
-
type: null,
|
|
306
|
-
getValue: ({ commandLine }) => {
|
|
307
|
-
if (commandLine[cliFlag] !== undefined) {
|
|
308
|
-
return {
|
|
309
|
-
source: "cli",
|
|
310
|
-
value: commandLine[cliFlag]
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
return {
|
|
314
|
-
source: "default",
|
|
315
|
-
value: currentApiKey
|
|
316
|
-
};
|
|
317
|
-
},
|
|
318
|
-
setConfig: (value) => {
|
|
319
|
-
currentApiKey = value;
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
// src/options/audio-bitrate.tsx
|
|
324
|
-
import { jsx as jsx2, jsxs as jsxs2, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
325
|
-
var cliFlag2 = "audio-bitrate";
|
|
326
|
-
var audioBitrate = null;
|
|
327
|
-
var audioBitrateOption = {
|
|
328
|
-
name: "Audio Bitrate",
|
|
329
|
-
cliFlag: cliFlag2,
|
|
330
|
-
description: () => /* @__PURE__ */ jsxs2(Fragment2, {
|
|
331
|
-
children: [
|
|
332
|
-
"Specify the target bitrate for the generated video. The syntax for FFmpeg",
|
|
333
|
-
"'",
|
|
334
|
-
"s ",
|
|
335
|
-
/* @__PURE__ */ jsx2("code", {
|
|
336
|
-
children: "-b:a"
|
|
337
|
-
}),
|
|
338
|
-
" parameter should be used. FFmpeg may encode the video in a way that will not result in the exact audio bitrate specified. Example values: ",
|
|
339
|
-
/* @__PURE__ */ jsx2("code", {
|
|
340
|
-
children: "512K"
|
|
341
|
-
}),
|
|
342
|
-
" for 512 kbps, ",
|
|
343
|
-
/* @__PURE__ */ jsx2("code", {
|
|
344
|
-
children: "1M"
|
|
345
|
-
}),
|
|
346
|
-
" for 1 Mbps. Default: ",
|
|
347
|
-
/* @__PURE__ */ jsx2("code", {
|
|
348
|
-
children: "320k"
|
|
349
|
-
})
|
|
350
|
-
]
|
|
351
|
-
}),
|
|
352
|
-
ssrName: "audioBitrate",
|
|
353
|
-
docLink: "https://www.remotion.dev/docs/renderer/render-media#audiobitrate-",
|
|
354
|
-
type: "0",
|
|
355
|
-
getValue: ({ commandLine }) => {
|
|
356
|
-
if (commandLine[cliFlag2]) {
|
|
357
|
-
return {
|
|
358
|
-
value: commandLine[cliFlag2],
|
|
359
|
-
source: "cli"
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
if (audioBitrate) {
|
|
363
|
-
return {
|
|
364
|
-
value: audioBitrate,
|
|
365
|
-
source: "config file"
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
|
-
return {
|
|
369
|
-
value: null,
|
|
370
|
-
source: "default"
|
|
371
|
-
};
|
|
372
|
-
},
|
|
373
|
-
setConfig: (value) => {
|
|
374
|
-
audioBitrate = value;
|
|
375
|
-
}
|
|
376
|
-
};
|
|
377
|
-
|
|
378
|
-
// src/options/separate-audio.tsx
|
|
379
|
-
var DEFAULT = null;
|
|
380
|
-
var cliFlag3 = "separate-audio-to";
|
|
381
|
-
var separateAudioOption = {
|
|
382
|
-
cliFlag: cliFlag3,
|
|
383
|
-
description: () => `If set, the audio will not be included in the main output but rendered as a separate file at the location you pass. It is recommended to use an absolute path. If a relative path is passed, it is relative to the Remotion Root.`,
|
|
384
|
-
docLink: "https://remotion.dev/docs/renderer/render-media",
|
|
385
|
-
getValue: ({ commandLine }) => {
|
|
386
|
-
if (commandLine[cliFlag3]) {
|
|
387
|
-
return {
|
|
388
|
-
source: "cli",
|
|
389
|
-
value: commandLine[cliFlag3]
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
return {
|
|
393
|
-
source: "default",
|
|
394
|
-
value: DEFAULT
|
|
395
|
-
};
|
|
396
|
-
},
|
|
397
|
-
name: "Separate audio to",
|
|
398
|
-
setConfig: () => {
|
|
399
|
-
throw new Error("Not implemented");
|
|
400
|
-
},
|
|
401
|
-
ssrName: "separateAudioTo",
|
|
402
|
-
type: "string"
|
|
403
|
-
};
|
|
404
|
-
|
|
405
|
-
// src/options/audio-codec.tsx
|
|
406
|
-
var validAudioCodecs = ["pcm-16", "aac", "mp3", "opus"];
|
|
407
|
-
var supportedAudioCodecs = {
|
|
408
|
-
h264: ["aac", "pcm-16", "mp3"],
|
|
409
|
-
"h264-mkv": ["pcm-16", "mp3"],
|
|
410
|
-
"h264-ts": ["pcm-16", "aac"],
|
|
411
|
-
aac: ["aac", "pcm-16"],
|
|
412
|
-
avi: [],
|
|
413
|
-
gif: [],
|
|
414
|
-
h265: ["aac", "pcm-16"],
|
|
415
|
-
mp3: ["mp3", "pcm-16"],
|
|
416
|
-
prores: ["aac", "pcm-16"],
|
|
417
|
-
vp8: ["opus", "pcm-16"],
|
|
418
|
-
vp9: ["opus", "pcm-16"],
|
|
419
|
-
wav: ["pcm-16"]
|
|
420
|
-
};
|
|
421
|
-
var _satisfies = supportedAudioCodecs;
|
|
422
|
-
if (_satisfies) {}
|
|
423
|
-
var cliFlag4 = "audio-codec";
|
|
424
|
-
var ssrName = "audioCodec";
|
|
425
|
-
var defaultAudioCodecs = {
|
|
426
|
-
"h264-mkv": {
|
|
427
|
-
lossless: "pcm-16",
|
|
428
|
-
compressed: "pcm-16"
|
|
429
|
-
},
|
|
430
|
-
"h264-ts": {
|
|
431
|
-
lossless: "pcm-16",
|
|
432
|
-
compressed: "aac"
|
|
433
|
-
},
|
|
434
|
-
aac: {
|
|
435
|
-
lossless: "pcm-16",
|
|
436
|
-
compressed: "aac"
|
|
437
|
-
},
|
|
438
|
-
gif: {
|
|
439
|
-
lossless: null,
|
|
440
|
-
compressed: null
|
|
441
|
-
},
|
|
442
|
-
h264: {
|
|
443
|
-
lossless: "pcm-16",
|
|
444
|
-
compressed: "aac"
|
|
445
|
-
},
|
|
446
|
-
h265: {
|
|
447
|
-
lossless: "pcm-16",
|
|
448
|
-
compressed: "aac"
|
|
449
|
-
},
|
|
450
|
-
mp3: {
|
|
451
|
-
lossless: "pcm-16",
|
|
452
|
-
compressed: "mp3"
|
|
453
|
-
},
|
|
454
|
-
prores: {
|
|
455
|
-
lossless: "pcm-16",
|
|
456
|
-
compressed: "pcm-16"
|
|
457
|
-
},
|
|
458
|
-
vp8: {
|
|
459
|
-
lossless: "pcm-16",
|
|
460
|
-
compressed: "opus"
|
|
461
|
-
},
|
|
462
|
-
vp9: {
|
|
463
|
-
lossless: "pcm-16",
|
|
464
|
-
compressed: "opus"
|
|
465
|
-
},
|
|
466
|
-
wav: {
|
|
467
|
-
lossless: "pcm-16",
|
|
468
|
-
compressed: "pcm-16"
|
|
469
|
-
}
|
|
470
|
-
};
|
|
471
|
-
var extensionMap = {
|
|
472
|
-
aac: "aac",
|
|
473
|
-
mp3: "mp3",
|
|
474
|
-
opus: "opus",
|
|
475
|
-
"pcm-16": "wav"
|
|
476
|
-
};
|
|
477
|
-
var getExtensionFromAudioCodec = (audioCodec) => {
|
|
478
|
-
if (extensionMap[audioCodec]) {
|
|
479
|
-
return extensionMap[audioCodec];
|
|
480
|
-
}
|
|
481
|
-
throw new Error(`Unsupported audio codec: ${audioCodec}`);
|
|
482
|
-
};
|
|
483
|
-
var resolveAudioCodec = ({
|
|
484
|
-
codec,
|
|
485
|
-
setting,
|
|
486
|
-
preferLossless,
|
|
487
|
-
separateAudioTo
|
|
488
|
-
}) => {
|
|
489
|
-
let derivedFromSeparateAudioToExtension = null;
|
|
490
|
-
if (separateAudioTo) {
|
|
491
|
-
const extension = separateAudioTo.split(".").pop();
|
|
492
|
-
for (const [key, value] of Object.entries(extensionMap)) {
|
|
493
|
-
if (value === extension) {
|
|
494
|
-
derivedFromSeparateAudioToExtension = key;
|
|
495
|
-
if (!supportedAudioCodecs[codec].includes(derivedFromSeparateAudioToExtension) && derivedFromSeparateAudioToExtension) {
|
|
496
|
-
throw new Error(`The codec is ${codec} but the audio codec derived from --${separateAudioOption.cliFlag} is ${derivedFromSeparateAudioToExtension}. The only supported codecs are: ${supportedAudioCodecs[codec].join(", ")}`);
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
if (preferLossless) {
|
|
502
|
-
const selected = getDefaultAudioCodec({ codec, preferLossless });
|
|
503
|
-
if (derivedFromSeparateAudioToExtension && selected !== derivedFromSeparateAudioToExtension) {
|
|
504
|
-
throw new Error(`The audio codec derived from --${separateAudioOption.cliFlag} is ${derivedFromSeparateAudioToExtension}, but does not match the audio codec derived from the "Prefer lossless" option (${selected}). Remove any conflicting options.`);
|
|
505
|
-
}
|
|
506
|
-
return selected;
|
|
507
|
-
}
|
|
508
|
-
if (setting === null) {
|
|
509
|
-
if (derivedFromSeparateAudioToExtension) {
|
|
510
|
-
return derivedFromSeparateAudioToExtension;
|
|
511
|
-
}
|
|
512
|
-
return getDefaultAudioCodec({ codec, preferLossless });
|
|
513
|
-
}
|
|
514
|
-
if (derivedFromSeparateAudioToExtension !== setting && derivedFromSeparateAudioToExtension) {
|
|
515
|
-
throw new Error(`The audio codec derived from --${separateAudioOption.cliFlag} is ${derivedFromSeparateAudioToExtension}, but does not match the audio codec derived from your ${audioCodecOption.name} setting (${setting}). Remove any conflicting options.`);
|
|
516
|
-
}
|
|
517
|
-
return setting;
|
|
518
|
-
};
|
|
519
|
-
var getDefaultAudioCodec = ({
|
|
520
|
-
codec,
|
|
521
|
-
preferLossless
|
|
522
|
-
}) => {
|
|
523
|
-
return defaultAudioCodecs[codec][preferLossless ? "lossless" : "compressed"];
|
|
524
|
-
};
|
|
525
|
-
var _audioCodec = null;
|
|
526
|
-
var audioCodecOption = {
|
|
527
|
-
cliFlag: cliFlag4,
|
|
528
|
-
setConfig: (audioCodec) => {
|
|
529
|
-
if (audioCodec === null) {
|
|
530
|
-
_audioCodec = null;
|
|
531
|
-
return;
|
|
532
|
-
}
|
|
533
|
-
if (!validAudioCodecs.includes(audioCodec)) {
|
|
534
|
-
throw new Error(`Audio codec must be one of the following: ${validAudioCodecs.join(", ")}, but got ${audioCodec}`);
|
|
535
|
-
}
|
|
536
|
-
_audioCodec = audioCodec;
|
|
537
|
-
},
|
|
538
|
-
getValue: ({ commandLine }) => {
|
|
539
|
-
if (commandLine[cliFlag4]) {
|
|
540
|
-
const codec = commandLine[cliFlag4];
|
|
541
|
-
if (!validAudioCodecs.includes(commandLine[cliFlag4])) {
|
|
542
|
-
throw new Error(`Audio codec must be one of the following: ${validAudioCodecs.join(", ")}, but got ${codec}`);
|
|
543
|
-
}
|
|
544
|
-
return {
|
|
545
|
-
source: "cli",
|
|
546
|
-
value: commandLine[cliFlag4]
|
|
547
|
-
};
|
|
548
|
-
}
|
|
549
|
-
if (_audioCodec !== null) {
|
|
550
|
-
return {
|
|
551
|
-
source: "config",
|
|
552
|
-
value: _audioCodec
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
return {
|
|
556
|
-
source: "default",
|
|
557
|
-
value: null
|
|
558
|
-
};
|
|
559
|
-
},
|
|
560
|
-
description: () => `Set the format of the audio that is embedded in the video. Not all codec and audio codec combinations are supported and certain combinations require a certain file extension and container format. See the table in the docs to see possible combinations.`,
|
|
561
|
-
docLink: "https://www.remotion.dev/docs/encoding/#audio-codec",
|
|
562
|
-
name: "Audio Codec",
|
|
563
|
-
ssrName,
|
|
564
|
-
type: "aac"
|
|
565
|
-
};
|
|
566
|
-
|
|
567
|
-
// src/options/beep-on-finish.tsx
|
|
568
|
-
import { jsx as jsx3, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
569
|
-
var beepOnFinish = false;
|
|
570
|
-
var cliFlag5 = "beep-on-finish";
|
|
571
|
-
var beepOnFinishOption = {
|
|
572
|
-
name: "Beep on finish",
|
|
573
|
-
cliFlag: cliFlag5,
|
|
574
|
-
description: () => /* @__PURE__ */ jsx3(Fragment3, {
|
|
575
|
-
children: "Whether the Remotion Studio tab should beep when the render is finished."
|
|
576
|
-
}),
|
|
577
|
-
ssrName: null,
|
|
578
|
-
docLink: "https://www.remotion.dev/docs/config#setbeeponfinish",
|
|
579
|
-
type: false,
|
|
580
|
-
getValue: ({ commandLine }) => {
|
|
581
|
-
if (commandLine[cliFlag5] !== undefined) {
|
|
582
|
-
return {
|
|
583
|
-
value: commandLine[cliFlag5],
|
|
584
|
-
source: "cli"
|
|
585
|
-
};
|
|
586
|
-
}
|
|
587
|
-
if (beepOnFinish !== false) {
|
|
588
|
-
return {
|
|
589
|
-
value: beepOnFinish,
|
|
590
|
-
source: "config"
|
|
591
|
-
};
|
|
592
|
-
}
|
|
593
|
-
return {
|
|
594
|
-
value: false,
|
|
595
|
-
source: "default"
|
|
596
|
-
};
|
|
597
|
-
},
|
|
598
|
-
setConfig(value) {
|
|
599
|
-
beepOnFinish = value;
|
|
600
|
-
}
|
|
601
|
-
};
|
|
602
|
-
|
|
603
|
-
// src/options/binaries-directory.tsx
|
|
604
|
-
import { jsx as jsx4, jsxs as jsxs3, Fragment as Fragment4 } from "react/jsx-runtime";
|
|
605
|
-
var cliFlag6 = "binaries-directory";
|
|
606
|
-
var currentDirectory = null;
|
|
607
|
-
var binariesDirectoryOption = {
|
|
608
|
-
name: "Binaries Directory",
|
|
609
|
-
cliFlag: cliFlag6,
|
|
610
|
-
description: () => /* @__PURE__ */ jsxs3(Fragment4, {
|
|
611
|
-
children: [
|
|
612
|
-
"The directory where the platform-specific binaries and libraries that Remotion needs are located. Those include an ",
|
|
613
|
-
/* @__PURE__ */ jsx4("code", {
|
|
614
|
-
children: "ffmpeg"
|
|
615
|
-
}),
|
|
616
|
-
" and",
|
|
617
|
-
" ",
|
|
618
|
-
/* @__PURE__ */ jsx4("code", {
|
|
619
|
-
children: "ffprobe"
|
|
620
|
-
}),
|
|
621
|
-
" binary, a Rust binary for various tasks, and various shared libraries. If the value is set to ",
|
|
622
|
-
/* @__PURE__ */ jsx4("code", {
|
|
623
|
-
children: "null"
|
|
624
|
-
}),
|
|
625
|
-
", which is the default, then the path of a platform-specific package located at",
|
|
626
|
-
" ",
|
|
627
|
-
/* @__PURE__ */ jsx4("code", {
|
|
628
|
-
children: "node_modules/@remotion/compositor-*"
|
|
629
|
-
}),
|
|
630
|
-
" is selected.",
|
|
631
|
-
/* @__PURE__ */ jsx4("br", {}),
|
|
632
|
-
"This option is useful in environments where Remotion is not officially supported to run like bundled serverless functions or Electron."
|
|
633
|
-
]
|
|
634
|
-
}),
|
|
635
|
-
ssrName: "binariesDirectory",
|
|
636
|
-
docLink: "https://www.remotion.dev/docs/renderer",
|
|
637
|
-
type: "",
|
|
638
|
-
getValue: ({ commandLine }) => {
|
|
639
|
-
if (commandLine[cliFlag6] !== undefined) {
|
|
640
|
-
return {
|
|
641
|
-
source: "cli",
|
|
642
|
-
value: commandLine[cliFlag6]
|
|
643
|
-
};
|
|
644
|
-
}
|
|
645
|
-
if (currentDirectory !== null) {
|
|
646
|
-
return {
|
|
647
|
-
source: "config",
|
|
648
|
-
value: currentDirectory
|
|
649
|
-
};
|
|
650
|
-
}
|
|
651
|
-
return {
|
|
652
|
-
source: "default",
|
|
653
|
-
value: null
|
|
654
|
-
};
|
|
655
|
-
},
|
|
656
|
-
setConfig: (value) => {
|
|
657
|
-
currentDirectory = value;
|
|
658
|
-
}
|
|
659
|
-
};
|
|
660
|
-
|
|
661
|
-
// src/options/chrome-mode.tsx
|
|
662
|
-
import { jsx as jsx5, jsxs as jsxs4, Fragment as Fragment5 } from "react/jsx-runtime";
|
|
663
|
-
var validChromeModeOptions = [
|
|
664
|
-
"headless-shell",
|
|
665
|
-
"chrome-for-testing"
|
|
666
|
-
];
|
|
667
|
-
var cliFlag7 = "chrome-mode";
|
|
668
|
-
var configSelection = null;
|
|
669
|
-
var chromeModeOption = {
|
|
670
|
-
cliFlag: cliFlag7,
|
|
671
|
-
name: "Chrome Mode",
|
|
672
|
-
ssrName: "chromeMode",
|
|
673
|
-
description: () => {
|
|
674
|
-
return /* @__PURE__ */ jsxs4(Fragment5, {
|
|
675
|
-
children: [
|
|
676
|
-
"One of",
|
|
677
|
-
" ",
|
|
678
|
-
validChromeModeOptions.map((option, i) => /* @__PURE__ */ jsxs4("code", {
|
|
679
|
-
children: [
|
|
680
|
-
option,
|
|
681
|
-
i === validChromeModeOptions.length - 1 ? "" : ", "
|
|
682
|
-
]
|
|
683
|
-
}, option)),
|
|
684
|
-
". Default ",
|
|
685
|
-
/* @__PURE__ */ jsx5("code", {
|
|
686
|
-
children: "headless-shell"
|
|
687
|
-
}),
|
|
688
|
-
".",
|
|
689
|
-
" ",
|
|
690
|
-
/* @__PURE__ */ jsxs4("a", {
|
|
691
|
-
href: "https://remotion.dev/docs/miscellaneous/chrome-headless-shell",
|
|
692
|
-
children: [
|
|
693
|
-
"Use ",
|
|
694
|
-
/* @__PURE__ */ jsx5("code", {
|
|
695
|
-
children: "chrome-for-testing"
|
|
696
|
-
}),
|
|
697
|
-
" to take advantage of GPU drivers on Linux."
|
|
698
|
-
]
|
|
699
|
-
})
|
|
700
|
-
]
|
|
701
|
-
});
|
|
702
|
-
},
|
|
703
|
-
docLink: "https://www.remotion.dev/chrome-for-testing",
|
|
704
|
-
getValue: ({ commandLine }) => {
|
|
705
|
-
if (commandLine[cliFlag7]) {
|
|
706
|
-
if (!validChromeModeOptions.includes(commandLine[cliFlag7])) {
|
|
707
|
-
throw new Error(`Invalid \`--${cliFlag7}\` value passed. Accepted values: ${validChromeModeOptions.map((l) => `'${l}'`).join(", ")}.`);
|
|
708
|
-
}
|
|
709
|
-
return {
|
|
710
|
-
value: commandLine[cliFlag7],
|
|
711
|
-
source: "cli"
|
|
712
|
-
};
|
|
713
|
-
}
|
|
714
|
-
if (configSelection !== null) {
|
|
715
|
-
return {
|
|
716
|
-
value: configSelection,
|
|
717
|
-
source: "config"
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
return {
|
|
721
|
-
value: "headless-shell",
|
|
722
|
-
source: "default"
|
|
723
|
-
};
|
|
724
|
-
},
|
|
725
|
-
setConfig: (newChromeMode) => {
|
|
726
|
-
configSelection = newChromeMode;
|
|
727
|
-
},
|
|
728
|
-
type: "headless-shell"
|
|
729
|
-
};
|
|
730
|
-
|
|
731
|
-
// src/options/color-space.tsx
|
|
732
|
-
import { NoReactInternals } from "remotion/no-react";
|
|
733
|
-
import { jsx as jsx6, jsxs as jsxs5, Fragment as Fragment6 } from "react/jsx-runtime";
|
|
734
|
-
var validV4ColorSpaces = ["default", "bt709", "bt2020-ncl"];
|
|
735
|
-
var validV5ColorSpaces = ["bt601", "bt709", "bt2020-ncl"];
|
|
736
|
-
var validColorSpaces = NoReactInternals.ENABLE_V5_BREAKING_CHANGES ? validV5ColorSpaces : validV4ColorSpaces;
|
|
737
|
-
var DEFAULT_COLOR_SPACE = NoReactInternals.ENABLE_V5_BREAKING_CHANGES ? "bt709" : "default";
|
|
738
|
-
var colorSpace = DEFAULT_COLOR_SPACE;
|
|
739
|
-
var cliFlag8 = "color-space";
|
|
740
|
-
var colorSpaceOption = {
|
|
741
|
-
name: "Color space",
|
|
742
|
-
cliFlag: "color-space",
|
|
743
|
-
description: () => /* @__PURE__ */ jsxs5(Fragment6, {
|
|
744
|
-
children: [
|
|
745
|
-
"Color space to use for the video. Acceptable values:",
|
|
746
|
-
" ",
|
|
747
|
-
/* @__PURE__ */ jsxs5("code", {
|
|
748
|
-
children: [
|
|
749
|
-
'"',
|
|
750
|
-
DEFAULT_COLOR_SPACE,
|
|
751
|
-
'"'
|
|
752
|
-
]
|
|
753
|
-
}),
|
|
754
|
-
"(default since 5.0),",
|
|
755
|
-
" ",
|
|
756
|
-
NoReactInternals.ENABLE_V5_BREAKING_CHANGES ? /* @__PURE__ */ jsxs5("code", {
|
|
757
|
-
children: [
|
|
758
|
-
'"',
|
|
759
|
-
"bt601",
|
|
760
|
-
'"',
|
|
761
|
-
", "
|
|
762
|
-
]
|
|
763
|
-
}) : /* @__PURE__ */ jsxs5(Fragment6, {
|
|
764
|
-
children: [
|
|
765
|
-
/* @__PURE__ */ jsxs5("code", {
|
|
766
|
-
children: [
|
|
767
|
-
'"',
|
|
768
|
-
"bt709",
|
|
769
|
-
'"'
|
|
770
|
-
]
|
|
771
|
-
}),
|
|
772
|
-
" ",
|
|
773
|
-
"(since v4.0.28),",
|
|
774
|
-
" "
|
|
775
|
-
]
|
|
776
|
-
}),
|
|
777
|
-
/* @__PURE__ */ jsxs5("code", {
|
|
778
|
-
children: [
|
|
779
|
-
'"',
|
|
780
|
-
"bt2020-ncl",
|
|
781
|
-
'"'
|
|
782
|
-
]
|
|
783
|
-
}),
|
|
784
|
-
" ",
|
|
785
|
-
"(since v4.0.88),",
|
|
786
|
-
" ",
|
|
787
|
-
/* @__PURE__ */ jsxs5("code", {
|
|
788
|
-
children: [
|
|
789
|
-
'"',
|
|
790
|
-
"bt2020-cl",
|
|
791
|
-
'"'
|
|
792
|
-
]
|
|
793
|
-
}),
|
|
794
|
-
" ",
|
|
795
|
-
"(since v4.0.88), .",
|
|
796
|
-
/* @__PURE__ */ jsx6("br", {}),
|
|
797
|
-
"For best color accuracy, it is recommended to also use",
|
|
798
|
-
" ",
|
|
799
|
-
/* @__PURE__ */ jsxs5("code", {
|
|
800
|
-
children: [
|
|
801
|
-
'"',
|
|
802
|
-
"png",
|
|
803
|
-
'"'
|
|
804
|
-
]
|
|
805
|
-
}),
|
|
806
|
-
" ",
|
|
807
|
-
"as the image format to have accurate color transformations throughout.",
|
|
808
|
-
/* @__PURE__ */ jsx6("br", {}),
|
|
809
|
-
"Only since v4.0.83, colorspace conversion is actually performed, previously it would only tag the metadata of the video."
|
|
810
|
-
]
|
|
811
|
-
}),
|
|
812
|
-
docLink: "https://www.remotion.dev/docs/renderer/render-media#colorspace",
|
|
813
|
-
ssrName: "colorSpace",
|
|
814
|
-
type: DEFAULT_COLOR_SPACE,
|
|
815
|
-
getValue: ({ commandLine }) => {
|
|
816
|
-
if (commandLine[cliFlag8] !== undefined) {
|
|
817
|
-
return {
|
|
818
|
-
source: "cli",
|
|
819
|
-
value: commandLine[cliFlag8]
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
if (colorSpace !== DEFAULT_COLOR_SPACE) {
|
|
823
|
-
return {
|
|
824
|
-
source: "config",
|
|
825
|
-
value: colorSpace
|
|
826
|
-
};
|
|
827
|
-
}
|
|
828
|
-
return {
|
|
829
|
-
source: "default",
|
|
830
|
-
value: DEFAULT_COLOR_SPACE
|
|
831
|
-
};
|
|
832
|
-
},
|
|
833
|
-
setConfig: (value) => {
|
|
834
|
-
colorSpace = value ?? DEFAULT_COLOR_SPACE;
|
|
835
|
-
}
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
// src/options/crf.tsx
|
|
839
|
-
import { jsx as jsx7, Fragment as Fragment7 } from "react/jsx-runtime";
|
|
840
|
-
var currentCrf;
|
|
841
|
-
var validateCrf = (newCrf) => {
|
|
842
|
-
if (typeof newCrf !== "number" && newCrf !== undefined) {
|
|
843
|
-
throw new TypeError("The CRF must be a number or undefined.");
|
|
844
|
-
}
|
|
845
|
-
};
|
|
846
|
-
var cliFlag9 = "crf";
|
|
847
|
-
var crfOption = {
|
|
848
|
-
name: "CRF",
|
|
849
|
-
cliFlag: cliFlag9,
|
|
850
|
-
description: () => /* @__PURE__ */ jsx7(Fragment7, {
|
|
851
|
-
children: "No matter which codec you end up using, there's always a tradeoff between file size and video quality. You can control it by setting the CRF (Constant Rate Factor). The lower the number, the better the quality, the higher the number, the smaller the file is – of course at the cost of quality."
|
|
852
|
-
}),
|
|
853
|
-
ssrName: "crf",
|
|
854
|
-
docLink: "https://www.remotion.dev/docs/encoding/#controlling-quality-using-the-crf-setting",
|
|
855
|
-
type: 0,
|
|
856
|
-
getValue: ({ commandLine }) => {
|
|
857
|
-
if (commandLine[cliFlag9] !== undefined) {
|
|
858
|
-
validateCrf(commandLine[cliFlag9]);
|
|
859
|
-
return {
|
|
860
|
-
source: "cli",
|
|
861
|
-
value: commandLine[cliFlag9]
|
|
862
|
-
};
|
|
863
|
-
}
|
|
864
|
-
if (currentCrf !== null) {
|
|
865
|
-
return {
|
|
866
|
-
source: "config",
|
|
867
|
-
value: currentCrf
|
|
868
|
-
};
|
|
869
|
-
}
|
|
870
|
-
return {
|
|
871
|
-
source: "default",
|
|
872
|
-
value: undefined
|
|
873
|
-
};
|
|
874
|
-
},
|
|
875
|
-
setConfig: (crf) => {
|
|
876
|
-
validateCrf(crf);
|
|
877
|
-
currentCrf = crf;
|
|
878
|
-
}
|
|
879
|
-
};
|
|
880
|
-
|
|
881
|
-
// src/options/cross-site-isolation.tsx
|
|
882
|
-
import { jsx as jsx8, jsxs as jsxs6, Fragment as Fragment8 } from "react/jsx-runtime";
|
|
883
|
-
var enableCrossSiteIsolation = false;
|
|
884
|
-
var cliFlag10 = "cross-site-isolation";
|
|
885
|
-
var enableCrossSiteIsolationOption = {
|
|
886
|
-
name: "Enable Cross-Site Isolation",
|
|
887
|
-
cliFlag: cliFlag10,
|
|
888
|
-
description: () => /* @__PURE__ */ jsxs6(Fragment8, {
|
|
889
|
-
children: [
|
|
890
|
-
"Enable Cross-Site Isolation in the Studio (sets Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy HTTP headers, required for",
|
|
891
|
-
" ",
|
|
892
|
-
/* @__PURE__ */ jsx8("code", {
|
|
893
|
-
children: "@remotion/whisper-web"
|
|
894
|
-
}),
|
|
895
|
-
")."
|
|
896
|
-
]
|
|
897
|
-
}),
|
|
898
|
-
ssrName: null,
|
|
899
|
-
docLink: "https://www.remotion.dev/docs/config#setenablecrosssiteisolation",
|
|
900
|
-
type: false,
|
|
901
|
-
getValue: ({ commandLine }) => {
|
|
902
|
-
if (commandLine[cliFlag10] !== undefined) {
|
|
903
|
-
return {
|
|
904
|
-
value: commandLine[cliFlag10],
|
|
905
|
-
source: "cli"
|
|
906
|
-
};
|
|
907
|
-
}
|
|
908
|
-
return {
|
|
909
|
-
value: enableCrossSiteIsolation,
|
|
910
|
-
source: "config"
|
|
911
|
-
};
|
|
912
|
-
},
|
|
913
|
-
setConfig(value) {
|
|
914
|
-
enableCrossSiteIsolation = value;
|
|
915
|
-
}
|
|
916
|
-
};
|
|
917
|
-
|
|
918
|
-
// src/options/delete-after.tsx
|
|
919
|
-
import { jsx as jsx9, jsxs as jsxs7, Fragment as Fragment9 } from "react/jsx-runtime";
|
|
920
|
-
var cliFlag11 = "delete-after";
|
|
921
|
-
var deleteAfter = null;
|
|
922
|
-
var deleteAfterOption = {
|
|
923
|
-
name: "Lambda render expiration",
|
|
924
|
-
cliFlag: cliFlag11,
|
|
925
|
-
description: () => {
|
|
926
|
-
return /* @__PURE__ */ jsxs7(Fragment9, {
|
|
927
|
-
children: [
|
|
928
|
-
"Automatically delete the render after a certain period. Accepted values are ",
|
|
929
|
-
/* @__PURE__ */ jsx9("code", {
|
|
930
|
-
children: "1-day"
|
|
931
|
-
}),
|
|
932
|
-
", ",
|
|
933
|
-
/* @__PURE__ */ jsx9("code", {
|
|
934
|
-
children: "3-days"
|
|
935
|
-
}),
|
|
936
|
-
", ",
|
|
937
|
-
/* @__PURE__ */ jsx9("code", {
|
|
938
|
-
children: "7-days"
|
|
939
|
-
}),
|
|
940
|
-
" and",
|
|
941
|
-
" ",
|
|
942
|
-
/* @__PURE__ */ jsx9("code", {
|
|
943
|
-
children: "30-days"
|
|
944
|
-
}),
|
|
945
|
-
".",
|
|
946
|
-
/* @__PURE__ */ jsx9("br", {}),
|
|
947
|
-
" For this to work, your bucket needs to have",
|
|
948
|
-
" ",
|
|
949
|
-
/* @__PURE__ */ jsx9("a", {
|
|
950
|
-
href: "/docs/lambda/autodelete",
|
|
951
|
-
children: "lifecycles enabled"
|
|
952
|
-
}),
|
|
953
|
-
"."
|
|
954
|
-
]
|
|
955
|
-
});
|
|
956
|
-
},
|
|
957
|
-
ssrName: "deleteAfter",
|
|
958
|
-
docLink: "https://www.remotion.dev/docs/lambda/autodelete",
|
|
959
|
-
type: "1-day",
|
|
960
|
-
getValue: ({ commandLine }) => {
|
|
961
|
-
if (commandLine[cliFlag11] !== undefined) {
|
|
962
|
-
return {
|
|
963
|
-
source: "cli",
|
|
964
|
-
value: commandLine[cliFlag11]
|
|
965
|
-
};
|
|
966
|
-
}
|
|
967
|
-
if (deleteAfter !== null) {
|
|
968
|
-
return {
|
|
969
|
-
source: "config",
|
|
970
|
-
value: deleteAfter
|
|
971
|
-
};
|
|
972
|
-
}
|
|
973
|
-
return {
|
|
974
|
-
source: "default",
|
|
975
|
-
value: null
|
|
976
|
-
};
|
|
977
|
-
},
|
|
978
|
-
setConfig: (value) => {
|
|
979
|
-
deleteAfter = value;
|
|
980
|
-
}
|
|
981
|
-
};
|
|
982
|
-
|
|
983
|
-
// src/options/disable-git-source.tsx
|
|
984
|
-
var DEFAULT2 = false;
|
|
985
|
-
var cliFlag12 = "disable-git-source";
|
|
986
|
-
var disableGitSourceOption = {
|
|
987
|
-
cliFlag: cliFlag12,
|
|
988
|
-
description: () => `Disables the Git Source being connected to the Remotion Studio. Clicking on stack traces and certain menu items will be disabled.`,
|
|
989
|
-
docLink: "https://remotion.dev/docs/bundle",
|
|
990
|
-
getValue: ({ commandLine }) => {
|
|
991
|
-
if (commandLine[cliFlag12]) {
|
|
992
|
-
return {
|
|
993
|
-
source: "cli",
|
|
994
|
-
value: commandLine[cliFlag12]
|
|
995
|
-
};
|
|
996
|
-
}
|
|
997
|
-
return {
|
|
998
|
-
source: "default",
|
|
999
|
-
value: DEFAULT2
|
|
1000
|
-
};
|
|
1001
|
-
},
|
|
1002
|
-
name: "Disable Git source",
|
|
1003
|
-
setConfig: () => {
|
|
1004
|
-
throw new Error("Not implemented");
|
|
1005
|
-
},
|
|
1006
|
-
ssrName: "disableGitSource",
|
|
1007
|
-
type: false
|
|
1008
|
-
};
|
|
1009
|
-
|
|
1010
|
-
// src/options/disallow-parallel-encoding.tsx
|
|
1011
|
-
import { jsx as jsx10, Fragment as Fragment10 } from "react/jsx-runtime";
|
|
1012
|
-
var disallowParallelEncoding = false;
|
|
1013
|
-
var cliFlag13 = "disallow-parallel-encoding";
|
|
1014
|
-
var disallowParallelEncodingOption = {
|
|
1015
|
-
name: "Disallow parallel encoding",
|
|
1016
|
-
cliFlag: cliFlag13,
|
|
1017
|
-
description: () => /* @__PURE__ */ jsx10(Fragment10, {
|
|
1018
|
-
children: "Disallows the renderer from doing rendering frames and encoding at the same time. This makes the rendering process more memory-efficient, but possibly slower."
|
|
1019
|
-
}),
|
|
1020
|
-
ssrName: "disallowParallelEncoding",
|
|
1021
|
-
docLink: "https://www.remotion.dev/docs/config#setdisallowparallelencoding",
|
|
1022
|
-
type: false,
|
|
1023
|
-
getValue: ({ commandLine }) => {
|
|
1024
|
-
if (commandLine[cliFlag13] !== undefined) {
|
|
1025
|
-
return {
|
|
1026
|
-
value: commandLine[cliFlag13],
|
|
1027
|
-
source: "cli"
|
|
1028
|
-
};
|
|
1029
|
-
}
|
|
1030
|
-
if (disallowParallelEncoding !== false) {
|
|
1031
|
-
return {
|
|
1032
|
-
value: disallowParallelEncoding,
|
|
1033
|
-
source: "config"
|
|
1034
|
-
};
|
|
1035
|
-
}
|
|
1036
|
-
return {
|
|
1037
|
-
value: false,
|
|
1038
|
-
source: "default"
|
|
1039
|
-
};
|
|
1040
|
-
},
|
|
1041
|
-
setConfig(value) {
|
|
1042
|
-
disallowParallelEncoding = value;
|
|
1043
|
-
}
|
|
1044
|
-
};
|
|
1045
|
-
|
|
1046
|
-
// src/options/enable-lambda-insights.tsx
|
|
1047
|
-
import { jsx as jsx11, jsxs as jsxs8, Fragment as Fragment11 } from "react/jsx-runtime";
|
|
1048
|
-
var cliFlag14 = "enable-lambda-insights";
|
|
1049
|
-
var option = false;
|
|
1050
|
-
var enableLambdaInsights = {
|
|
1051
|
-
name: "Enable Lambda Insights",
|
|
1052
|
-
cliFlag: cliFlag14,
|
|
1053
|
-
description: () => /* @__PURE__ */ jsxs8(Fragment11, {
|
|
1054
|
-
children: [
|
|
1055
|
-
"Enable",
|
|
1056
|
-
" ",
|
|
1057
|
-
/* @__PURE__ */ jsx11("a", {
|
|
1058
|
-
href: "https://remotion.dev/docs/lambda/insights",
|
|
1059
|
-
children: "Lambda Insights in AWS CloudWatch"
|
|
1060
|
-
}),
|
|
1061
|
-
". For this to work, you may have to update your role permission."
|
|
1062
|
-
]
|
|
1063
|
-
}),
|
|
1064
|
-
ssrName: "enableLambdaInsights",
|
|
1065
|
-
docLink: "https://www.remotion.dev/docs/lambda/insights",
|
|
1066
|
-
type: false,
|
|
1067
|
-
setConfig: (value) => {
|
|
1068
|
-
option = value;
|
|
1069
|
-
},
|
|
1070
|
-
getValue: ({ commandLine }) => {
|
|
1071
|
-
if (commandLine[cliFlag14] !== undefined) {
|
|
1072
|
-
return {
|
|
1073
|
-
value: commandLine[cliFlag14],
|
|
1074
|
-
source: "cli"
|
|
1075
|
-
};
|
|
1076
|
-
}
|
|
1077
|
-
if (option) {
|
|
1078
|
-
return {
|
|
1079
|
-
value: option,
|
|
1080
|
-
source: "config"
|
|
1081
|
-
};
|
|
1082
|
-
}
|
|
1083
|
-
return {
|
|
1084
|
-
value: false,
|
|
1085
|
-
source: "default"
|
|
1086
|
-
};
|
|
1087
|
-
}
|
|
1088
|
-
};
|
|
1089
|
-
|
|
1090
|
-
// src/options/enable-multiprocess-on-linux.tsx
|
|
1091
|
-
import { jsx as jsx12, jsxs as jsxs9, Fragment as Fragment12 } from "react/jsx-runtime";
|
|
1092
|
-
var DEFAULT_VALUE = true;
|
|
1093
|
-
var multiProcessOnLinux = DEFAULT_VALUE;
|
|
1094
|
-
var cliFlag15 = "enable-multiprocess-on-linux";
|
|
1095
|
-
var enableMultiprocessOnLinuxOption = {
|
|
1096
|
-
name: "Enable Multiprocess on Linux",
|
|
1097
|
-
cliFlag: cliFlag15,
|
|
1098
|
-
description: () => /* @__PURE__ */ jsxs9(Fragment12, {
|
|
1099
|
-
children: [
|
|
1100
|
-
"Removes the ",
|
|
1101
|
-
/* @__PURE__ */ jsx12("code", {
|
|
1102
|
-
children: "--single-process"
|
|
1103
|
-
}),
|
|
1104
|
-
" flag that gets passed to Chromium on Linux by default. This will make the render faster because multiple processes can be used, but may cause issues with some Linux distributions or if window server libraries are missing.",
|
|
1105
|
-
/* @__PURE__ */ jsx12("br", {}),
|
|
1106
|
-
"Default: ",
|
|
1107
|
-
/* @__PURE__ */ jsx12("code", {
|
|
1108
|
-
children: "false"
|
|
1109
|
-
}),
|
|
1110
|
-
" until v4.0.136, then ",
|
|
1111
|
-
/* @__PURE__ */ jsx12("code", {
|
|
1112
|
-
children: "true"
|
|
1113
|
-
}),
|
|
1114
|
-
" from v4.0.137 on because newer Chrome versions ",
|
|
1115
|
-
"don't",
|
|
1116
|
-
" allow rendering with the ",
|
|
1117
|
-
/* @__PURE__ */ jsx12("code", {
|
|
1118
|
-
children: "--single-process"
|
|
1119
|
-
}),
|
|
1120
|
-
" flag. ",
|
|
1121
|
-
/* @__PURE__ */ jsx12("br", {}),
|
|
1122
|
-
"This flag will be removed in Remotion v5.0."
|
|
1123
|
-
]
|
|
1124
|
-
}),
|
|
1125
|
-
ssrName: "chromiumOptions.enableMultiprocessOnLinux",
|
|
1126
|
-
docLink: "https://www.remotion.dev/docs/chromium-flags",
|
|
1127
|
-
type: false,
|
|
1128
|
-
getValue: ({ commandLine }) => {
|
|
1129
|
-
if (commandLine[cliFlag15] !== undefined) {
|
|
1130
|
-
return {
|
|
1131
|
-
source: "cli",
|
|
1132
|
-
value: commandLine[cliFlag15]
|
|
1133
|
-
};
|
|
1134
|
-
}
|
|
1135
|
-
if (multiProcessOnLinux !== false) {
|
|
1136
|
-
return {
|
|
1137
|
-
source: "config",
|
|
1138
|
-
value: multiProcessOnLinux
|
|
1139
|
-
};
|
|
1140
|
-
}
|
|
1141
|
-
return {
|
|
1142
|
-
source: "default",
|
|
1143
|
-
value: DEFAULT_VALUE
|
|
1144
|
-
};
|
|
1145
|
-
},
|
|
1146
|
-
setConfig: (value) => {
|
|
1147
|
-
multiProcessOnLinux = value;
|
|
1148
|
-
}
|
|
1149
|
-
};
|
|
1150
|
-
|
|
1151
|
-
// src/options/encoding-buffer-size.tsx
|
|
1152
|
-
import { jsx as jsx13, jsxs as jsxs10, Fragment as Fragment13 } from "react/jsx-runtime";
|
|
1153
|
-
var encodingBufferSize = null;
|
|
1154
|
-
var setEncodingBufferSize = (bitrate) => {
|
|
1155
|
-
encodingBufferSize = bitrate;
|
|
1156
|
-
};
|
|
1157
|
-
var cliFlag16 = "buffer-size";
|
|
1158
|
-
var encodingBufferSizeOption = {
|
|
1159
|
-
name: "FFmpeg -bufsize flag",
|
|
1160
|
-
cliFlag: cliFlag16,
|
|
1161
|
-
description: () => /* @__PURE__ */ jsxs10(Fragment13, {
|
|
1162
|
-
children: [
|
|
1163
|
-
"The value for the ",
|
|
1164
|
-
/* @__PURE__ */ jsx13("code", {
|
|
1165
|
-
children: "-bufsize"
|
|
1166
|
-
}),
|
|
1167
|
-
" flag of FFmpeg. Should be used in conjunction with the encoding max rate flag."
|
|
1168
|
-
]
|
|
1169
|
-
}),
|
|
1170
|
-
ssrName: "encodingBufferSize",
|
|
1171
|
-
docLink: "https://www.remotion.dev/docs/renderer/render-media#encodingbuffersize",
|
|
1172
|
-
type: "",
|
|
1173
|
-
getValue: ({ commandLine }) => {
|
|
1174
|
-
if (commandLine[cliFlag16] !== undefined) {
|
|
1175
|
-
return {
|
|
1176
|
-
value: commandLine[cliFlag16],
|
|
1177
|
-
source: "cli"
|
|
1178
|
-
};
|
|
1179
|
-
}
|
|
1180
|
-
if (encodingBufferSize !== null) {
|
|
1181
|
-
return {
|
|
1182
|
-
value: encodingBufferSize,
|
|
1183
|
-
source: "config"
|
|
1184
|
-
};
|
|
1185
|
-
}
|
|
1186
|
-
return {
|
|
1187
|
-
value: null,
|
|
1188
|
-
source: "default"
|
|
1189
|
-
};
|
|
1190
|
-
},
|
|
1191
|
-
setConfig: setEncodingBufferSize
|
|
1192
|
-
};
|
|
1193
|
-
|
|
1194
|
-
// src/options/encoding-max-rate.tsx
|
|
1195
|
-
import { jsx as jsx14, jsxs as jsxs11, Fragment as Fragment14 } from "react/jsx-runtime";
|
|
1196
|
-
var encodingMaxRate = null;
|
|
1197
|
-
var cliFlag17 = "max-rate";
|
|
1198
|
-
var encodingMaxRateOption = {
|
|
1199
|
-
name: "FFmpeg -maxrate flag",
|
|
1200
|
-
cliFlag: cliFlag17,
|
|
1201
|
-
description: () => /* @__PURE__ */ jsxs11(Fragment14, {
|
|
1202
|
-
children: [
|
|
1203
|
-
"The value for the ",
|
|
1204
|
-
/* @__PURE__ */ jsx14("code", {
|
|
1205
|
-
children: "-maxrate"
|
|
1206
|
-
}),
|
|
1207
|
-
" flag of FFmpeg. Should be used in conjunction with the encoding buffer size flag."
|
|
1208
|
-
]
|
|
1209
|
-
}),
|
|
1210
|
-
ssrName: "encodingMaxRate",
|
|
1211
|
-
docLink: "https://www.remotion.dev/docs/renderer/render-media#encodingmaxrate",
|
|
1212
|
-
type: "",
|
|
1213
|
-
getValue: ({ commandLine }) => {
|
|
1214
|
-
if (commandLine[cliFlag17] !== undefined) {
|
|
1215
|
-
return {
|
|
1216
|
-
value: commandLine[cliFlag17],
|
|
1217
|
-
source: "cli"
|
|
1218
|
-
};
|
|
1219
|
-
}
|
|
1220
|
-
if (encodingMaxRate !== null) {
|
|
1221
|
-
return {
|
|
1222
|
-
value: encodingMaxRate,
|
|
1223
|
-
source: "config"
|
|
1224
|
-
};
|
|
1225
|
-
}
|
|
1226
|
-
return {
|
|
1227
|
-
value: null,
|
|
1228
|
-
source: "default"
|
|
1229
|
-
};
|
|
1230
|
-
},
|
|
1231
|
-
setConfig: (newMaxRate) => {
|
|
1232
|
-
encodingMaxRate = newMaxRate;
|
|
1233
|
-
}
|
|
1234
|
-
};
|
|
1235
|
-
|
|
1236
|
-
// src/options/enforce-audio.tsx
|
|
1237
|
-
import { jsx as jsx15, Fragment as Fragment15 } from "react/jsx-runtime";
|
|
1238
|
-
var DEFAULT_ENFORCE_AUDIO_TRACK = false;
|
|
1239
|
-
var enforceAudioTrackState = DEFAULT_ENFORCE_AUDIO_TRACK;
|
|
1240
|
-
var cliFlag18 = "enforce-audio-track";
|
|
1241
|
-
var enforceAudioOption = {
|
|
1242
|
-
name: "Enforce Audio Track",
|
|
1243
|
-
cliFlag: cliFlag18,
|
|
1244
|
-
description: () => /* @__PURE__ */ jsx15(Fragment15, {
|
|
1245
|
-
children: "Render a silent audio track if there would be none otherwise."
|
|
1246
|
-
}),
|
|
1247
|
-
ssrName: "enforceAudioTrack",
|
|
1248
|
-
docLink: "https://www.remotion.dev/docs/config#setenforceaudiotrack-",
|
|
1249
|
-
type: false,
|
|
1250
|
-
getValue: ({ commandLine }) => {
|
|
1251
|
-
if (commandLine[cliFlag18]) {
|
|
1252
|
-
return {
|
|
1253
|
-
source: "cli",
|
|
1254
|
-
value: true
|
|
1255
|
-
};
|
|
1256
|
-
}
|
|
1257
|
-
if (enforceAudioTrackState !== DEFAULT_ENFORCE_AUDIO_TRACK) {
|
|
1258
|
-
return {
|
|
1259
|
-
source: "config",
|
|
1260
|
-
value: enforceAudioTrackState
|
|
1261
|
-
};
|
|
1262
|
-
}
|
|
1263
|
-
return {
|
|
1264
|
-
source: "default",
|
|
1265
|
-
value: DEFAULT_ENFORCE_AUDIO_TRACK
|
|
1266
|
-
};
|
|
1267
|
-
},
|
|
1268
|
-
setConfig: (value) => {
|
|
1269
|
-
enforceAudioTrackState = value;
|
|
1270
|
-
}
|
|
1271
|
-
};
|
|
1272
|
-
|
|
1273
|
-
// src/options/folder-expiry.tsx
|
|
1274
|
-
import { jsx as jsx16, jsxs as jsxs12, Fragment as Fragment16 } from "react/jsx-runtime";
|
|
1275
|
-
var enableFolderExpiry = null;
|
|
1276
|
-
var cliFlag19 = "enable-folder-expiry";
|
|
1277
|
-
var folderExpiryOption = {
|
|
1278
|
-
name: "Lambda render expiration",
|
|
1279
|
-
cliFlag: cliFlag19,
|
|
1280
|
-
description: () => {
|
|
1281
|
-
return /* @__PURE__ */ jsxs12(Fragment16, {
|
|
1282
|
-
children: [
|
|
1283
|
-
"When deploying sites, enable or disable S3 Lifecycle policies which allow for renders to auto-delete after a certain time. Default is",
|
|
1284
|
-
" ",
|
|
1285
|
-
/* @__PURE__ */ jsx16("code", {
|
|
1286
|
-
children: "null"
|
|
1287
|
-
}),
|
|
1288
|
-
", which does not change any lifecycle policies of the S3 bucket. See: ",
|
|
1289
|
-
/* @__PURE__ */ jsx16("a", {
|
|
1290
|
-
href: "/docs/lambda/autodelete",
|
|
1291
|
-
children: "Lambda autodelete"
|
|
1292
|
-
}),
|
|
1293
|
-
"."
|
|
1294
|
-
]
|
|
1295
|
-
});
|
|
1296
|
-
},
|
|
1297
|
-
ssrName: "enableFolderExpiry",
|
|
1298
|
-
docLink: "https://www.remotion.dev/docs/lambda/autodelete",
|
|
1299
|
-
type: false,
|
|
1300
|
-
getValue: ({ commandLine }) => {
|
|
1301
|
-
if (commandLine[cliFlag19] !== undefined) {
|
|
1302
|
-
return {
|
|
1303
|
-
source: "cli",
|
|
1304
|
-
value: commandLine[cliFlag19]
|
|
1305
|
-
};
|
|
1306
|
-
}
|
|
1307
|
-
if (enableFolderExpiry !== null) {
|
|
1308
|
-
return {
|
|
1309
|
-
source: "config",
|
|
1310
|
-
value: enableFolderExpiry
|
|
1311
|
-
};
|
|
1312
|
-
}
|
|
1313
|
-
return {
|
|
1314
|
-
source: "default",
|
|
1315
|
-
value: null
|
|
1316
|
-
};
|
|
1317
|
-
},
|
|
1318
|
-
setConfig: (value) => {
|
|
1319
|
-
enableFolderExpiry = value;
|
|
1320
|
-
}
|
|
1321
|
-
};
|
|
1322
|
-
|
|
1323
|
-
// src/options/for-seamless-aac-concatenation.tsx
|
|
1324
|
-
import { jsx as jsx17, jsxs as jsxs13, Fragment as Fragment17 } from "react/jsx-runtime";
|
|
1325
|
-
var DEFAULT3 = false;
|
|
1326
|
-
var forSeamlessAacConcatenation = DEFAULT3;
|
|
1327
|
-
var cliFlag20 = "for-seamless-aac-concatenation";
|
|
1328
|
-
var forSeamlessAacConcatenationOption = {
|
|
1329
|
-
name: "For seamless AAC concatenation",
|
|
1330
|
-
cliFlag: cliFlag20,
|
|
1331
|
-
description: () => /* @__PURE__ */ jsxs13(Fragment17, {
|
|
1332
|
-
children: [
|
|
1333
|
-
"If enabled, the audio is trimmed to the nearest AAC frame, which is required for seamless concatenation of AAC files. This is a requirement if you later want to combine multiple video snippets seamlessly.",
|
|
1334
|
-
/* @__PURE__ */ jsx17("br", {}),
|
|
1335
|
-
/* @__PURE__ */ jsx17("br", {}),
|
|
1336
|
-
" This option is used internally. There is currently no documentation yet for to concatenate the audio chunks."
|
|
1337
|
-
]
|
|
1338
|
-
}),
|
|
1339
|
-
docLink: "https://remotion.dev/docs/renderer",
|
|
1340
|
-
getValue: ({ commandLine }) => {
|
|
1341
|
-
if (commandLine[cliFlag20]) {
|
|
1342
|
-
return {
|
|
1343
|
-
source: "cli",
|
|
1344
|
-
value: true
|
|
1345
|
-
};
|
|
1346
|
-
}
|
|
1347
|
-
if (forSeamlessAacConcatenation !== DEFAULT3) {
|
|
1348
|
-
return {
|
|
1349
|
-
source: "config",
|
|
1350
|
-
value: forSeamlessAacConcatenation
|
|
1351
|
-
};
|
|
1352
|
-
}
|
|
1353
|
-
return {
|
|
1354
|
-
source: "default",
|
|
1355
|
-
value: DEFAULT3
|
|
1356
|
-
};
|
|
1357
|
-
},
|
|
1358
|
-
setConfig: (value) => {
|
|
1359
|
-
forSeamlessAacConcatenation = value;
|
|
1360
|
-
},
|
|
1361
|
-
ssrName: "forSeamlessAacConcatenation",
|
|
1362
|
-
type: false
|
|
1363
|
-
};
|
|
1364
|
-
|
|
1365
|
-
// src/options/gl.tsx
|
|
1366
|
-
import { jsx as jsx18, jsxs as jsxs14, Fragment as Fragment18 } from "react/jsx-runtime";
|
|
1367
|
-
var validOpenGlRenderers = [
|
|
1368
|
-
"swangle",
|
|
1369
|
-
"angle",
|
|
1370
|
-
"egl",
|
|
1371
|
-
"swiftshader",
|
|
1372
|
-
"vulkan",
|
|
1373
|
-
"angle-egl"
|
|
1374
|
-
];
|
|
1375
|
-
var DEFAULT_OPENGL_RENDERER = null;
|
|
1376
|
-
var openGlRenderer = DEFAULT_OPENGL_RENDERER;
|
|
1377
|
-
var AngleChangelog = () => {
|
|
1378
|
-
return /* @__PURE__ */ jsxs14("details", {
|
|
1379
|
-
style: { fontSize: "0.9em", marginBottom: "1em" },
|
|
1380
|
-
children: [
|
|
1381
|
-
/* @__PURE__ */ jsx18("summary", {
|
|
1382
|
-
children: "Changelog"
|
|
1383
|
-
}),
|
|
1384
|
-
/* @__PURE__ */ jsxs14("ul", {
|
|
1385
|
-
children: [
|
|
1386
|
-
/* @__PURE__ */ jsxs14("li", {
|
|
1387
|
-
children: [
|
|
1388
|
-
"From Remotion v2.6.7 until v3.0.7, the default for Remotion Lambda was",
|
|
1389
|
-
" ",
|
|
1390
|
-
/* @__PURE__ */ jsx18("code", {
|
|
1391
|
-
children: "swiftshader"
|
|
1392
|
-
}),
|
|
1393
|
-
", but from v3.0.8 the default is",
|
|
1394
|
-
" ",
|
|
1395
|
-
/* @__PURE__ */ jsx18("code", {
|
|
1396
|
-
children: "swangle"
|
|
1397
|
-
}),
|
|
1398
|
-
" (Swiftshader on Angle) since Chrome 101 added support for it."
|
|
1399
|
-
]
|
|
1400
|
-
}),
|
|
1401
|
-
/* @__PURE__ */ jsxs14("li", {
|
|
1402
|
-
children: [
|
|
1403
|
-
"From Remotion v2.4.3 until v2.6.6, the default was ",
|
|
1404
|
-
/* @__PURE__ */ jsx18("code", {
|
|
1405
|
-
children: "angle"
|
|
1406
|
-
}),
|
|
1407
|
-
", however it turns out to have a small memory leak that could crash long Remotion renders."
|
|
1408
|
-
]
|
|
1409
|
-
})
|
|
1410
|
-
]
|
|
1411
|
-
})
|
|
1412
|
-
]
|
|
1413
|
-
});
|
|
1414
|
-
};
|
|
1415
|
-
var cliFlag21 = "gl";
|
|
1416
|
-
var glOption = {
|
|
1417
|
-
cliFlag: cliFlag21,
|
|
1418
|
-
docLink: "https://www.remotion.dev/docs/chromium-flags#--gl",
|
|
1419
|
-
name: "OpenGL renderer",
|
|
1420
|
-
type: "angle",
|
|
1421
|
-
ssrName: "gl",
|
|
1422
|
-
description: () => {
|
|
1423
|
-
return /* @__PURE__ */ jsxs14(Fragment18, {
|
|
1424
|
-
children: [
|
|
1425
|
-
/* @__PURE__ */ jsx18(AngleChangelog, {}),
|
|
1426
|
-
/* @__PURE__ */ jsxs14("p", {
|
|
1427
|
-
children: [
|
|
1428
|
-
"Select the OpenGL renderer backend for Chromium. ",
|
|
1429
|
-
/* @__PURE__ */ jsx18("br", {}),
|
|
1430
|
-
"Accepted values:"
|
|
1431
|
-
]
|
|
1432
|
-
}),
|
|
1433
|
-
/* @__PURE__ */ jsxs14("ul", {
|
|
1434
|
-
children: [
|
|
1435
|
-
/* @__PURE__ */ jsx18("li", {
|
|
1436
|
-
children: /* @__PURE__ */ jsx18("code", {
|
|
1437
|
-
children: '"angle"'
|
|
1438
|
-
})
|
|
1439
|
-
}),
|
|
1440
|
-
/* @__PURE__ */ jsx18("li", {
|
|
1441
|
-
children: /* @__PURE__ */ jsx18("code", {
|
|
1442
|
-
children: '"egl"'
|
|
1443
|
-
})
|
|
1444
|
-
}),
|
|
1445
|
-
/* @__PURE__ */ jsx18("li", {
|
|
1446
|
-
children: /* @__PURE__ */ jsx18("code", {
|
|
1447
|
-
children: '"swiftshader"'
|
|
1448
|
-
})
|
|
1449
|
-
}),
|
|
1450
|
-
/* @__PURE__ */ jsx18("li", {
|
|
1451
|
-
children: /* @__PURE__ */ jsx18("code", {
|
|
1452
|
-
children: '"swangle"'
|
|
1453
|
-
})
|
|
1454
|
-
}),
|
|
1455
|
-
/* @__PURE__ */ jsxs14("li", {
|
|
1456
|
-
children: [
|
|
1457
|
-
/* @__PURE__ */ jsx18("code", {
|
|
1458
|
-
children: '"vulkan"'
|
|
1459
|
-
}),
|
|
1460
|
-
" (",
|
|
1461
|
-
/* @__PURE__ */ jsx18("em", {
|
|
1462
|
-
children: "from Remotion v4.0.41"
|
|
1463
|
-
}),
|
|
1464
|
-
")"
|
|
1465
|
-
]
|
|
1466
|
-
}),
|
|
1467
|
-
/* @__PURE__ */ jsxs14("li", {
|
|
1468
|
-
children: [
|
|
1469
|
-
/* @__PURE__ */ jsx18("code", {
|
|
1470
|
-
children: '"angle-egl"'
|
|
1471
|
-
}),
|
|
1472
|
-
" (",
|
|
1473
|
-
/* @__PURE__ */ jsx18("em", {
|
|
1474
|
-
children: "from Remotion v4.0.51"
|
|
1475
|
-
}),
|
|
1476
|
-
")"
|
|
1477
|
-
]
|
|
1478
|
-
})
|
|
1479
|
-
]
|
|
1480
|
-
}),
|
|
1481
|
-
/* @__PURE__ */ jsxs14("p", {
|
|
1482
|
-
children: [
|
|
1483
|
-
"The default is ",
|
|
1484
|
-
/* @__PURE__ */ jsx18("code", {
|
|
1485
|
-
children: "null"
|
|
1486
|
-
}),
|
|
1487
|
-
", letting Chrome decide, except on Lambda where the default is ",
|
|
1488
|
-
/* @__PURE__ */ jsx18("code", {
|
|
1489
|
-
children: '"swangle"'
|
|
1490
|
-
})
|
|
1491
|
-
]
|
|
1492
|
-
})
|
|
1493
|
-
]
|
|
1494
|
-
});
|
|
1495
|
-
},
|
|
1496
|
-
getValue: ({ commandLine }) => {
|
|
1497
|
-
if (commandLine[cliFlag21]) {
|
|
1498
|
-
validateOpenGlRenderer(commandLine[cliFlag21]);
|
|
1499
|
-
return {
|
|
1500
|
-
value: commandLine[cliFlag21],
|
|
1501
|
-
source: "cli"
|
|
1502
|
-
};
|
|
1503
|
-
}
|
|
1504
|
-
if (openGlRenderer !== DEFAULT_OPENGL_RENDERER) {
|
|
1505
|
-
return {
|
|
1506
|
-
value: openGlRenderer,
|
|
1507
|
-
source: "config"
|
|
1508
|
-
};
|
|
1509
|
-
}
|
|
1510
|
-
return {
|
|
1511
|
-
value: DEFAULT_OPENGL_RENDERER,
|
|
1512
|
-
source: "default"
|
|
1513
|
-
};
|
|
1514
|
-
},
|
|
1515
|
-
setConfig: (value) => {
|
|
1516
|
-
validateOpenGlRenderer(value);
|
|
1517
|
-
openGlRenderer = value;
|
|
1518
|
-
}
|
|
1519
|
-
};
|
|
1520
|
-
var validateOpenGlRenderer = (option2) => {
|
|
1521
|
-
if (option2 === null) {
|
|
1522
|
-
return null;
|
|
1523
|
-
}
|
|
1524
|
-
if (!validOpenGlRenderers.includes(option2)) {
|
|
1525
|
-
throw new TypeError(`${option2} is not a valid GL backend. Accepted values: ${validOpenGlRenderers.join(", ")}`);
|
|
1526
|
-
}
|
|
1527
|
-
return option2;
|
|
1528
|
-
};
|
|
1529
|
-
|
|
1530
|
-
// src/options/hardware-acceleration.tsx
|
|
1531
|
-
var hardwareAccelerationOptions = [
|
|
1532
|
-
"disable",
|
|
1533
|
-
"if-possible",
|
|
1534
|
-
"required"
|
|
1535
|
-
];
|
|
1536
|
-
var cliFlag22 = "hardware-acceleration";
|
|
1537
|
-
var currentValue = null;
|
|
1538
|
-
var hardwareAccelerationOption = {
|
|
1539
|
-
name: "Hardware Acceleration",
|
|
1540
|
-
cliFlag: cliFlag22,
|
|
1541
|
-
description: () => `
|
|
1542
|
-
One of
|
|
1543
|
-
${new Intl.ListFormat("en", { type: "disjunction" }).format(hardwareAccelerationOptions.map((a) => JSON.stringify(a)))}
|
|
1544
|
-
. Default "disable". Encode using a hardware-accelerated encoder if
|
|
1545
|
-
available. If set to "required" and no hardware-accelerated encoder is
|
|
1546
|
-
available, then the render will fail.
|
|
1547
|
-
`,
|
|
1548
|
-
ssrName: "hardwareAcceleration",
|
|
1549
|
-
docLink: "https://www.remotion.dev/docs/encoding",
|
|
1550
|
-
type: "disable",
|
|
1551
|
-
getValue: ({ commandLine }) => {
|
|
1552
|
-
if (commandLine[cliFlag22] !== undefined) {
|
|
1553
|
-
const value = commandLine[cliFlag22];
|
|
1554
|
-
if (!hardwareAccelerationOptions.includes(value)) {
|
|
1555
|
-
throw new Error(`Invalid value for --${cliFlag22}: ${value}`);
|
|
1556
|
-
}
|
|
1557
|
-
return {
|
|
1558
|
-
source: "cli",
|
|
1559
|
-
value
|
|
1560
|
-
};
|
|
1561
|
-
}
|
|
1562
|
-
if (currentValue !== null) {
|
|
1563
|
-
return {
|
|
1564
|
-
source: "config",
|
|
1565
|
-
value: currentValue
|
|
1566
|
-
};
|
|
1567
|
-
}
|
|
1568
|
-
return {
|
|
1569
|
-
source: "default",
|
|
1570
|
-
value: "disable"
|
|
1571
|
-
};
|
|
1572
|
-
},
|
|
1573
|
-
setConfig: (value) => {
|
|
1574
|
-
if (!hardwareAccelerationOptions.includes(value)) {
|
|
1575
|
-
throw new Error(`Invalid value for --${cliFlag22}: ${value}`);
|
|
1576
|
-
}
|
|
1577
|
-
currentValue = value;
|
|
1578
|
-
}
|
|
1579
|
-
};
|
|
1580
|
-
|
|
1581
|
-
// src/options/headless.tsx
|
|
1582
|
-
import { jsx as jsx19, jsxs as jsxs15, Fragment as Fragment19 } from "react/jsx-runtime";
|
|
1583
|
-
var DEFAULT4 = true;
|
|
1584
|
-
var headlessMode = DEFAULT4;
|
|
1585
|
-
var cliFlag23 = "disable-headless";
|
|
1586
|
-
var headlessOption = {
|
|
1587
|
-
name: "Disable Headless Mode",
|
|
1588
|
-
cliFlag: cliFlag23,
|
|
1589
|
-
description: () => /* @__PURE__ */ jsxs15(Fragment19, {
|
|
1590
|
-
children: [
|
|
1591
|
-
"Deprecated - will be removed in 5.0.0. With the migration to",
|
|
1592
|
-
" ",
|
|
1593
|
-
/* @__PURE__ */ jsx19("a", {
|
|
1594
|
-
href: "/docs/miscellaneous/chrome-headless-shell",
|
|
1595
|
-
children: "Chrome Headless Shell"
|
|
1596
|
-
}),
|
|
1597
|
-
", this option is not functional anymore.",
|
|
1598
|
-
/* @__PURE__ */ jsx19("br", {}),
|
|
1599
|
-
/* @__PURE__ */ jsx19("br", {}),
|
|
1600
|
-
" If disabled, the render will open an actual Chrome window where you can see the render happen. The default is headless mode."
|
|
1601
|
-
]
|
|
1602
|
-
}),
|
|
1603
|
-
ssrName: "headless",
|
|
1604
|
-
docLink: "https://www.remotion.dev/docs/chromium-flags#--disable-headless",
|
|
1605
|
-
type: false,
|
|
1606
|
-
getValue: ({ commandLine }) => {
|
|
1607
|
-
if (commandLine[cliFlag23] !== undefined) {
|
|
1608
|
-
return {
|
|
1609
|
-
source: "cli",
|
|
1610
|
-
value: !commandLine[cliFlag23]
|
|
1611
|
-
};
|
|
1612
|
-
}
|
|
1613
|
-
if (headlessMode !== DEFAULT4) {
|
|
1614
|
-
return {
|
|
1615
|
-
source: "config",
|
|
1616
|
-
value: headlessMode
|
|
1617
|
-
};
|
|
1618
|
-
}
|
|
1619
|
-
return {
|
|
1620
|
-
source: "default",
|
|
1621
|
-
value: headlessMode
|
|
1622
|
-
};
|
|
1623
|
-
},
|
|
1624
|
-
setConfig: (value) => {
|
|
1625
|
-
headlessMode = value;
|
|
1626
|
-
}
|
|
1627
|
-
};
|
|
1628
|
-
|
|
1629
|
-
// src/options/image-sequence-pattern.tsx
|
|
1630
|
-
import { jsx as jsx20, jsxs as jsxs16, Fragment as Fragment20 } from "react/jsx-runtime";
|
|
1631
|
-
var cliFlag24 = "image-sequence-pattern";
|
|
1632
|
-
var currentImageSequencePattern = null;
|
|
1633
|
-
var imageSequencePatternOption = {
|
|
1634
|
-
name: "Image Sequence Pattern",
|
|
1635
|
-
cliFlag: cliFlag24,
|
|
1636
|
-
ssrName: "imageSequencePattern",
|
|
1637
|
-
description: () => /* @__PURE__ */ jsxs16(Fragment20, {
|
|
1638
|
-
children: [
|
|
1639
|
-
"Pattern for naming image sequence files. Supports ",
|
|
1640
|
-
/* @__PURE__ */ jsx20("code", {
|
|
1641
|
-
children: "[frame]"
|
|
1642
|
-
}),
|
|
1643
|
-
" for the zero-padded frame number and ",
|
|
1644
|
-
/* @__PURE__ */ jsx20("code", {
|
|
1645
|
-
children: "[ext]"
|
|
1646
|
-
}),
|
|
1647
|
-
" for the file extension."
|
|
1648
|
-
]
|
|
1649
|
-
}),
|
|
1650
|
-
docLink: null,
|
|
1651
|
-
type: "string",
|
|
1652
|
-
getValue: ({ commandLine }) => {
|
|
1653
|
-
if (currentImageSequencePattern !== null) {
|
|
1654
|
-
return {
|
|
1655
|
-
value: currentImageSequencePattern,
|
|
1656
|
-
source: "config"
|
|
1657
|
-
};
|
|
1658
|
-
}
|
|
1659
|
-
return {
|
|
1660
|
-
value: commandLine[cliFlag24],
|
|
1661
|
-
source: "cli"
|
|
1662
|
-
};
|
|
1663
|
-
},
|
|
1664
|
-
setConfig: (pattern) => {
|
|
1665
|
-
currentImageSequencePattern = pattern;
|
|
1666
|
-
}
|
|
1667
|
-
};
|
|
1668
|
-
|
|
1669
|
-
// src/options/jpeg-quality.tsx
|
|
1670
|
-
import { jsx as jsx21, Fragment as Fragment21 } from "react/jsx-runtime";
|
|
1671
|
-
var defaultValue = DEFAULT_JPEG_QUALITY;
|
|
1672
|
-
var quality = defaultValue;
|
|
1673
|
-
var setJpegQuality = (q) => {
|
|
1674
|
-
validateJpegQuality(q);
|
|
1675
|
-
if (q === 0 || q === undefined) {
|
|
1676
|
-
quality = defaultValue;
|
|
1677
|
-
return;
|
|
1678
|
-
}
|
|
1679
|
-
quality = q;
|
|
1680
|
-
};
|
|
1681
|
-
var cliFlag25 = "jpeg-quality";
|
|
1682
|
-
var jpegQualityOption = {
|
|
1683
|
-
name: "JPEG Quality",
|
|
1684
|
-
cliFlag: cliFlag25,
|
|
1685
|
-
description: () => /* @__PURE__ */ jsx21(Fragment21, {
|
|
1686
|
-
children: "Sets the quality of the generated JPEG images. Must be an integer between 0 and 100. Default: 80."
|
|
1687
|
-
}),
|
|
1688
|
-
ssrName: "jpegQuality",
|
|
1689
|
-
docLink: "https://www.remotion.dev/docs/renderer/render-media#jpeg-quality",
|
|
1690
|
-
type: 0,
|
|
1691
|
-
setConfig: setJpegQuality,
|
|
1692
|
-
getValue: ({ commandLine }) => {
|
|
1693
|
-
if (commandLine[cliFlag25] !== undefined) {
|
|
1694
|
-
validateJpegQuality(commandLine[cliFlag25]);
|
|
1695
|
-
return {
|
|
1696
|
-
source: "cli",
|
|
1697
|
-
value: commandLine[cliFlag25]
|
|
1698
|
-
};
|
|
1699
|
-
}
|
|
1700
|
-
if (quality !== defaultValue) {
|
|
1701
|
-
return {
|
|
1702
|
-
source: "config",
|
|
1703
|
-
value: quality
|
|
1704
|
-
};
|
|
1705
|
-
}
|
|
1706
|
-
return {
|
|
1707
|
-
source: "default",
|
|
1708
|
-
value: defaultValue
|
|
1709
|
-
};
|
|
1710
|
-
}
|
|
1711
|
-
};
|
|
1712
|
-
|
|
1713
|
-
// src/options/latency-hint.tsx
|
|
1714
|
-
import { jsx as jsx22, jsxs as jsxs17, Fragment as Fragment22 } from "react/jsx-runtime";
|
|
1715
|
-
var cliFlag26 = "audio-latency-hint";
|
|
1716
|
-
var value = null;
|
|
1717
|
-
var audioLatencyHintOption = {
|
|
1718
|
-
name: "Audio Latency Hint",
|
|
1719
|
-
cliFlag: cliFlag26,
|
|
1720
|
-
description: () => /* @__PURE__ */ jsxs17(Fragment22, {
|
|
1721
|
-
children: [
|
|
1722
|
-
"Sets the",
|
|
1723
|
-
" ",
|
|
1724
|
-
/* @__PURE__ */ jsx22("a", {
|
|
1725
|
-
href: "https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/AudioContext",
|
|
1726
|
-
children: "audio latency"
|
|
1727
|
-
}),
|
|
1728
|
-
" ",
|
|
1729
|
-
"hint for the global ",
|
|
1730
|
-
/* @__PURE__ */ jsx22("code", {
|
|
1731
|
-
children: "AudioContext"
|
|
1732
|
-
}),
|
|
1733
|
-
" context that Remotion uses to play audio.",
|
|
1734
|
-
/* @__PURE__ */ jsx22("br", {}),
|
|
1735
|
-
"Possible values: ",
|
|
1736
|
-
/* @__PURE__ */ jsx22("code", {
|
|
1737
|
-
children: "interactive"
|
|
1738
|
-
}),
|
|
1739
|
-
", ",
|
|
1740
|
-
/* @__PURE__ */ jsx22("code", {
|
|
1741
|
-
children: "balanced"
|
|
1742
|
-
}),
|
|
1743
|
-
",",
|
|
1744
|
-
" ",
|
|
1745
|
-
/* @__PURE__ */ jsx22("code", {
|
|
1746
|
-
children: "playback"
|
|
1747
|
-
})
|
|
1748
|
-
]
|
|
1749
|
-
}),
|
|
1750
|
-
ssrName: "audioLatencyHint",
|
|
1751
|
-
docLink: "https://www.remotion.dev/docs/renderer/render-media",
|
|
1752
|
-
type: "interactive",
|
|
1753
|
-
getValue: ({ commandLine }) => {
|
|
1754
|
-
const val = commandLine[cliFlag26];
|
|
1755
|
-
if (typeof val !== "undefined") {
|
|
1756
|
-
return { value: val, source: "cli" };
|
|
1757
|
-
}
|
|
1758
|
-
if (value !== null) {
|
|
1759
|
-
return { value, source: "config" };
|
|
1760
|
-
}
|
|
1761
|
-
return { value: null, source: "default" };
|
|
1762
|
-
},
|
|
1763
|
-
setConfig: (profile) => {
|
|
1764
|
-
value = profile;
|
|
1765
|
-
}
|
|
1766
|
-
};
|
|
1767
|
-
|
|
1768
|
-
// src/options/log-level.tsx
|
|
1769
|
-
import { jsx as jsx23, jsxs as jsxs18, Fragment as Fragment23 } from "react/jsx-runtime";
|
|
1770
|
-
var logLevel = "info";
|
|
1771
|
-
var cliFlag27 = "log";
|
|
1772
|
-
var logLevelOption = {
|
|
1773
|
-
cliFlag: cliFlag27,
|
|
1774
|
-
name: "Log Level",
|
|
1775
|
-
ssrName: "logLevel",
|
|
1776
|
-
description: () => /* @__PURE__ */ jsxs18(Fragment23, {
|
|
1777
|
-
children: [
|
|
1778
|
-
"One of ",
|
|
1779
|
-
/* @__PURE__ */ jsx23("code", {
|
|
1780
|
-
children: "trace"
|
|
1781
|
-
}),
|
|
1782
|
-
", ",
|
|
1783
|
-
/* @__PURE__ */ jsx23("code", {
|
|
1784
|
-
children: "verbose"
|
|
1785
|
-
}),
|
|
1786
|
-
", ",
|
|
1787
|
-
/* @__PURE__ */ jsx23("code", {
|
|
1788
|
-
children: "info"
|
|
1789
|
-
}),
|
|
1790
|
-
",",
|
|
1791
|
-
" ",
|
|
1792
|
-
/* @__PURE__ */ jsx23("code", {
|
|
1793
|
-
children: "warn"
|
|
1794
|
-
}),
|
|
1795
|
-
", ",
|
|
1796
|
-
/* @__PURE__ */ jsx23("code", {
|
|
1797
|
-
children: "error"
|
|
1798
|
-
}),
|
|
1799
|
-
".",
|
|
1800
|
-
/* @__PURE__ */ jsx23("br", {}),
|
|
1801
|
-
" Determines how much info is being logged to the console.",
|
|
1802
|
-
/* @__PURE__ */ jsx23("br", {}),
|
|
1803
|
-
/* @__PURE__ */ jsx23("br", {}),
|
|
1804
|
-
" Default ",
|
|
1805
|
-
/* @__PURE__ */ jsx23("code", {
|
|
1806
|
-
children: "info"
|
|
1807
|
-
}),
|
|
1808
|
-
"."
|
|
1809
|
-
]
|
|
1810
|
-
}),
|
|
1811
|
-
docLink: "https://www.remotion.dev/docs/troubleshooting/debug-failed-render",
|
|
1812
|
-
getValue: ({ commandLine }) => {
|
|
1813
|
-
if (commandLine[cliFlag27]) {
|
|
1814
|
-
if (!isValidLogLevel(commandLine[cliFlag27])) {
|
|
1815
|
-
throw new Error(`Invalid \`--log\` value passed. Accepted values: ${logLevels.map((l) => `'${l}'`).join(", ")}.`);
|
|
1816
|
-
}
|
|
1817
|
-
return { value: commandLine[cliFlag27], source: "cli" };
|
|
1818
|
-
}
|
|
1819
|
-
if (logLevel !== "info") {
|
|
1820
|
-
return { value: logLevel, source: "config" };
|
|
1821
|
-
}
|
|
1822
|
-
return { value: "info", source: "default" };
|
|
1823
|
-
},
|
|
1824
|
-
setConfig: (newLogLevel) => {
|
|
1825
|
-
logLevel = newLogLevel;
|
|
1826
|
-
},
|
|
1827
|
-
type: "error"
|
|
1828
|
-
};
|
|
1829
|
-
|
|
1830
|
-
// src/options/metadata.tsx
|
|
1831
|
-
import { jsx as jsx24, jsxs as jsxs19, Fragment as Fragment24 } from "react/jsx-runtime";
|
|
1832
|
-
var metadata = {};
|
|
1833
|
-
var cliFlag28 = "metadata";
|
|
1834
|
-
var metadataOption = {
|
|
1835
|
-
name: "Metadata",
|
|
1836
|
-
cliFlag: cliFlag28,
|
|
1837
|
-
description: (mode) => {
|
|
1838
|
-
if (mode === "ssr") {
|
|
1839
|
-
return /* @__PURE__ */ jsxs19(Fragment24, {
|
|
1840
|
-
children: [
|
|
1841
|
-
"An object containing metadata to be embedded in the video. See",
|
|
1842
|
-
" ",
|
|
1843
|
-
/* @__PURE__ */ jsx24("a", {
|
|
1844
|
-
href: "/docs/metadata",
|
|
1845
|
-
children: "here"
|
|
1846
|
-
}),
|
|
1847
|
-
" for which metadata is accepted."
|
|
1848
|
-
]
|
|
1849
|
-
});
|
|
1850
|
-
}
|
|
1851
|
-
return /* @__PURE__ */ jsxs19(Fragment24, {
|
|
1852
|
-
children: [
|
|
1853
|
-
"Metadata to be embedded in the video. See",
|
|
1854
|
-
" ",
|
|
1855
|
-
/* @__PURE__ */ jsx24("a", {
|
|
1856
|
-
href: "/docs/metadata",
|
|
1857
|
-
children: "here"
|
|
1858
|
-
}),
|
|
1859
|
-
" for which metadata is accepted.",
|
|
1860
|
-
/* @__PURE__ */ jsx24("br", {}),
|
|
1861
|
-
"The parameter must be in the format of ",
|
|
1862
|
-
/* @__PURE__ */ jsx24("code", {
|
|
1863
|
-
children: "--metadata key=value"
|
|
1864
|
-
}),
|
|
1865
|
-
" ",
|
|
1866
|
-
"and can be passed multiple times."
|
|
1867
|
-
]
|
|
1868
|
-
});
|
|
1869
|
-
},
|
|
1870
|
-
docLink: "https://www.remotion.dev/docs/metadata",
|
|
1871
|
-
type: {},
|
|
1872
|
-
getValue: ({ commandLine }) => {
|
|
1873
|
-
if (commandLine[cliFlag28] !== undefined) {
|
|
1874
|
-
const val = commandLine[cliFlag28];
|
|
1875
|
-
const array = typeof val === "string" ? [val] : val;
|
|
1876
|
-
const keyValues = array.map((a) => {
|
|
1877
|
-
if (!a.includes("=")) {
|
|
1878
|
-
throw new Error(`"metadata" must be in the format of key=value, but got ${a}`);
|
|
1879
|
-
}
|
|
1880
|
-
const splitted = a.split("=");
|
|
1881
|
-
if (splitted.length !== 2) {
|
|
1882
|
-
throw new Error(`"metadata" must be in the format of key=value, but got ${a}`);
|
|
1883
|
-
}
|
|
1884
|
-
return [splitted[0], splitted[1]];
|
|
1885
|
-
});
|
|
1886
|
-
const value2 = Object.fromEntries(keyValues);
|
|
1887
|
-
return {
|
|
1888
|
-
source: "config",
|
|
1889
|
-
value: value2
|
|
1890
|
-
};
|
|
1891
|
-
}
|
|
1892
|
-
return {
|
|
1893
|
-
source: "config",
|
|
1894
|
-
value: metadata
|
|
1895
|
-
};
|
|
1896
|
-
},
|
|
1897
|
-
setConfig: (newMetadata) => {
|
|
1898
|
-
metadata = newMetadata;
|
|
1899
|
-
},
|
|
1900
|
-
ssrName: "metadata"
|
|
1901
|
-
};
|
|
1902
|
-
|
|
1903
|
-
// src/options/mute.tsx
|
|
1904
|
-
import { jsx as jsx25, Fragment as Fragment25 } from "react/jsx-runtime";
|
|
1905
|
-
var DEFAULT_MUTED_STATE = false;
|
|
1906
|
-
var mutedState = DEFAULT_MUTED_STATE;
|
|
1907
|
-
var cliFlag29 = "muted";
|
|
1908
|
-
var mutedOption = {
|
|
1909
|
-
name: "Muted",
|
|
1910
|
-
cliFlag: cliFlag29,
|
|
1911
|
-
description: () => /* @__PURE__ */ jsx25(Fragment25, {
|
|
1912
|
-
children: "The Audio of the video will be omitted."
|
|
1913
|
-
}),
|
|
1914
|
-
ssrName: "muted",
|
|
1915
|
-
docLink: "https://www.remotion.dev/docs/audio/muting",
|
|
1916
|
-
type: false,
|
|
1917
|
-
getValue: ({ commandLine }) => {
|
|
1918
|
-
if (commandLine[cliFlag29] !== null) {
|
|
1919
|
-
return {
|
|
1920
|
-
source: "cli",
|
|
1921
|
-
value: commandLine[cliFlag29]
|
|
1922
|
-
};
|
|
1923
|
-
}
|
|
1924
|
-
if (mutedState !== DEFAULT_MUTED_STATE) {
|
|
1925
|
-
return {
|
|
1926
|
-
source: "config",
|
|
1927
|
-
value: mutedState
|
|
1928
|
-
};
|
|
1929
|
-
}
|
|
1930
|
-
return {
|
|
1931
|
-
source: "config",
|
|
1932
|
-
value: mutedState
|
|
1933
|
-
};
|
|
1934
|
-
},
|
|
1935
|
-
setConfig: () => {
|
|
1936
|
-
mutedState = true;
|
|
1937
|
-
}
|
|
1938
|
-
};
|
|
1939
|
-
|
|
1940
|
-
// src/options/number-of-gif-loops.tsx
|
|
1941
|
-
import { jsx as jsx26, jsxs as jsxs20, Fragment as Fragment26 } from "react/jsx-runtime";
|
|
1942
|
-
var currentLoop = null;
|
|
1943
|
-
var validate = (newLoop) => {
|
|
1944
|
-
if (newLoop !== null && typeof newLoop !== "number") {
|
|
1945
|
-
throw new Error("--number-of-gif-loops flag must be a number.");
|
|
1946
|
-
}
|
|
1947
|
-
};
|
|
1948
|
-
var cliFlag30 = "number-of-gif-loops";
|
|
1949
|
-
var numberOfGifLoopsOption = {
|
|
1950
|
-
name: "Number of GIF loops",
|
|
1951
|
-
cliFlag: cliFlag30,
|
|
1952
|
-
description: () => {
|
|
1953
|
-
return /* @__PURE__ */ jsxs20(Fragment26, {
|
|
1954
|
-
children: [
|
|
1955
|
-
"Allows you to set the number of loops as follows:",
|
|
1956
|
-
/* @__PURE__ */ jsxs20("ul", {
|
|
1957
|
-
children: [
|
|
1958
|
-
/* @__PURE__ */ jsxs20("li", {
|
|
1959
|
-
children: [
|
|
1960
|
-
/* @__PURE__ */ jsx26("code", {
|
|
1961
|
-
children: "null"
|
|
1962
|
-
}),
|
|
1963
|
-
" (or omitting in the CLI) plays the GIF indefinitely."
|
|
1964
|
-
]
|
|
1965
|
-
}),
|
|
1966
|
-
/* @__PURE__ */ jsxs20("li", {
|
|
1967
|
-
children: [
|
|
1968
|
-
/* @__PURE__ */ jsx26("code", {
|
|
1969
|
-
children: "0"
|
|
1970
|
-
}),
|
|
1971
|
-
" disables looping"
|
|
1972
|
-
]
|
|
1973
|
-
}),
|
|
1974
|
-
/* @__PURE__ */ jsxs20("li", {
|
|
1975
|
-
children: [
|
|
1976
|
-
/* @__PURE__ */ jsx26("code", {
|
|
1977
|
-
children: "1"
|
|
1978
|
-
}),
|
|
1979
|
-
" loops the GIF once (plays twice in total)"
|
|
1980
|
-
]
|
|
1981
|
-
}),
|
|
1982
|
-
/* @__PURE__ */ jsxs20("li", {
|
|
1983
|
-
children: [
|
|
1984
|
-
/* @__PURE__ */ jsx26("code", {
|
|
1985
|
-
children: "2"
|
|
1986
|
-
}),
|
|
1987
|
-
" loops the GIF twice (plays three times in total) and so on."
|
|
1988
|
-
]
|
|
1989
|
-
})
|
|
1990
|
-
]
|
|
1991
|
-
})
|
|
1992
|
-
]
|
|
1993
|
-
});
|
|
1994
|
-
},
|
|
1995
|
-
ssrName: "numberOfGifLoops",
|
|
1996
|
-
docLink: "https://www.remotion.dev/docs/render-as-gif#changing-the-number-of-loops",
|
|
1997
|
-
type: 0,
|
|
1998
|
-
getValue: ({ commandLine }) => {
|
|
1999
|
-
if (commandLine[cliFlag30] !== undefined) {
|
|
2000
|
-
validate(commandLine[cliFlag30]);
|
|
2001
|
-
return {
|
|
2002
|
-
value: commandLine[cliFlag30],
|
|
2003
|
-
source: "cli"
|
|
2004
|
-
};
|
|
2005
|
-
}
|
|
2006
|
-
if (currentLoop !== null) {
|
|
2007
|
-
return {
|
|
2008
|
-
value: currentLoop,
|
|
2009
|
-
source: "config"
|
|
2010
|
-
};
|
|
2011
|
-
}
|
|
2012
|
-
return {
|
|
2013
|
-
value: null,
|
|
2014
|
-
source: "default"
|
|
2015
|
-
};
|
|
2016
|
-
},
|
|
2017
|
-
setConfig: (newLoop) => {
|
|
2018
|
-
validate(newLoop);
|
|
2019
|
-
currentLoop = newLoop;
|
|
2020
|
-
}
|
|
2021
|
-
};
|
|
2022
|
-
|
|
2023
|
-
// src/options/offthreadvideo-cache-size.tsx
|
|
2024
|
-
import { jsx as jsx27, jsxs as jsxs21, Fragment as Fragment27 } from "react/jsx-runtime";
|
|
2025
|
-
var offthreadVideoCacheSizeInBytes = null;
|
|
2026
|
-
var cliFlag31 = "offthreadvideo-cache-size-in-bytes";
|
|
2027
|
-
var offthreadVideoCacheSizeInBytesOption = {
|
|
2028
|
-
name: "OffthreadVideo cache size",
|
|
2029
|
-
cliFlag: cliFlag31,
|
|
2030
|
-
description: () => /* @__PURE__ */ jsxs21(Fragment27, {
|
|
2031
|
-
children: [
|
|
2032
|
-
"From v4.0, Remotion has a cache for",
|
|
2033
|
-
" ",
|
|
2034
|
-
/* @__PURE__ */ jsx27("a", {
|
|
2035
|
-
href: "https://remotion.dev/docs/offthreadvideo",
|
|
2036
|
-
children: /* @__PURE__ */ jsx27("code", {
|
|
2037
|
-
children: "<OffthreadVideo>"
|
|
2038
|
-
})
|
|
2039
|
-
}),
|
|
2040
|
-
" ",
|
|
2041
|
-
"frames. The default is ",
|
|
2042
|
-
/* @__PURE__ */ jsx27("code", {
|
|
2043
|
-
children: "null"
|
|
2044
|
-
}),
|
|
2045
|
-
", corresponding to half of the system memory available when the render starts.",
|
|
2046
|
-
/* @__PURE__ */ jsx27("br", {}),
|
|
2047
|
-
" This option allows to override the size of the cache. The higher it is, the faster the render will be, but the more memory will be used.",
|
|
2048
|
-
/* @__PURE__ */ jsx27("br", {}),
|
|
2049
|
-
"The used value will be printed when running in verbose mode.",
|
|
2050
|
-
/* @__PURE__ */ jsx27("br", {}),
|
|
2051
|
-
"Default: ",
|
|
2052
|
-
/* @__PURE__ */ jsx27("code", {
|
|
2053
|
-
children: "null"
|
|
2054
|
-
})
|
|
2055
|
-
]
|
|
2056
|
-
}),
|
|
2057
|
-
ssrName: "offthreadVideoCacheSizeInBytes",
|
|
2058
|
-
docLink: "https://www.remotion.dev/docs/offthreadvideo",
|
|
2059
|
-
type: 0,
|
|
2060
|
-
getValue: ({ commandLine }) => {
|
|
2061
|
-
if (commandLine[cliFlag31] !== undefined) {
|
|
2062
|
-
return {
|
|
2063
|
-
source: "cli",
|
|
2064
|
-
value: commandLine[cliFlag31]
|
|
2065
|
-
};
|
|
2066
|
-
}
|
|
2067
|
-
if (offthreadVideoCacheSizeInBytes !== null) {
|
|
2068
|
-
return {
|
|
2069
|
-
source: "config",
|
|
2070
|
-
value: offthreadVideoCacheSizeInBytes
|
|
2071
|
-
};
|
|
2072
|
-
}
|
|
2073
|
-
return {
|
|
2074
|
-
source: "default",
|
|
2075
|
-
value: null
|
|
2076
|
-
};
|
|
2077
|
-
},
|
|
2078
|
-
setConfig: (size) => {
|
|
2079
|
-
offthreadVideoCacheSizeInBytes = size ?? null;
|
|
2080
|
-
}
|
|
2081
|
-
};
|
|
2082
|
-
|
|
2083
|
-
// src/options/offthreadvideo-threads.tsx
|
|
2084
|
-
import { jsx as jsx28, jsxs as jsxs22, Fragment as Fragment28 } from "react/jsx-runtime";
|
|
2085
|
-
var value2 = null;
|
|
2086
|
-
var cliFlag32 = "offthreadvideo-video-threads";
|
|
2087
|
-
var offthreadVideoThreadsOption = {
|
|
2088
|
-
name: "OffthreadVideo threads",
|
|
2089
|
-
cliFlag: cliFlag32,
|
|
2090
|
-
description: () => /* @__PURE__ */ jsxs22(Fragment28, {
|
|
2091
|
-
children: [
|
|
2092
|
-
"The number of threads that",
|
|
2093
|
-
/* @__PURE__ */ jsx28("a", {
|
|
2094
|
-
href: "https://remotion.dev/docs/offthreadvideo",
|
|
2095
|
-
children: /* @__PURE__ */ jsx28("code", {
|
|
2096
|
-
children: "<OffthreadVideo>"
|
|
2097
|
-
})
|
|
2098
|
-
}),
|
|
2099
|
-
" ",
|
|
2100
|
-
"can start to extract frames. The default is",
|
|
2101
|
-
" ",
|
|
2102
|
-
DEFAULT_RENDER_FRAMES_OFFTHREAD_VIDEO_THREADS,
|
|
2103
|
-
". Increase carefully, as too many threads may cause instability."
|
|
2104
|
-
]
|
|
2105
|
-
}),
|
|
2106
|
-
ssrName: "offthreadVideoThreads",
|
|
2107
|
-
docLink: "https://www.remotion.dev/docs/offthreadvideo",
|
|
2108
|
-
type: 0,
|
|
2109
|
-
getValue: ({ commandLine }) => {
|
|
2110
|
-
if (commandLine[cliFlag32] !== undefined) {
|
|
2111
|
-
return {
|
|
2112
|
-
source: "cli",
|
|
2113
|
-
value: commandLine[cliFlag32]
|
|
2114
|
-
};
|
|
2115
|
-
}
|
|
2116
|
-
if (value2 !== null) {
|
|
2117
|
-
return {
|
|
2118
|
-
source: "config",
|
|
2119
|
-
value: value2
|
|
2120
|
-
};
|
|
2121
|
-
}
|
|
2122
|
-
return {
|
|
2123
|
-
source: "default",
|
|
2124
|
-
value: null
|
|
2125
|
-
};
|
|
2126
|
-
},
|
|
2127
|
-
setConfig: (size) => {
|
|
2128
|
-
value2 = size ?? null;
|
|
2129
|
-
}
|
|
2130
|
-
};
|
|
2131
|
-
var DEFAULT_RENDER_FRAMES_OFFTHREAD_VIDEO_THREADS = 2;
|
|
2132
|
-
|
|
2133
|
-
// src/options/on-browser-download.tsx
|
|
2134
|
-
import { jsx as jsx29, jsxs as jsxs23, Fragment as Fragment29 } from "react/jsx-runtime";
|
|
2135
|
-
var cliFlag33 = "on-browser-download";
|
|
2136
|
-
var onBrowserDownloadOption = {
|
|
2137
|
-
name: "Browser download callback function",
|
|
2138
|
-
cliFlag: cliFlag33,
|
|
2139
|
-
description: () => /* @__PURE__ */ jsxs23(Fragment29, {
|
|
2140
|
-
children: [
|
|
2141
|
-
"Gets called when no compatible local browser is detected on the system and this API needs to download a browser. Return a callback to observe progress.",
|
|
2142
|
-
" ",
|
|
2143
|
-
/* @__PURE__ */ jsx29("a", {
|
|
2144
|
-
href: "/docs/renderer/ensure-browser#onbrowserdownload",
|
|
2145
|
-
children: "See here for how to use this option."
|
|
2146
|
-
})
|
|
2147
|
-
]
|
|
2148
|
-
}),
|
|
2149
|
-
ssrName: "onBrowserDownload",
|
|
2150
|
-
docLink: "https://www.remotion.dev/docs/renderer/ensure-browser",
|
|
2151
|
-
type: undefined,
|
|
2152
|
-
getValue: () => {
|
|
2153
|
-
throw new Error("does not support config file");
|
|
2154
|
-
},
|
|
2155
|
-
setConfig: () => {
|
|
2156
|
-
throw new Error("does not support config file");
|
|
2157
|
-
}
|
|
2158
|
-
};
|
|
2159
|
-
|
|
2160
|
-
// src/options/overwrite.tsx
|
|
2161
|
-
import { jsx as jsx30, jsxs as jsxs24, Fragment as Fragment30 } from "react/jsx-runtime";
|
|
2162
|
-
var shouldOverwrite = null;
|
|
2163
|
-
var cliFlag34 = "overwrite";
|
|
2164
|
-
var validate2 = (value3) => {
|
|
2165
|
-
if (typeof value3 !== "boolean") {
|
|
2166
|
-
throw new Error(`overwriteExisting must be a boolean but got ${typeof value3} (${value3})`);
|
|
2167
|
-
}
|
|
2168
|
-
};
|
|
2169
|
-
var overwriteOption = {
|
|
2170
|
-
name: "Overwrite output",
|
|
2171
|
-
cliFlag: cliFlag34,
|
|
2172
|
-
description: () => /* @__PURE__ */ jsxs24(Fragment30, {
|
|
2173
|
-
children: [
|
|
2174
|
-
"If set to ",
|
|
2175
|
-
/* @__PURE__ */ jsx30("code", {
|
|
2176
|
-
children: "false"
|
|
2177
|
-
}),
|
|
2178
|
-
", will prevent rendering to a path that already exists. Default is ",
|
|
2179
|
-
/* @__PURE__ */ jsx30("code", {
|
|
2180
|
-
children: "true"
|
|
2181
|
-
}),
|
|
2182
|
-
"."
|
|
2183
|
-
]
|
|
2184
|
-
}),
|
|
2185
|
-
ssrName: "overwrite",
|
|
2186
|
-
docLink: "https://www.remotion.dev/docs/config#setoverwriteoutput",
|
|
2187
|
-
type: false,
|
|
2188
|
-
getValue: ({ commandLine }, defaultValue2) => {
|
|
2189
|
-
if (commandLine[cliFlag34] !== undefined) {
|
|
2190
|
-
validate2(commandLine[cliFlag34]);
|
|
2191
|
-
return {
|
|
2192
|
-
source: "cli",
|
|
2193
|
-
value: commandLine[cliFlag34]
|
|
2194
|
-
};
|
|
2195
|
-
}
|
|
2196
|
-
if (shouldOverwrite !== null) {
|
|
2197
|
-
return {
|
|
2198
|
-
source: "config",
|
|
2199
|
-
value: shouldOverwrite
|
|
2200
|
-
};
|
|
2201
|
-
}
|
|
2202
|
-
return {
|
|
2203
|
-
source: "default",
|
|
2204
|
-
value: defaultValue2
|
|
2205
|
-
};
|
|
2206
|
-
},
|
|
2207
|
-
setConfig: (value3) => {
|
|
2208
|
-
validate2(value3);
|
|
2209
|
-
shouldOverwrite = value3;
|
|
2210
|
-
}
|
|
2211
|
-
};
|
|
2212
|
-
|
|
2213
|
-
// src/options/prefer-lossless.tsx
|
|
2214
|
-
import { jsx as jsx31, jsxs as jsxs25, Fragment as Fragment31 } from "react/jsx-runtime";
|
|
2215
|
-
var cliFlag35 = "prefer-lossless";
|
|
2216
|
-
var input = false;
|
|
2217
|
-
var preferLosslessAudioOption = {
|
|
2218
|
-
name: "Prefer lossless",
|
|
2219
|
-
cliFlag: cliFlag35,
|
|
2220
|
-
description: () => /* @__PURE__ */ jsxs25(Fragment31, {
|
|
2221
|
-
children: [
|
|
2222
|
-
"Uses a lossless audio codec, if one is available for the codec. If you set",
|
|
2223
|
-
/* @__PURE__ */ jsx31("code", {
|
|
2224
|
-
children: "audioCodec"
|
|
2225
|
-
}),
|
|
2226
|
-
", it takes priority over",
|
|
2227
|
-
" ",
|
|
2228
|
-
/* @__PURE__ */ jsx31("code", {
|
|
2229
|
-
children: "preferLossless"
|
|
2230
|
-
}),
|
|
2231
|
-
"."
|
|
2232
|
-
]
|
|
2233
|
-
}),
|
|
2234
|
-
docLink: "https://www.remotion.dev/docs/encoding",
|
|
2235
|
-
type: false,
|
|
2236
|
-
ssrName: "preferLossless",
|
|
2237
|
-
getValue: ({ commandLine }) => {
|
|
2238
|
-
if (commandLine[cliFlag35]) {
|
|
2239
|
-
return { value: true, source: "cli" };
|
|
2240
|
-
}
|
|
2241
|
-
if (input === true) {
|
|
2242
|
-
return { value: true, source: "config" };
|
|
2243
|
-
}
|
|
2244
|
-
return { value: false, source: "default" };
|
|
2245
|
-
},
|
|
2246
|
-
setConfig: (val) => {
|
|
2247
|
-
input = val;
|
|
2248
|
-
}
|
|
2249
|
-
};
|
|
2250
|
-
|
|
2251
|
-
// src/options/public-dir.tsx
|
|
2252
|
-
import { jsx as jsx32, jsxs as jsxs26, Fragment as Fragment32 } from "react/jsx-runtime";
|
|
2253
|
-
var cliFlag36 = "public-dir";
|
|
2254
|
-
var currentPublicDir = null;
|
|
2255
|
-
var publicDirOption = {
|
|
2256
|
-
name: "Public Directory",
|
|
2257
|
-
cliFlag: cliFlag36,
|
|
2258
|
-
description: () => {
|
|
2259
|
-
return /* @__PURE__ */ jsxs26(Fragment32, {
|
|
2260
|
-
children: [
|
|
2261
|
-
"Define the location of the",
|
|
2262
|
-
" ",
|
|
2263
|
-
/* @__PURE__ */ jsx32("a", {
|
|
2264
|
-
href: "/docs/terminology/public-dir",
|
|
2265
|
-
children: /* @__PURE__ */ jsx32("code", {
|
|
2266
|
-
children: "public/ directory"
|
|
2267
|
-
})
|
|
2268
|
-
}),
|
|
2269
|
-
". If not defined, Remotion will assume the location is the `public` folder in your Remotion root."
|
|
2270
|
-
]
|
|
2271
|
-
});
|
|
2272
|
-
},
|
|
2273
|
-
ssrName: "publicDir",
|
|
2274
|
-
docLink: "https://www.remotion.dev/docs/terminology/public-dir",
|
|
2275
|
-
getValue: ({ commandLine }) => {
|
|
2276
|
-
if (commandLine[cliFlag36] !== undefined) {
|
|
2277
|
-
return {
|
|
2278
|
-
source: "cli",
|
|
2279
|
-
value: commandLine[cliFlag36]
|
|
2280
|
-
};
|
|
2281
|
-
}
|
|
2282
|
-
if (currentPublicDir !== null) {
|
|
2283
|
-
return {
|
|
2284
|
-
source: "config",
|
|
2285
|
-
value: currentPublicDir
|
|
2286
|
-
};
|
|
2287
|
-
}
|
|
2288
|
-
return {
|
|
2289
|
-
source: "default",
|
|
2290
|
-
value: null
|
|
2291
|
-
};
|
|
2292
|
-
},
|
|
2293
|
-
setConfig: (value3) => {
|
|
2294
|
-
currentPublicDir = value3;
|
|
2295
|
-
},
|
|
2296
|
-
type: ""
|
|
2297
|
-
};
|
|
2298
|
-
|
|
2299
|
-
// src/options/public-path.tsx
|
|
2300
|
-
import { jsx as jsx33, jsxs as jsxs27, Fragment as Fragment33 } from "react/jsx-runtime";
|
|
2301
|
-
var cliFlag37 = "public-path";
|
|
2302
|
-
var currentPublicPath = null;
|
|
2303
|
-
var publicPathOption = {
|
|
2304
|
-
name: "Public Path",
|
|
2305
|
-
cliFlag: cliFlag37,
|
|
2306
|
-
description: () => {
|
|
2307
|
-
return /* @__PURE__ */ jsxs27(Fragment33, {
|
|
2308
|
-
children: [
|
|
2309
|
-
"The path of the URL where the bundle is going to be hosted. By default it is ",
|
|
2310
|
-
/* @__PURE__ */ jsx33("code", {
|
|
2311
|
-
children: "/"
|
|
2312
|
-
}),
|
|
2313
|
-
", meaning that the bundle is going to be hosted at the root of the domain (e.g. ",
|
|
2314
|
-
/* @__PURE__ */ jsx33("code", {
|
|
2315
|
-
children: "https://localhost:3000/"
|
|
2316
|
-
}),
|
|
2317
|
-
"). If you are deploying to a subdirectory (e.g. ",
|
|
2318
|
-
/* @__PURE__ */ jsx33("code", {
|
|
2319
|
-
children: "/sites/my-site/"
|
|
2320
|
-
}),
|
|
2321
|
-
"), you should set this to the subdirectory."
|
|
2322
|
-
]
|
|
2323
|
-
});
|
|
2324
|
-
},
|
|
2325
|
-
ssrName: "publicPath",
|
|
2326
|
-
docLink: "https://www.remotion.dev/docs/renderer",
|
|
2327
|
-
getValue: ({ commandLine }) => {
|
|
2328
|
-
if (commandLine[cliFlag37] !== undefined) {
|
|
2329
|
-
return {
|
|
2330
|
-
source: "cli",
|
|
2331
|
-
value: commandLine[cliFlag37]
|
|
2332
|
-
};
|
|
2333
|
-
}
|
|
2334
|
-
if (currentPublicPath !== null) {
|
|
2335
|
-
return {
|
|
2336
|
-
source: "config",
|
|
2337
|
-
value: currentPublicPath
|
|
2338
|
-
};
|
|
2339
|
-
}
|
|
2340
|
-
return {
|
|
2341
|
-
source: "default",
|
|
2342
|
-
value: null
|
|
2343
|
-
};
|
|
2344
|
-
},
|
|
2345
|
-
setConfig: (value3) => {
|
|
2346
|
-
currentPublicPath = value3;
|
|
2347
|
-
},
|
|
2348
|
-
type: ""
|
|
2349
|
-
};
|
|
2350
|
-
|
|
2351
|
-
// src/options/repro.tsx
|
|
2352
|
-
import { jsx as jsx34, Fragment as Fragment34 } from "react/jsx-runtime";
|
|
2353
|
-
var enableRepro = false;
|
|
2354
|
-
var setRepro = (should) => {
|
|
2355
|
-
enableRepro = should;
|
|
2356
|
-
};
|
|
2357
|
-
var cliFlag38 = "repro";
|
|
2358
|
-
var reproOption = {
|
|
2359
|
-
name: "Create reproduction",
|
|
2360
|
-
cliFlag: cliFlag38,
|
|
2361
|
-
description: () => /* @__PURE__ */ jsx34(Fragment34, {
|
|
2362
|
-
children: "Create a ZIP that you can submit to Remotion if asked for a reproduction."
|
|
2363
|
-
}),
|
|
2364
|
-
ssrName: "repro",
|
|
2365
|
-
docLink: "https://www.remotion.dev/docs/render-media#repro",
|
|
2366
|
-
type: false,
|
|
2367
|
-
getValue: ({ commandLine }) => {
|
|
2368
|
-
if (commandLine[cliFlag38] !== undefined) {
|
|
2369
|
-
return {
|
|
2370
|
-
value: commandLine[cliFlag38],
|
|
2371
|
-
source: "cli"
|
|
2372
|
-
};
|
|
2373
|
-
}
|
|
2374
|
-
if (enableRepro) {
|
|
2375
|
-
return {
|
|
2376
|
-
value: enableRepro,
|
|
2377
|
-
source: "config"
|
|
2378
|
-
};
|
|
2379
|
-
}
|
|
2380
|
-
return {
|
|
2381
|
-
value: false,
|
|
2382
|
-
source: "default"
|
|
2383
|
-
};
|
|
2384
|
-
},
|
|
2385
|
-
setConfig: setRepro
|
|
2386
|
-
};
|
|
2387
|
-
|
|
2388
|
-
// src/options/scale.tsx
|
|
2389
|
-
import { jsx as jsx35, jsxs as jsxs28, Fragment as Fragment35 } from "react/jsx-runtime";
|
|
2390
|
-
var currentScale = 1;
|
|
2391
|
-
var cliFlag39 = "scale";
|
|
2392
|
-
var validateScale = (value3) => {
|
|
2393
|
-
if (typeof value3 !== "number") {
|
|
2394
|
-
throw new Error("scale must be a number.");
|
|
2395
|
-
}
|
|
2396
|
-
};
|
|
2397
|
-
var scaleOption = {
|
|
2398
|
-
name: "Scale",
|
|
2399
|
-
cliFlag: cliFlag39,
|
|
2400
|
-
description: () => /* @__PURE__ */ jsxs28(Fragment35, {
|
|
2401
|
-
children: [
|
|
2402
|
-
"Scales the output by a factor. For example, a 1280x720px frame will become a 1920x1080px frame with a scale factor of ",
|
|
2403
|
-
/* @__PURE__ */ jsx35("code", {
|
|
2404
|
-
children: "1.5"
|
|
2405
|
-
}),
|
|
2406
|
-
". Vector elements like fonts and HTML markups will be rendered with extra details."
|
|
2407
|
-
]
|
|
2408
|
-
}),
|
|
2409
|
-
ssrName: "scale",
|
|
2410
|
-
docLink: "https://www.remotion.dev/docs/scaling",
|
|
2411
|
-
type: 0,
|
|
2412
|
-
getValue: ({ commandLine }) => {
|
|
2413
|
-
if (commandLine[cliFlag39] !== undefined) {
|
|
2414
|
-
validateScale(commandLine[cliFlag39]);
|
|
2415
|
-
return {
|
|
2416
|
-
source: "cli",
|
|
2417
|
-
value: commandLine[cliFlag39]
|
|
2418
|
-
};
|
|
2419
|
-
}
|
|
2420
|
-
if (currentScale !== null) {
|
|
2421
|
-
return {
|
|
2422
|
-
source: "config",
|
|
2423
|
-
value: currentScale
|
|
2424
|
-
};
|
|
2425
|
-
}
|
|
2426
|
-
return {
|
|
2427
|
-
source: "default",
|
|
2428
|
-
value: 1
|
|
2429
|
-
};
|
|
2430
|
-
},
|
|
2431
|
-
setConfig: (scale) => {
|
|
2432
|
-
currentScale = scale;
|
|
2433
|
-
}
|
|
2434
|
-
};
|
|
2435
|
-
|
|
2436
|
-
// src/options/throw-if-site-exists.tsx
|
|
2437
|
-
var DEFAULT5 = false;
|
|
2438
|
-
var cliFlag40 = "throw-if-site-exists";
|
|
2439
|
-
var throwIfSiteExistsOption = {
|
|
2440
|
-
cliFlag: cliFlag40,
|
|
2441
|
-
description: () => `Prevents accidential update of an existing site. If there are any files in the subfolder where the site should be placed, the function will throw.`,
|
|
2442
|
-
docLink: "https://remotion.dev/docs/lambda/deploy-site",
|
|
2443
|
-
getValue: ({ commandLine }) => {
|
|
2444
|
-
if (commandLine[cliFlag40]) {
|
|
2445
|
-
return {
|
|
2446
|
-
source: "cli",
|
|
2447
|
-
value: commandLine[cliFlag40]
|
|
2448
|
-
};
|
|
2449
|
-
}
|
|
2450
|
-
return {
|
|
2451
|
-
source: "default",
|
|
2452
|
-
value: DEFAULT5
|
|
2453
|
-
};
|
|
2454
|
-
},
|
|
2455
|
-
name: "Throw if site exists",
|
|
2456
|
-
setConfig: () => {
|
|
2457
|
-
throw new Error("Not implemented");
|
|
2458
|
-
},
|
|
2459
|
-
ssrName: "throwIfSiteExists",
|
|
2460
|
-
type: false
|
|
2461
|
-
};
|
|
2462
|
-
|
|
2463
|
-
// src/options/timeout.tsx
|
|
2464
|
-
import { jsx as jsx36, jsxs as jsxs29, Fragment as Fragment36 } from "react/jsx-runtime";
|
|
2465
|
-
var currentTimeout = DEFAULT_TIMEOUT;
|
|
2466
|
-
var validate3 = (value3) => {
|
|
2467
|
-
if (typeof value3 !== "number") {
|
|
2468
|
-
throw new Error("--timeout flag / setDelayRenderTimeoutInMilliseconds() must be a number, but got " + JSON.stringify(value3));
|
|
2469
|
-
}
|
|
2470
|
-
};
|
|
2471
|
-
var cliFlag41 = "timeout";
|
|
2472
|
-
var delayRenderTimeoutInMillisecondsOption = {
|
|
2473
|
-
name: "delayRender() timeout",
|
|
2474
|
-
cliFlag: cliFlag41,
|
|
2475
|
-
description: () => /* @__PURE__ */ jsxs29(Fragment36, {
|
|
2476
|
-
children: [
|
|
2477
|
-
"A number describing how long the render may take to resolve all",
|
|
2478
|
-
" ",
|
|
2479
|
-
/* @__PURE__ */ jsx36("a", {
|
|
2480
|
-
href: "https://remotion.dev/docs/delay-render",
|
|
2481
|
-
children: /* @__PURE__ */ jsx36("code", {
|
|
2482
|
-
children: "delayRender()"
|
|
2483
|
-
})
|
|
2484
|
-
}),
|
|
2485
|
-
" ",
|
|
2486
|
-
"calls ",
|
|
2487
|
-
/* @__PURE__ */ jsx36("a", {
|
|
2488
|
-
href: "https://remotion.dev/docs/timeout",
|
|
2489
|
-
children: "before it times out"
|
|
2490
|
-
}),
|
|
2491
|
-
". Default: ",
|
|
2492
|
-
/* @__PURE__ */ jsx36("code", {
|
|
2493
|
-
children: "30000"
|
|
2494
|
-
})
|
|
2495
|
-
]
|
|
2496
|
-
}),
|
|
2497
|
-
ssrName: "timeoutInMilliseconds",
|
|
2498
|
-
docLink: "https://www.remotion.dev/docs/timeout",
|
|
2499
|
-
type: 0,
|
|
2500
|
-
getValue: ({ commandLine }) => {
|
|
2501
|
-
if (commandLine[cliFlag41] !== undefined) {
|
|
2502
|
-
return {
|
|
2503
|
-
source: "cli",
|
|
2504
|
-
value: commandLine[cliFlag41]
|
|
2505
|
-
};
|
|
2506
|
-
}
|
|
2507
|
-
if (currentTimeout !== null) {
|
|
2508
|
-
validate3(currentTimeout);
|
|
2509
|
-
return {
|
|
2510
|
-
source: "config",
|
|
2511
|
-
value: currentTimeout
|
|
2512
|
-
};
|
|
2513
|
-
}
|
|
2514
|
-
return {
|
|
2515
|
-
source: "default",
|
|
2516
|
-
value: DEFAULT_TIMEOUT
|
|
2517
|
-
};
|
|
2518
|
-
},
|
|
2519
|
-
setConfig: (value3) => {
|
|
2520
|
-
validate3(value3);
|
|
2521
|
-
currentTimeout = value3;
|
|
2522
|
-
}
|
|
2523
|
-
};
|
|
2524
|
-
|
|
2525
|
-
// src/options/video-bitrate.tsx
|
|
2526
|
-
import { jsx as jsx37, jsxs as jsxs30, Fragment as Fragment37 } from "react/jsx-runtime";
|
|
2527
|
-
var videoBitrate = null;
|
|
2528
|
-
var cliFlag42 = "video-bitrate";
|
|
2529
|
-
var videoBitrateOption = {
|
|
2530
|
-
name: "Video Bitrate",
|
|
2531
|
-
cliFlag: cliFlag42,
|
|
2532
|
-
description: () => /* @__PURE__ */ jsxs30(Fragment37, {
|
|
2533
|
-
children: [
|
|
2534
|
-
"Specify the target bitrate for the generated video. The syntax for FFmpeg",
|
|
2535
|
-
"'",
|
|
2536
|
-
"s",
|
|
2537
|
-
/* @__PURE__ */ jsx37("code", {
|
|
2538
|
-
children: "-b:v"
|
|
2539
|
-
}),
|
|
2540
|
-
" parameter should be used. FFmpeg may encode the video in a way that will not result in the exact video bitrate specified. Example values: ",
|
|
2541
|
-
/* @__PURE__ */ jsx37("code", {
|
|
2542
|
-
children: "512K"
|
|
2543
|
-
}),
|
|
2544
|
-
" for 512 kbps, ",
|
|
2545
|
-
/* @__PURE__ */ jsx37("code", {
|
|
2546
|
-
children: "1M"
|
|
2547
|
-
}),
|
|
2548
|
-
" for 1 Mbps."
|
|
2549
|
-
]
|
|
2550
|
-
}),
|
|
2551
|
-
ssrName: "videoBitrate",
|
|
2552
|
-
docLink: "https://www.remotion.dev/docs/renderer/render-media#videobitrate",
|
|
2553
|
-
type: "",
|
|
2554
|
-
getValue: ({ commandLine }) => {
|
|
2555
|
-
if (commandLine[cliFlag42] !== undefined) {
|
|
2556
|
-
return {
|
|
2557
|
-
source: "cli",
|
|
2558
|
-
value: commandLine[cliFlag42]
|
|
2559
|
-
};
|
|
2560
|
-
}
|
|
2561
|
-
if (videoBitrate !== null) {
|
|
2562
|
-
return {
|
|
2563
|
-
source: "config",
|
|
2564
|
-
value: videoBitrate
|
|
2565
|
-
};
|
|
2566
|
-
}
|
|
2567
|
-
return {
|
|
2568
|
-
source: "default",
|
|
2569
|
-
value: null
|
|
2570
|
-
};
|
|
2571
|
-
},
|
|
2572
|
-
setConfig: (bitrate) => {
|
|
2573
|
-
videoBitrate = bitrate;
|
|
2574
|
-
}
|
|
2575
|
-
};
|
|
2576
|
-
|
|
2577
|
-
// src/options/video-cache-size.tsx
|
|
2578
|
-
import { jsx as jsx38, jsxs as jsxs31, Fragment as Fragment38 } from "react/jsx-runtime";
|
|
2579
|
-
var mediaCacheSizeInBytes = null;
|
|
2580
|
-
var cliFlag43 = "media-cache-size-in-bytes";
|
|
2581
|
-
var mediaCacheSizeInBytesOption = {
|
|
2582
|
-
name: "@remotion/media cache size",
|
|
2583
|
-
cliFlag: cliFlag43,
|
|
2584
|
-
description: () => /* @__PURE__ */ jsxs31(Fragment38, {
|
|
2585
|
-
children: [
|
|
2586
|
-
"Specify the maximum size of the cache that ",
|
|
2587
|
-
/* @__PURE__ */ jsx38("code", {
|
|
2588
|
-
children: "<Video>"
|
|
2589
|
-
}),
|
|
2590
|
-
" and",
|
|
2591
|
-
" ",
|
|
2592
|
-
/* @__PURE__ */ jsx38("code", {
|
|
2593
|
-
children: "<Audio>"
|
|
2594
|
-
}),
|
|
2595
|
-
" from ",
|
|
2596
|
-
/* @__PURE__ */ jsx38("code", {
|
|
2597
|
-
children: "@remotion/media"
|
|
2598
|
-
}),
|
|
2599
|
-
" may use combined, in bytes. ",
|
|
2600
|
-
/* @__PURE__ */ jsx38("br", {}),
|
|
2601
|
-
"The default is half of the available system memory when the render starts."
|
|
2602
|
-
]
|
|
2603
|
-
}),
|
|
2604
|
-
ssrName: "mediaCacheSizeInBytes",
|
|
2605
|
-
docLink: "https://www.remotion.dev/docs/media/video#setting-the-cache-size",
|
|
2606
|
-
type: 0,
|
|
2607
|
-
getValue: ({ commandLine }) => {
|
|
2608
|
-
if (commandLine[cliFlag43] !== undefined) {
|
|
2609
|
-
return {
|
|
2610
|
-
source: "cli",
|
|
2611
|
-
value: commandLine[cliFlag43]
|
|
2612
|
-
};
|
|
2613
|
-
}
|
|
2614
|
-
if (mediaCacheSizeInBytes !== null) {
|
|
2615
|
-
return {
|
|
2616
|
-
source: "config",
|
|
2617
|
-
value: mediaCacheSizeInBytes
|
|
2618
|
-
};
|
|
2619
|
-
}
|
|
2620
|
-
return {
|
|
2621
|
-
source: "default",
|
|
2622
|
-
value: null
|
|
2623
|
-
};
|
|
2624
|
-
},
|
|
2625
|
-
setConfig: (size) => {
|
|
2626
|
-
mediaCacheSizeInBytes = size ?? null;
|
|
2627
|
-
}
|
|
2628
|
-
};
|
|
2629
|
-
|
|
2630
|
-
// src/path-normalize.ts
|
|
2631
|
-
var SLASH = 47;
|
|
2632
|
-
var DOT = 46;
|
|
2633
|
-
var assertPath = (path) => {
|
|
2634
|
-
const t = typeof path;
|
|
2635
|
-
if (t !== "string") {
|
|
2636
|
-
throw new TypeError(`Expected a string, got a ${t}`);
|
|
2637
|
-
}
|
|
2638
|
-
};
|
|
2639
|
-
var posixNormalize = (path, allowAboveRoot) => {
|
|
2640
|
-
let res = "";
|
|
2641
|
-
let lastSegmentLength = 0;
|
|
2642
|
-
let lastSlash = -1;
|
|
2643
|
-
let dots = 0;
|
|
2644
|
-
let code;
|
|
2645
|
-
for (let i = 0;i <= path.length; ++i) {
|
|
2646
|
-
if (i < path.length) {
|
|
2647
|
-
code = path.charCodeAt(i);
|
|
2648
|
-
} else if (code === SLASH) {
|
|
2649
|
-
break;
|
|
2650
|
-
} else {
|
|
2651
|
-
code = SLASH;
|
|
2652
|
-
}
|
|
2653
|
-
if (code === SLASH) {
|
|
2654
|
-
if (lastSlash === i - 1 || dots === 1) {} else if (lastSlash !== i - 1 && dots === 2) {
|
|
2655
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== DOT || res.charCodeAt(res.length - 2) !== DOT) {
|
|
2656
|
-
if (res.length > 2) {
|
|
2657
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
2658
|
-
if (lastSlashIndex !== res.length - 1) {
|
|
2659
|
-
if (lastSlashIndex === -1) {
|
|
2660
|
-
res = "";
|
|
2661
|
-
lastSegmentLength = 0;
|
|
2662
|
-
} else {
|
|
2663
|
-
res = res.slice(0, lastSlashIndex);
|
|
2664
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
2665
|
-
}
|
|
2666
|
-
lastSlash = i;
|
|
2667
|
-
dots = 0;
|
|
2668
|
-
continue;
|
|
2669
|
-
}
|
|
2670
|
-
} else if (res.length === 2 || res.length === 1) {
|
|
2671
|
-
res = "";
|
|
2672
|
-
lastSegmentLength = 0;
|
|
2673
|
-
lastSlash = i;
|
|
2674
|
-
dots = 0;
|
|
2675
|
-
continue;
|
|
2676
|
-
}
|
|
2677
|
-
}
|
|
2678
|
-
if (allowAboveRoot) {
|
|
2679
|
-
if (res.length > 0) {
|
|
2680
|
-
res += "/..";
|
|
2681
|
-
} else {
|
|
2682
|
-
res = "..";
|
|
2683
|
-
}
|
|
2684
|
-
lastSegmentLength = 2;
|
|
2685
|
-
}
|
|
2686
|
-
} else {
|
|
2687
|
-
if (res.length > 0) {
|
|
2688
|
-
res += "/" + path.slice(lastSlash + 1, i);
|
|
2689
|
-
} else {
|
|
2690
|
-
res = path.slice(lastSlash + 1, i);
|
|
2691
|
-
}
|
|
2692
|
-
lastSegmentLength = i - lastSlash - 1;
|
|
2693
|
-
}
|
|
2694
|
-
lastSlash = i;
|
|
2695
|
-
dots = 0;
|
|
2696
|
-
} else if (code === DOT && dots !== -1) {
|
|
2697
|
-
++dots;
|
|
2698
|
-
} else {
|
|
2699
|
-
dots = -1;
|
|
2700
|
-
}
|
|
2701
|
-
}
|
|
2702
|
-
return res;
|
|
2703
|
-
};
|
|
2704
|
-
var decode = (s) => {
|
|
2705
|
-
try {
|
|
2706
|
-
return decodeURIComponent(s);
|
|
2707
|
-
} catch {
|
|
2708
|
-
return s;
|
|
2709
|
-
}
|
|
2710
|
-
};
|
|
2711
|
-
var pathNormalize = (p) => {
|
|
2712
|
-
assertPath(p);
|
|
2713
|
-
let path = p;
|
|
2714
|
-
if (path.length === 0) {
|
|
2715
|
-
return ".";
|
|
2716
|
-
}
|
|
2717
|
-
const isAbsolute = path.charCodeAt(0) === SLASH;
|
|
2718
|
-
const trailingSeparator = path.charCodeAt(path.length - 1) === SLASH;
|
|
2719
|
-
path = decode(path);
|
|
2720
|
-
path = posixNormalize(path, !isAbsolute);
|
|
2721
|
-
if (path.length === 0 && !isAbsolute) {
|
|
2722
|
-
path = ".";
|
|
2723
|
-
}
|
|
2724
|
-
if (path.length > 0 && trailingSeparator) {
|
|
2725
|
-
path += "/";
|
|
2726
|
-
}
|
|
2727
|
-
if (isAbsolute) {
|
|
2728
|
-
return "/" + path;
|
|
2729
|
-
}
|
|
2730
|
-
return path;
|
|
2731
|
-
};
|
|
2732
|
-
|
|
2733
|
-
// src/get-extension-of-filename.ts
|
|
2734
|
-
var getExtensionOfFilename = (filename) => {
|
|
2735
|
-
if (filename === null) {
|
|
2736
|
-
return null;
|
|
2737
|
-
}
|
|
2738
|
-
const filenameArr = pathNormalize(filename).split(".");
|
|
2739
|
-
const hasExtension = filenameArr.length >= 2;
|
|
2740
|
-
const filenameArrLength = filenameArr.length;
|
|
2741
|
-
const extension = hasExtension ? filenameArr[filenameArrLength - 1] : null;
|
|
2742
|
-
return extension;
|
|
2743
|
-
};
|
|
2744
|
-
|
|
2745
|
-
// src/options/video-codec.tsx
|
|
2746
|
-
import { jsx as jsx39, Fragment as Fragment39 } from "react/jsx-runtime";
|
|
2747
|
-
var codec;
|
|
2748
|
-
var setCodec = (newCodec) => {
|
|
2749
|
-
if (newCodec === undefined) {
|
|
2750
|
-
codec = undefined;
|
|
2751
|
-
return;
|
|
2752
|
-
}
|
|
2753
|
-
if (!validCodecs.includes(newCodec)) {
|
|
2754
|
-
throw new Error(`Codec must be one of the following: ${validCodecs.join(", ")}, but got ${newCodec}`);
|
|
2755
|
-
}
|
|
2756
|
-
codec = newCodec;
|
|
2757
|
-
};
|
|
2758
|
-
var getOutputCodecOrUndefined = () => {
|
|
2759
|
-
return codec;
|
|
2760
|
-
};
|
|
2761
|
-
var deriveCodecsFromFilename = (extension) => {
|
|
2762
|
-
if (extension === null) {
|
|
2763
|
-
return { possible: [], default: null };
|
|
2764
|
-
}
|
|
2765
|
-
return {
|
|
2766
|
-
default: defaultCodecsForFileExtension[extension] ?? null,
|
|
2767
|
-
possible: makeFileExtensionMap()[extension] ?? []
|
|
2768
|
-
};
|
|
2769
|
-
};
|
|
2770
|
-
var cliFlag44 = "codec";
|
|
2771
|
-
var videoCodecOption = {
|
|
2772
|
-
name: "Codec",
|
|
2773
|
-
cliFlag: cliFlag44,
|
|
2774
|
-
description: () => /* @__PURE__ */ jsx39(Fragment39, {
|
|
2775
|
-
children: "H264 works well in most cases, but sometimes it's worth going for a different codec. WebM achieves higher compression but is slower to render. WebM, GIF and ProRes support transparency."
|
|
2776
|
-
}),
|
|
2777
|
-
ssrName: "codec",
|
|
2778
|
-
docLink: "https://www.remotion.dev/docs/encoding/#choosing-a-codec",
|
|
2779
|
-
type: "",
|
|
2780
|
-
getValue: ({ commandLine }, {
|
|
2781
|
-
compositionCodec,
|
|
2782
|
-
configFile,
|
|
2783
|
-
downloadName,
|
|
2784
|
-
outName,
|
|
2785
|
-
uiCodec
|
|
2786
|
-
}) => {
|
|
2787
|
-
if (uiCodec) {
|
|
2788
|
-
return { value: uiCodec, source: "via UI" };
|
|
2789
|
-
}
|
|
2790
|
-
const downloadNameExtension = getExtensionOfFilename(downloadName);
|
|
2791
|
-
const outNameExtension = getExtensionOfFilename(outName);
|
|
2792
|
-
const derivedDownloadCodecs = deriveCodecsFromFilename(downloadNameExtension);
|
|
2793
|
-
const derivedOutNameCodecs = deriveCodecsFromFilename(outNameExtension);
|
|
2794
|
-
if (derivedDownloadCodecs.possible.length > 0 && derivedOutNameCodecs.possible.length > 0 && derivedDownloadCodecs.possible.join("") !== derivedOutNameCodecs.possible.join("")) {
|
|
2795
|
-
throw new TypeError(`The download name is ${downloadName} but the output name is ${outName}. The file extensions must match`);
|
|
2796
|
-
}
|
|
2797
|
-
const cliArgument = commandLine[cliFlag44];
|
|
2798
|
-
if (cliArgument) {
|
|
2799
|
-
if (derivedDownloadCodecs.possible.length > 0 && derivedDownloadCodecs.possible.indexOf(cliArgument) === -1) {
|
|
2800
|
-
throw new TypeError(`The download name is ${downloadName} but --codec=${cliArgument} was passed. The download name implies a codec of ${derivedDownloadCodecs.possible.join(" or ")} which does not align with the --codec flag.`);
|
|
2801
|
-
}
|
|
2802
|
-
if (derivedOutNameCodecs.possible.length > 0 && derivedOutNameCodecs.possible.indexOf(cliArgument) === -1) {
|
|
2803
|
-
throw new TypeError(`The out name is ${outName} but --codec=${cliArgument} was passed. The out name implies a codec of ${derivedOutNameCodecs.possible.join(" or ")} which does not align with the --codec flag.`);
|
|
2804
|
-
}
|
|
2805
|
-
return { value: cliArgument, source: "from --codec flag" };
|
|
2806
|
-
}
|
|
2807
|
-
if (derivedDownloadCodecs.possible.length > 0) {
|
|
2808
|
-
return {
|
|
2809
|
-
value: derivedDownloadCodecs.default,
|
|
2810
|
-
source: "derived from download name"
|
|
2811
|
-
};
|
|
2812
|
-
}
|
|
2813
|
-
if (derivedOutNameCodecs.possible.length > 0) {
|
|
2814
|
-
if (compositionCodec && derivedOutNameCodecs.possible.includes(compositionCodec)) {
|
|
2815
|
-
return {
|
|
2816
|
-
value: compositionCodec,
|
|
2817
|
-
source: "derived from out name + compositionCodec from calculateMetadata"
|
|
2818
|
-
};
|
|
2819
|
-
}
|
|
2820
|
-
if (configFile && derivedOutNameCodecs.possible.includes(configFile)) {
|
|
2821
|
-
return {
|
|
2822
|
-
value: configFile,
|
|
2823
|
-
source: "derived from out name + config file"
|
|
2824
|
-
};
|
|
2825
|
-
}
|
|
2826
|
-
return {
|
|
2827
|
-
value: derivedOutNameCodecs.default,
|
|
2828
|
-
source: "derived from out name"
|
|
2829
|
-
};
|
|
2830
|
-
}
|
|
2831
|
-
if (compositionCodec) {
|
|
2832
|
-
return { value: compositionCodec, source: "via calculateMetadata" };
|
|
2833
|
-
}
|
|
2834
|
-
if (configFile) {
|
|
2835
|
-
return {
|
|
2836
|
-
value: configFile,
|
|
2837
|
-
source: "Config file"
|
|
2838
|
-
};
|
|
2839
|
-
}
|
|
2840
|
-
return { value: DEFAULT_CODEC, source: "default" };
|
|
2841
|
-
},
|
|
2842
|
-
setConfig: setCodec
|
|
2843
|
-
};
|
|
2844
|
-
|
|
2845
|
-
// src/options/webhook-custom-data.tsx
|
|
2846
|
-
import { jsxs as jsxs32, Fragment as Fragment40 } from "react/jsx-runtime";
|
|
2847
|
-
var cliFlag45 = "webhook-custom-data";
|
|
2848
|
-
var webhookCustomDataOption = {
|
|
2849
|
-
name: "Webhook custom data",
|
|
2850
|
-
cliFlag: cliFlag45,
|
|
2851
|
-
description: (type) => /* @__PURE__ */ jsxs32(Fragment40, {
|
|
2852
|
-
children: [
|
|
2853
|
-
"Pass up to 1,024 bytes of a JSON-serializable object to the webhook. This data will be included in the webhook payload.",
|
|
2854
|
-
" ",
|
|
2855
|
-
type === "cli" ? "Alternatively, pass a file path pointing to a JSON file" : null
|
|
2856
|
-
]
|
|
2857
|
-
}),
|
|
2858
|
-
ssrName: "customData",
|
|
2859
|
-
docLink: "https://www.remotion.dev/docs/lambda/webhooks",
|
|
2860
|
-
type: {},
|
|
2861
|
-
getValue: () => {
|
|
2862
|
-
throw new Error("Option resolution not implemented");
|
|
2863
|
-
},
|
|
2864
|
-
setConfig: () => {
|
|
2865
|
-
throw new Error("Not implemented");
|
|
2866
|
-
}
|
|
2867
|
-
};
|
|
2868
|
-
|
|
2869
|
-
// src/options/x264-preset.tsx
|
|
2870
|
-
import { jsx as jsx40, jsxs as jsxs33, Fragment as Fragment41 } from "react/jsx-runtime";
|
|
2871
|
-
var x264PresetOptions = [
|
|
2872
|
-
"ultrafast",
|
|
2873
|
-
"superfast",
|
|
2874
|
-
"veryfast",
|
|
2875
|
-
"faster",
|
|
2876
|
-
"fast",
|
|
2877
|
-
"medium",
|
|
2878
|
-
"slow",
|
|
2879
|
-
"slower",
|
|
2880
|
-
"veryslow",
|
|
2881
|
-
"placebo"
|
|
2882
|
-
];
|
|
2883
|
-
var preset = null;
|
|
2884
|
-
var cliFlag46 = "x264-preset";
|
|
2885
|
-
var DEFAULT_PRESET = "medium";
|
|
2886
|
-
var x264Option = {
|
|
2887
|
-
name: "x264 Preset",
|
|
2888
|
-
cliFlag: cliFlag46,
|
|
2889
|
-
description: () => /* @__PURE__ */ jsxs33(Fragment41, {
|
|
2890
|
-
children: [
|
|
2891
|
-
"Sets a x264 preset profile. Only applies to videos rendered with",
|
|
2892
|
-
" ",
|
|
2893
|
-
/* @__PURE__ */ jsx40("code", {
|
|
2894
|
-
children: "h264"
|
|
2895
|
-
}),
|
|
2896
|
-
" codec.",
|
|
2897
|
-
/* @__PURE__ */ jsx40("br", {}),
|
|
2898
|
-
"Possible values: ",
|
|
2899
|
-
/* @__PURE__ */ jsx40("code", {
|
|
2900
|
-
children: "superfast"
|
|
2901
|
-
}),
|
|
2902
|
-
", ",
|
|
2903
|
-
/* @__PURE__ */ jsx40("code", {
|
|
2904
|
-
children: "veryfast"
|
|
2905
|
-
}),
|
|
2906
|
-
",",
|
|
2907
|
-
" ",
|
|
2908
|
-
/* @__PURE__ */ jsx40("code", {
|
|
2909
|
-
children: "faster"
|
|
2910
|
-
}),
|
|
2911
|
-
", ",
|
|
2912
|
-
/* @__PURE__ */ jsx40("code", {
|
|
2913
|
-
children: "fast"
|
|
2914
|
-
}),
|
|
2915
|
-
", ",
|
|
2916
|
-
/* @__PURE__ */ jsx40("code", {
|
|
2917
|
-
children: "medium"
|
|
2918
|
-
}),
|
|
2919
|
-
",",
|
|
2920
|
-
" ",
|
|
2921
|
-
/* @__PURE__ */ jsx40("code", {
|
|
2922
|
-
children: "slow"
|
|
2923
|
-
}),
|
|
2924
|
-
", ",
|
|
2925
|
-
/* @__PURE__ */ jsx40("code", {
|
|
2926
|
-
children: "slower"
|
|
2927
|
-
}),
|
|
2928
|
-
", ",
|
|
2929
|
-
/* @__PURE__ */ jsx40("code", {
|
|
2930
|
-
children: "veryslow"
|
|
2931
|
-
}),
|
|
2932
|
-
",",
|
|
2933
|
-
" ",
|
|
2934
|
-
/* @__PURE__ */ jsx40("code", {
|
|
2935
|
-
children: "placebo"
|
|
2936
|
-
}),
|
|
2937
|
-
".",
|
|
2938
|
-
/* @__PURE__ */ jsx40("br", {}),
|
|
2939
|
-
"Default: ",
|
|
2940
|
-
/* @__PURE__ */ jsx40("code", {
|
|
2941
|
-
children: DEFAULT_PRESET
|
|
2942
|
-
})
|
|
2943
|
-
]
|
|
2944
|
-
}),
|
|
2945
|
-
ssrName: "x264Preset",
|
|
2946
|
-
docLink: "https://www.remotion.dev/docs/renderer/render-media",
|
|
2947
|
-
type: "fast",
|
|
2948
|
-
getValue: ({ commandLine }) => {
|
|
2949
|
-
const value3 = commandLine[cliFlag46];
|
|
2950
|
-
if (typeof value3 !== "undefined") {
|
|
2951
|
-
return { value: value3, source: "cli" };
|
|
2952
|
-
}
|
|
2953
|
-
if (preset !== null) {
|
|
2954
|
-
return { value: preset, source: "config" };
|
|
2955
|
-
}
|
|
2956
|
-
return { value: null, source: "default" };
|
|
2957
|
-
},
|
|
2958
|
-
setConfig: (profile) => {
|
|
2959
|
-
preset = profile;
|
|
2960
|
-
}
|
|
2961
|
-
};
|
|
2962
|
-
|
|
2963
|
-
// src/options/index.tsx
|
|
2964
|
-
var allOptions = {
|
|
2965
|
-
audioCodecOption,
|
|
2966
|
-
scaleOption,
|
|
2967
|
-
crfOption,
|
|
2968
|
-
jpegQualityOption,
|
|
2969
|
-
videoBitrateOption,
|
|
2970
|
-
audioBitrateOption,
|
|
2971
|
-
enforceAudioOption,
|
|
2972
|
-
mutedOption,
|
|
2973
|
-
videoCodecOption,
|
|
2974
|
-
offthreadVideoCacheSizeInBytesOption,
|
|
2975
|
-
offthreadVideoThreadsOption,
|
|
2976
|
-
webhookCustomDataOption,
|
|
2977
|
-
colorSpaceOption,
|
|
2978
|
-
deleteAfterOption,
|
|
2979
|
-
disallowParallelEncodingOption,
|
|
2980
|
-
folderExpiryOption,
|
|
2981
|
-
enableMultiprocessOnLinuxOption,
|
|
2982
|
-
glOption,
|
|
2983
|
-
enableLambdaInsights,
|
|
2984
|
-
encodingMaxRateOption,
|
|
2985
|
-
encodingBufferSizeOption,
|
|
2986
|
-
beepOnFinishOption,
|
|
2987
|
-
numberOfGifLoopsOption,
|
|
2988
|
-
reproOption,
|
|
2989
|
-
preferLosslessOption: preferLosslessAudioOption,
|
|
2990
|
-
x264Option,
|
|
2991
|
-
logLevelOption,
|
|
2992
|
-
delayRenderTimeoutInMillisecondsOption,
|
|
2993
|
-
headlessOption,
|
|
2994
|
-
overwriteOption,
|
|
2995
|
-
binariesDirectoryOption,
|
|
2996
|
-
forSeamlessAacConcatenationOption,
|
|
2997
|
-
separateAudioOption,
|
|
2998
|
-
publicPathOption,
|
|
2999
|
-
publicDirOption,
|
|
3000
|
-
onBrowserDownloadOption,
|
|
3001
|
-
throwIfSiteExistsOption,
|
|
3002
|
-
disableGitSourceOption,
|
|
3003
|
-
metadataOption,
|
|
3004
|
-
hardwareAccelerationOption,
|
|
3005
|
-
chromeModeOption,
|
|
3006
|
-
apiKeyOption,
|
|
3007
|
-
audioLatencyHintOption,
|
|
3008
|
-
enableCrossSiteIsolationOption,
|
|
3009
|
-
imageSequencePatternOption,
|
|
3010
|
-
mediaCacheSizeInBytesOption
|
|
3011
|
-
};
|
|
3012
|
-
|
|
3013
|
-
// src/options/options-map.ts
|
|
3014
|
-
var optionsMap = {
|
|
3015
|
-
renderMedia: {
|
|
3016
|
-
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3017
|
-
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3018
|
-
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3019
|
-
videoBitrate: videoBitrateOption,
|
|
3020
|
-
numberOfGifLoops: numberOfGifLoopsOption,
|
|
3021
|
-
repro: reproOption,
|
|
3022
|
-
x264Preset: x264Option,
|
|
3023
|
-
audioBitrate: audioBitrateOption,
|
|
3024
|
-
colorSpace: colorSpaceOption,
|
|
3025
|
-
codec: videoCodecOption,
|
|
3026
|
-
disallowParallelEncoding: disallowParallelEncodingOption,
|
|
3027
|
-
jpegQuality: jpegQualityOption,
|
|
3028
|
-
encodingMaxRate: encodingMaxRateOption,
|
|
3029
|
-
encodingBufferSize: encodingBufferSizeOption,
|
|
3030
|
-
muted: mutedOption,
|
|
3031
|
-
logLevel: logLevelOption,
|
|
3032
|
-
timeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption,
|
|
3033
|
-
binariesDirectory: binariesDirectoryOption,
|
|
3034
|
-
forSeamlessAacConcatenation: forSeamlessAacConcatenationOption,
|
|
3035
|
-
separateAudioTo: separateAudioOption,
|
|
3036
|
-
audioCodec: audioCodecOption,
|
|
3037
|
-
onBrowserDownload: onBrowserDownloadOption,
|
|
3038
|
-
hardwareAcceleration: hardwareAccelerationOption,
|
|
3039
|
-
chromeMode: chromeModeOption
|
|
3040
|
-
},
|
|
3041
|
-
stitchFramesToVideo: {
|
|
3042
|
-
separateAudioTo: separateAudioOption,
|
|
3043
|
-
hardwareAcceleration: hardwareAccelerationOption
|
|
3044
|
-
},
|
|
3045
|
-
renderStill: {
|
|
3046
|
-
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3047
|
-
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3048
|
-
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3049
|
-
jpegQuality: jpegQualityOption,
|
|
3050
|
-
logLevel: logLevelOption,
|
|
3051
|
-
timeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption,
|
|
3052
|
-
binariesDirectory: binariesDirectoryOption,
|
|
3053
|
-
onBrowserDownload: onBrowserDownloadOption,
|
|
3054
|
-
chromeMode: chromeModeOption
|
|
3055
|
-
},
|
|
3056
|
-
getCompositions: {
|
|
3057
|
-
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3058
|
-
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3059
|
-
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3060
|
-
logLevel: logLevelOption,
|
|
3061
|
-
timeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption,
|
|
3062
|
-
binariesDirectory: binariesDirectoryOption,
|
|
3063
|
-
onBrowserDownload: onBrowserDownloadOption,
|
|
3064
|
-
chromeMode: chromeModeOption
|
|
3065
|
-
},
|
|
3066
|
-
selectComposition: {
|
|
3067
|
-
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3068
|
-
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3069
|
-
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3070
|
-
logLevel: logLevelOption,
|
|
3071
|
-
timeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption,
|
|
3072
|
-
binariesDirectory: binariesDirectoryOption,
|
|
3073
|
-
onBrowserDownload: onBrowserDownloadOption,
|
|
3074
|
-
chromeMode: chromeModeOption
|
|
3075
|
-
},
|
|
3076
|
-
renderFrames: {
|
|
3077
|
-
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3078
|
-
forSeamlessAacConcatenation: forSeamlessAacConcatenationOption,
|
|
3079
|
-
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3080
|
-
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3081
|
-
jpegQuality: jpegQualityOption,
|
|
3082
|
-
logLevel: logLevelOption,
|
|
3083
|
-
timeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption,
|
|
3084
|
-
binariesDirectory: binariesDirectoryOption,
|
|
3085
|
-
onBrowserDownload: onBrowserDownloadOption,
|
|
3086
|
-
chromeMode: chromeModeOption,
|
|
3087
|
-
imageSequencePattern: imageSequencePatternOption
|
|
3088
|
-
},
|
|
3089
|
-
renderMediaOnLambda: {
|
|
3090
|
-
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3091
|
-
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3092
|
-
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3093
|
-
videoBitrate: videoBitrateOption,
|
|
3094
|
-
numberOfGifLoops: numberOfGifLoopsOption,
|
|
3095
|
-
preferLossless: preferLosslessAudioOption,
|
|
3096
|
-
audioBitrate: audioBitrateOption,
|
|
3097
|
-
deleteAfter: deleteAfterOption,
|
|
3098
|
-
x264Preset: x264Option,
|
|
3099
|
-
encodingMaxRate: encodingMaxRateOption,
|
|
3100
|
-
encodingBufferSize: encodingBufferSizeOption,
|
|
3101
|
-
colorSpace: colorSpaceOption,
|
|
3102
|
-
muted: mutedOption,
|
|
3103
|
-
logLevel: logLevelOption,
|
|
3104
|
-
timeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption,
|
|
3105
|
-
apiKey: apiKeyOption
|
|
3106
|
-
},
|
|
3107
|
-
renderStillOnLambda: {
|
|
3108
|
-
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3109
|
-
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3110
|
-
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3111
|
-
jpegQuality: jpegQualityOption,
|
|
3112
|
-
logLevel: logLevelOption,
|
|
3113
|
-
deleteAfter: deleteAfterOption,
|
|
3114
|
-
scale: scaleOption,
|
|
3115
|
-
timeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption,
|
|
3116
|
-
apiKey: apiKeyOption
|
|
3117
|
-
},
|
|
3118
|
-
getCompositionsOnLambda: {
|
|
3119
|
-
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3120
|
-
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3121
|
-
logLevel: logLevelOption,
|
|
3122
|
-
timeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption
|
|
3123
|
-
},
|
|
3124
|
-
renderMediaOnCloudRun: {
|
|
3125
|
-
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3126
|
-
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3127
|
-
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3128
|
-
numberOfGifLoops: numberOfGifLoopsOption,
|
|
3129
|
-
preferLossless: preferLosslessAudioOption,
|
|
3130
|
-
colorSpace: colorSpaceOption,
|
|
3131
|
-
audioBitrate: audioBitrateOption,
|
|
3132
|
-
videoBitrate: videoBitrateOption,
|
|
3133
|
-
x264Preset: x264Option,
|
|
3134
|
-
encodingMaxRate: encodingMaxRateOption,
|
|
3135
|
-
encodingBufferSize: encodingBufferSizeOption,
|
|
3136
|
-
muted: mutedOption,
|
|
3137
|
-
logLevel: logLevelOption,
|
|
3138
|
-
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption,
|
|
3139
|
-
enforceAudioTrack: enforceAudioOption,
|
|
3140
|
-
scale: scaleOption,
|
|
3141
|
-
crf: crfOption,
|
|
3142
|
-
jpegQuality: jpegQualityOption
|
|
3143
|
-
},
|
|
3144
|
-
renderStillOnCloudRun: {
|
|
3145
|
-
mediaCacheSizeInBytes: mediaCacheSizeInBytesOption,
|
|
3146
|
-
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption,
|
|
3147
|
-
offthreadVideoThreads: offthreadVideoThreadsOption,
|
|
3148
|
-
logLevel: logLevelOption,
|
|
3149
|
-
scale: scaleOption,
|
|
3150
|
-
jpegQuality: jpegQualityOption,
|
|
3151
|
-
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption
|
|
3152
|
-
},
|
|
3153
|
-
ensureBrowser: {
|
|
3154
|
-
logLevel: logLevelOption,
|
|
3155
|
-
onBrowserDownload: onBrowserDownloadOption,
|
|
3156
|
-
chromeMode: chromeModeOption
|
|
3157
|
-
},
|
|
3158
|
-
openBrowser: {
|
|
3159
|
-
logLevel: logLevelOption,
|
|
3160
|
-
onBrowserDownload: onBrowserDownloadOption,
|
|
3161
|
-
chromeMode: chromeModeOption
|
|
3162
|
-
},
|
|
3163
|
-
deploySiteLambda: {
|
|
3164
|
-
logLevel: logLevelOption,
|
|
3165
|
-
throwIfSiteExists: throwIfSiteExistsOption
|
|
3166
|
-
},
|
|
3167
|
-
deploySiteCloudRun: {
|
|
3168
|
-
logLevel: logLevelOption
|
|
3169
|
-
}
|
|
3170
|
-
};
|
|
3171
|
-
|
|
3172
|
-
// src/pixel-format.ts
|
|
3173
|
-
var validPixelFormats = [
|
|
3174
|
-
"yuv420p",
|
|
3175
|
-
"yuva420p",
|
|
3176
|
-
"yuv422p",
|
|
3177
|
-
"yuv444p",
|
|
3178
|
-
"yuv420p10le",
|
|
3179
|
-
"yuv422p10le",
|
|
3180
|
-
"yuv444p10le",
|
|
3181
|
-
"yuva444p10le"
|
|
3182
|
-
];
|
|
3183
|
-
var DEFAULT_PIXEL_FORMAT = "yuv420p";
|
|
3184
|
-
var validPixelFormatsForCodec = (codec2) => {
|
|
3185
|
-
if (codec2 === "vp8" || codec2 === "vp9") {
|
|
3186
|
-
return validPixelFormats;
|
|
3187
|
-
}
|
|
3188
|
-
return validPixelFormats.filter((format) => format !== "yuva420p");
|
|
3189
|
-
};
|
|
3190
|
-
|
|
3191
|
-
// src/prores-profile.ts
|
|
3192
|
-
var proResProfileOptions = [
|
|
3193
|
-
"4444-xq",
|
|
3194
|
-
"4444",
|
|
3195
|
-
"hq",
|
|
3196
|
-
"standard",
|
|
3197
|
-
"light",
|
|
3198
|
-
"proxy"
|
|
3199
|
-
];
|
|
3200
|
-
|
|
3201
|
-
// src/validate-output-filename.ts
|
|
3202
|
-
var validateOutputFilename = ({
|
|
3203
|
-
codec: codec2,
|
|
3204
|
-
audioCodecSetting,
|
|
3205
|
-
extension,
|
|
3206
|
-
preferLossless,
|
|
3207
|
-
separateAudioTo
|
|
3208
|
-
}) => {
|
|
3209
|
-
if (!defaultFileExtensionMap[codec2]) {
|
|
3210
|
-
throw new TypeError(`The codec "${codec2}" is not supported. Supported codecs are: ${Object.keys(defaultFileExtensionMap).join(", ")}`);
|
|
3211
|
-
}
|
|
3212
|
-
const map = defaultFileExtensionMap[codec2];
|
|
3213
|
-
const resolvedAudioCodec = resolveAudioCodec({
|
|
3214
|
-
codec: codec2,
|
|
3215
|
-
preferLossless,
|
|
3216
|
-
setting: audioCodecSetting,
|
|
3217
|
-
separateAudioTo
|
|
3218
|
-
});
|
|
3219
|
-
if (resolvedAudioCodec === null) {
|
|
3220
|
-
if (extension !== map.default) {
|
|
3221
|
-
throw new TypeError(`When using the ${codec2} codec, the output filename must end in .${map.default}.`);
|
|
3222
|
-
}
|
|
3223
|
-
return;
|
|
3224
|
-
}
|
|
3225
|
-
if (!(resolvedAudioCodec in map.forAudioCodec)) {
|
|
3226
|
-
throw new Error(`Audio codec ${resolvedAudioCodec} is not supported for codec ${codec2}`);
|
|
3227
|
-
}
|
|
3228
|
-
const acceptableExtensions = map.forAudioCodec[resolvedAudioCodec].possible;
|
|
3229
|
-
if (!acceptableExtensions.includes(extension) && !separateAudioTo) {
|
|
3230
|
-
throw new TypeError(`When using the ${codec2} codec with the ${resolvedAudioCodec} audio codec, the output filename must end in one of the following: ${acceptableExtensions.join(", ")}.`);
|
|
3231
|
-
}
|
|
3232
|
-
};
|
|
3233
|
-
|
|
3234
|
-
// src/client.ts
|
|
3235
|
-
var BrowserSafeApis = {
|
|
3236
|
-
getFileExtensionFromCodec,
|
|
3237
|
-
validCodecs,
|
|
3238
|
-
validAudioCodecs,
|
|
3239
|
-
getDefaultCrfForCodec,
|
|
3240
|
-
getValidCrfRanges,
|
|
3241
|
-
proResProfileOptions,
|
|
3242
|
-
x264PresetOptions,
|
|
3243
|
-
hardwareAccelerationOptions,
|
|
3244
|
-
validPixelFormats,
|
|
3245
|
-
validOpenGlRenderers,
|
|
3246
|
-
validPixelFormatsForCodec,
|
|
3247
|
-
validVideoImageFormats,
|
|
3248
|
-
validStillImageFormats,
|
|
3249
|
-
DEFAULT_PIXEL_FORMAT,
|
|
3250
|
-
DEFAULT_TIMEOUT,
|
|
3251
|
-
DEFAULT_JPEG_QUALITY,
|
|
3252
|
-
DEFAULT_COLOR_SPACE,
|
|
3253
|
-
supportedAudioCodecs,
|
|
3254
|
-
defaultFileExtensionMap,
|
|
3255
|
-
defaultAudioCodecs,
|
|
3256
|
-
defaultCodecsForFileExtension,
|
|
3257
|
-
validateOutputFilename,
|
|
3258
|
-
options: allOptions,
|
|
3259
|
-
validColorSpaces,
|
|
3260
|
-
optionsMap,
|
|
3261
|
-
codecSupportsCrf,
|
|
3262
|
-
codecSupportsVideoBitrate,
|
|
3263
|
-
logLevels,
|
|
3264
|
-
getOutputCodecOrUndefined,
|
|
3265
|
-
getExtensionFromAudioCodec,
|
|
3266
|
-
validChromeModeOptions
|
|
3267
|
-
};
|
|
3268
|
-
export {
|
|
3269
|
-
BrowserSafeApis
|
|
3270
|
-
};
|