@remotion/renderer 4.0.357 → 4.0.358
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/render-frames.js +1 -1
- package/dist/test/actual-concurrency.test.d.ts +1 -0
- package/dist/test/artifacts.test.d.ts +1 -0
- package/dist/test/asset-calculation.test.d.ts +1 -0
- package/dist/test/asset-compression.test.d.ts +1 -0
- package/dist/test/avoid-ffmpeg-stackoverflow.test.d.ts +1 -0
- package/dist/test/browser-log-message.test.d.ts +1 -0
- package/dist/test/calculate-atempo.test.d.ts +1 -0
- package/dist/test/compositor-rust.test.d.ts +1 -0
- package/dist/test/crf.test.d.ts +1 -0
- package/dist/test/derive-codec-from-file-extension.test.d.ts +1 -0
- package/dist/test/dont-skip-assets.test.d.ts +1 -0
- package/dist/test/download-file.test.d.ts +1 -0
- package/dist/test/even-dimensions.test.d.ts +1 -0
- package/dist/test/extra-frames-to-capture.test.d.ts +1 -0
- package/dist/test/extract-audio.test.d.ts +1 -0
- package/dist/test/extract-frame-rust.test.d.ts +1 -0
- package/dist/test/ffmpeg-filters.test.d.ts +1 -0
- package/dist/test/ffmpeg-merge-filter.test.d.ts +1 -0
- package/dist/test/ffmpeg-volume-expression.test.d.ts +1 -0
- package/dist/test/file-extension.test.d.ts +1 -0
- package/dist/test/find-closest-package-json.test.d.ts +1 -0
- package/dist/test/flatten-volume-array.test.d.ts +1 -0
- package/dist/test/format-logs.test.d.ts +1 -0
- package/dist/test/frame-padded-index.test.d.ts +1 -0
- package/dist/test/frame.test.d.ts +1 -0
- package/dist/test/get-assets-for-markup.d.ts +8 -0
- package/dist/test/get-audio-channels.test.d.ts +1 -0
- package/dist/test/get-bundle-url-from-serve-url.test.d.ts +1 -0
- package/dist/test/get-silent-parts.test.d.ts +1 -0
- package/dist/test/guess-extension-for-media.test.d.ts +1 -0
- package/dist/test/handle-weird-file-names.test.d.ts +1 -0
- package/dist/test/log-level.test.d.ts +1 -0
- package/dist/test/mime-types.test.d.ts +1 -0
- package/dist/test/offthread-extract-url.test.d.ts +1 -0
- package/dist/test/parse-ffmpeg-progress.test.d.ts +1 -0
- package/dist/test/partitions.test.d.ts +1 -0
- package/dist/test/pixel-format.test.d.ts +1 -0
- package/dist/test/port-config.test.d.ts +1 -0
- package/dist/test/port-selection.test.d.ts +1 -0
- package/dist/test/prores-profile.test.d.ts +1 -0
- package/dist/test/render-still.test.d.ts +1 -0
- package/dist/test/rust-errors.test.d.ts +1 -0
- package/dist/test/rust-get-video-metadata.test.d.ts +1 -0
- package/dist/test/rust-memory-usage.test.d.ts +1 -0
- package/dist/test/sanitize-file-path.test.d.ts +1 -0
- package/dist/test/serve-url.test.d.ts +1 -0
- package/dist/test/symbolicate-remote-stack.test.d.ts +1 -0
- package/dist/test/validate-concurrency.test.d.ts +1 -0
- package/dist/test/validate-config-stitcher.test.d.ts +1 -0
- package/dist/test/validate-config.test.d.ts +1 -0
- package/dist/test/validate-even-dimensions-with-codec.test.d.ts +1 -0
- package/dist/test/validate-image-format.test.d.ts +1 -0
- package/dist/test/webpack-to-serve-url.test.d.ts +1 -0
- package/package/dist/assets/apply-tone-frequency.d.ts +11 -0
- package/package/dist/assets/apply-tone-frequency.js +34 -0
- package/package/dist/assets/calculate-asset-positions.d.ts +3 -0
- package/package/dist/assets/calculate-asset-positions.js +72 -0
- package/package/dist/assets/calculate-atempo.d.ts +1 -0
- package/package/dist/assets/calculate-atempo.js +16 -0
- package/package/dist/assets/convert-assets-to-file-urls.d.ts +13 -0
- package/package/dist/assets/convert-assets-to-file-urls.js +36 -0
- package/package/dist/assets/download-and-map-assets-to-file.d.ts +37 -0
- package/package/dist/assets/download-and-map-assets-to-file.js +312 -0
- package/package/dist/assets/download-file.d.ts +18 -0
- package/package/dist/assets/download-file.js +135 -0
- package/package/dist/assets/download-map.d.ts +55 -0
- package/package/dist/assets/download-map.js +63 -0
- package/package/dist/assets/ffmpeg-volume-expression.d.ts +12 -0
- package/package/dist/assets/ffmpeg-volume-expression.js +96 -0
- package/package/dist/assets/flatten-volume-array.d.ts +3 -0
- package/package/dist/assets/flatten-volume-array.js +26 -0
- package/package/dist/assets/get-audio-channels.d.ts +20 -0
- package/package/dist/assets/get-audio-channels.js +78 -0
- package/package/dist/assets/inline-audio-mixing.d.ts +22 -0
- package/package/dist/assets/inline-audio-mixing.js +189 -0
- package/package/dist/assets/read-file.d.ts +7 -0
- package/package/dist/assets/read-file.js +97 -0
- package/package/dist/assets/round-volume-to-avoid-stack-overflow.d.ts +1 -0
- package/package/dist/assets/round-volume-to-avoid-stack-overflow.js +17 -0
- package/package/dist/assets/sanitize-filename.d.ts +1 -0
- package/package/dist/assets/sanitize-filename.js +58 -0
- package/package/dist/assets/sanitize-filepath.d.ts +1 -0
- package/package/dist/assets/sanitize-filepath.js +16 -0
- package/package/dist/assets/truncate-utf8-bytes.d.ts +1 -0
- package/package/dist/assets/truncate-utf8-bytes.js +36 -0
- package/package/dist/assets/types.d.ts +18 -0
- package/package/dist/assets/types.js +21 -0
- package/package/dist/browser/Browser.d.ts +97 -0
- package/package/dist/browser/Browser.js +246 -0
- package/package/dist/browser/BrowserFetcher.d.ts +33 -0
- package/package/dist/browser/BrowserFetcher.js +215 -0
- package/package/dist/browser/BrowserPage.d.ts +104 -0
- package/package/dist/browser/BrowserPage.js +436 -0
- package/package/dist/browser/BrowserRunner.d.ts +33 -0
- package/package/dist/browser/BrowserRunner.js +303 -0
- package/package/dist/browser/Connection.d.ts +49 -0
- package/package/dist/browser/Connection.js +258 -0
- package/package/dist/browser/ConsoleMessage.d.ts +42 -0
- package/package/dist/browser/ConsoleMessage.js +47 -0
- package/package/dist/browser/DOMWorld.d.ts +56 -0
- package/package/dist/browser/DOMWorld.js +272 -0
- package/package/dist/browser/Errors.d.ts +25 -0
- package/package/dist/browser/Errors.js +35 -0
- package/package/dist/browser/EvalTypes.d.ts +27 -0
- package/package/dist/browser/EvalTypes.js +17 -0
- package/package/dist/browser/EventEmitter.d.ts +23 -0
- package/package/dist/browser/EventEmitter.js +53 -0
- package/package/dist/browser/ExecutionContext.d.ts +34 -0
- package/package/dist/browser/ExecutionContext.js +174 -0
- package/package/dist/browser/FrameManager.d.ts +89 -0
- package/package/dist/browser/FrameManager.js +487 -0
- package/package/dist/browser/HTTPRequest.d.ts +29 -0
- package/package/dist/browser/HTTPRequest.js +39 -0
- package/package/dist/browser/HTTPResponse.d.ts +21 -0
- package/package/dist/browser/HTTPResponse.js +41 -0
- package/package/dist/browser/JSHandle.d.ts +35 -0
- package/package/dist/browser/JSHandle.js +90 -0
- package/package/dist/browser/LaunchOptions.d.ts +26 -0
- package/package/dist/browser/LaunchOptions.js +17 -0
- package/package/dist/browser/Launcher.d.ts +18 -0
- package/package/dist/browser/Launcher.js +41 -0
- package/package/dist/browser/LifecycleWatcher.d.ts +29 -0
- package/package/dist/browser/LifecycleWatcher.js +180 -0
- package/package/dist/browser/NetworkEventManager.d.ts +34 -0
- package/package/dist/browser/NetworkEventManager.js +85 -0
- package/package/dist/browser/NetworkManager.d.ts +37 -0
- package/package/dist/browser/NetworkManager.js +246 -0
- package/package/dist/browser/NodeWebSocketTransport.d.ts +19 -0
- package/package/dist/browser/NodeWebSocketTransport.js +81 -0
- package/package/dist/browser/PuppeteerViewport.d.ts +5 -0
- package/package/dist/browser/PuppeteerViewport.js +2 -0
- package/package/dist/browser/ScreenshotOptions.d.ts +0 -0
- package/package/dist/browser/ScreenshotOptions.js +1 -0
- package/package/dist/browser/Target.d.ts +72 -0
- package/package/dist/browser/Target.js +161 -0
- package/package/dist/browser/TaskQueue.d.ts +20 -0
- package/package/dist/browser/TaskQueue.js +47 -0
- package/package/dist/browser/TimeoutSettings.d.ts +24 -0
- package/package/dist/browser/TimeoutSettings.js +62 -0
- package/package/dist/browser/assert.d.ts +1 -0
- package/package/dist/browser/assert.js +9 -0
- package/package/dist/browser/browser-download-progress-bar.d.ts +7 -0
- package/package/dist/browser/browser-download-progress-bar.js +31 -0
- package/package/dist/browser/devtools-commands.d.ts +274 -0
- package/package/dist/browser/devtools-commands.js +2 -0
- package/package/dist/browser/devtools-types.d.ts +1263 -0
- package/package/dist/browser/devtools-types.js +2 -0
- package/package/dist/browser/flaky-errors.d.ts +2 -0
- package/package/dist/browser/flaky-errors.js +20 -0
- package/package/dist/browser/get-download-destination.d.ts +1 -0
- package/package/dist/browser/get-download-destination.js +38 -0
- package/package/dist/browser/handle-failed-resource.d.ts +10 -0
- package/package/dist/browser/handle-failed-resource.js +21 -0
- package/package/dist/browser/mitt/index.d.ts +22 -0
- package/package/dist/browser/mitt/index.js +49 -0
- package/package/dist/browser/should-log-message.d.ts +24 -0
- package/package/dist/browser/should-log-message.js +104 -0
- package/package/dist/browser/source-map-getter.d.ts +2 -0
- package/package/dist/browser/source-map-getter.js +2 -0
- package/package/dist/browser/util.d.ts +37 -0
- package/package/dist/browser/util.js +169 -0
- package/package/dist/browser-executable.d.ts +1 -0
- package/package/dist/browser-executable.js +2 -0
- package/package/dist/browser-log.d.ts +6 -0
- package/package/dist/browser-log.js +2 -0
- package/package/dist/browser.d.ts +2 -0
- package/package/dist/browser.js +4 -0
- package/package/dist/call-ffmpeg.d.ts +22 -0
- package/package/dist/call-ffmpeg.js +53 -0
- package/package/dist/can-concat-seamlessly.d.ts +4 -0
- package/package/dist/can-concat-seamlessly.js +17 -0
- package/package/dist/can-use-parallel-encoding.d.ts +3 -0
- package/package/dist/can-use-parallel-encoding.js +19 -0
- package/package/dist/chalk/index.d.ts +55 -0
- package/package/dist/chalk/index.js +130 -0
- package/package/dist/chalk/is-color-supported.d.ts +1 -0
- package/package/dist/chalk/is-color-supported.js +55 -0
- package/package/dist/check-version-requirements.d.ts +3 -0
- package/package/dist/check-version-requirements.js +82 -0
- package/package/dist/chunk.d.ts +1 -0
- package/package/dist/chunk.js +11 -0
- package/package/dist/client.d.ts +3016 -0
- package/package/dist/client.js +57 -0
- package/package/dist/codec-supports-media.d.ts +9 -0
- package/package/dist/codec-supports-media.js +76 -0
- package/package/dist/codec.d.ts +4 -0
- package/package/dist/codec.js +17 -0
- package/package/dist/collect-assets.d.ts +7 -0
- package/package/dist/collect-assets.js +38 -0
- package/package/dist/combine-audio.d.ts +21 -0
- package/package/dist/combine-audio.js +183 -0
- package/package/dist/combine-chunks.d.ts +39 -0
- package/package/dist/combine-chunks.js +171 -0
- package/package/dist/combine-video-streams-seamlessly.d.ts +3 -0
- package/package/dist/combine-video-streams-seamlessly.js +8 -0
- package/package/dist/combine-video-streams.d.ts +17 -0
- package/package/dist/combine-video-streams.js +75 -0
- package/package/dist/compositor/compositor.d.ts +22 -0
- package/package/dist/compositor/compositor.js +182 -0
- package/package/dist/compositor/get-executable-path.d.ts +12 -0
- package/package/dist/compositor/get-executable-path.js +95 -0
- package/package/dist/compositor/get-explicit-env.d.ts +3 -0
- package/package/dist/compositor/get-explicit-env.js +13 -0
- package/package/dist/compositor/make-file-executable.d.ts +1 -0
- package/package/dist/compositor/make-file-executable.js +44 -0
- package/package/dist/compositor/make-nonce.d.ts +1 -0
- package/package/dist/compositor/make-nonce.js +8 -0
- package/package/dist/compositor/payloads.d.ts +73 -0
- package/package/dist/compositor/payloads.js +2 -0
- package/package/dist/compositor/serialize-command.d.ts +2 -0
- package/package/dist/compositor/serialize-command.js +14 -0
- package/package/dist/compress-assets.d.ts +7 -0
- package/package/dist/compress-assets.js +25 -0
- package/package/dist/compress-audio.d.ts +16 -0
- package/package/dist/compress-audio.js +44 -0
- package/package/dist/convert-number-of-gif-loops-to-ffmpeg.d.ts +1 -0
- package/package/dist/convert-number-of-gif-loops-to-ffmpeg.js +17 -0
- package/package/dist/convert-to-positive-frame-index.d.ts +4 -0
- package/package/dist/convert-to-positive-frame-index.js +8 -0
- package/package/dist/create-audio.d.ts +29 -0
- package/package/dist/create-audio.js +127 -0
- package/package/dist/create-ffmpeg-complex-filter.d.ts +10 -0
- package/package/dist/create-ffmpeg-complex-filter.js +24 -0
- package/package/dist/create-ffmpeg-merge-filter.d.ts +5 -0
- package/package/dist/create-ffmpeg-merge-filter.js +25 -0
- package/package/dist/create-silent-audio.d.ts +10 -0
- package/package/dist/create-silent-audio.js +28 -0
- package/package/dist/crf.d.ts +13 -0
- package/package/dist/crf.js +103 -0
- package/package/dist/cycle-browser-tabs.d.ts +10 -0
- package/package/dist/cycle-browser-tabs.js +50 -0
- package/package/dist/default-on-log.d.ts +2 -0
- package/package/dist/default-on-log.js +8 -0
- package/package/dist/delay-render-embedded-stack.d.ts +2 -0
- package/package/dist/delay-render-embedded-stack.js +17 -0
- package/package/dist/delete-directory.d.ts +1 -0
- package/package/dist/delete-directory.js +68 -0
- package/package/dist/ensure-browser.d.ts +24 -0
- package/package/dist/ensure-browser.js +58 -0
- package/package/dist/ensure-frames-in-order.d.ts +5 -0
- package/package/dist/ensure-frames-in-order.js +39 -0
- package/package/dist/ensure-output-directory.d.ts +1 -0
- package/package/dist/ensure-output-directory.js +17 -0
- package/package/dist/error-handling/handle-javascript-exception.d.ts +23 -0
- package/package/dist/error-handling/handle-javascript-exception.js +86 -0
- package/package/dist/error-handling/symbolicate-error.d.ts +3 -0
- package/package/dist/error-handling/symbolicate-error.js +26 -0
- package/package/dist/error-handling/symbolicateable-error.d.ts +18 -0
- package/package/dist/error-handling/symbolicateable-error.js +19 -0
- package/package/dist/error-handling.d.ts +1 -0
- package/package/dist/error-handling.js +5 -0
- package/package/dist/esm/client.mjs +3270 -0
- package/package/dist/esm/error-handling.mjs +363 -0
- package/package/dist/esm/index.mjs +23201 -0
- package/package/dist/esm/pure.mjs +526 -0
- package/package/dist/extract-audio.d.ts +7 -0
- package/package/dist/extract-audio.js +25 -0
- package/package/dist/ffmpeg-args.d.ts +21 -0
- package/package/dist/ffmpeg-args.js +96 -0
- package/package/dist/ffmpeg-filter-file.d.ts +13 -0
- package/package/dist/ffmpeg-filter-file.js +70 -0
- package/package/dist/ffmpeg-override.d.ts +4 -0
- package/package/dist/ffmpeg-override.js +2 -0
- package/package/dist/file-extensions.d.ts +14 -0
- package/package/dist/file-extensions.js +85 -0
- package/package/dist/filter-asset-types.d.ts +8 -0
- package/package/dist/filter-asset-types.js +44 -0
- package/package/dist/find-closest-package-json.d.ts +2 -0
- package/package/dist/find-closest-package-json.js +31 -0
- package/package/dist/format-logs.d.ts +3 -0
- package/package/dist/format-logs.js +214 -0
- package/package/dist/frame-range.d.ts +2 -0
- package/package/dist/frame-range.js +49 -0
- package/package/dist/get-browser-instance.d.ts +24 -0
- package/package/dist/get-browser-instance.js +63 -0
- package/package/dist/get-bundle-url-from-serve-url.d.ts +2 -0
- package/package/dist/get-bundle-url-from-serve-url.js +30 -0
- package/package/dist/get-codec-name.d.ts +21 -0
- package/package/dist/get-codec-name.js +87 -0
- package/package/dist/get-compositions.d.ts +34 -0
- package/package/dist/get-compositions.js +196 -0
- package/package/dist/get-concurrency.d.ts +1 -0
- package/package/dist/get-concurrency.js +27 -0
- package/package/dist/get-cpu-count.d.ts +2 -0
- package/package/dist/get-cpu-count.js +33 -0
- package/package/dist/get-duration-from-frame-range.d.ts +1 -0
- package/package/dist/get-duration-from-frame-range.js +17 -0
- package/package/dist/get-extension-from-codec.d.ts +6 -0
- package/package/dist/get-extension-from-codec.js +61 -0
- package/package/dist/get-extension-of-filename.d.ts +1 -0
- package/package/dist/get-extension-of-filename.js +15 -0
- package/package/dist/get-extra-frames-to-capture.d.ts +14 -0
- package/package/dist/get-extra-frames-to-capture.js +62 -0
- package/package/dist/get-frame-padded-index.d.ts +21 -0
- package/package/dist/get-frame-padded-index.js +43 -0
- package/package/dist/get-frame-to-render.d.ts +2 -0
- package/package/dist/get-frame-to-render.js +19 -0
- package/package/dist/get-local-browser-executable.d.ts +9 -0
- package/package/dist/get-local-browser-executable.js +36 -0
- package/package/dist/get-port.d.ts +15 -0
- package/package/dist/get-port.js +86 -0
- package/package/dist/get-prores-profile-name.d.ts +3 -0
- package/package/dist/get-prores-profile-name.js +25 -0
- package/package/dist/get-silent-parts.d.ts +10 -0
- package/package/dist/get-silent-parts.js +66 -0
- package/package/dist/get-video-metadata.d.ts +10 -0
- package/package/dist/get-video-metadata.js +25 -0
- package/package/dist/get-video-threads-flag.d.ts +2 -0
- package/package/dist/get-video-threads-flag.js +16 -0
- package/package/dist/goto-page-or-throw.d.ts +3 -0
- package/package/dist/goto-page-or-throw.js +16 -0
- package/package/dist/guess-extension-for-media.d.ts +9 -0
- package/package/dist/guess-extension-for-media.js +31 -0
- package/package/dist/image-format.d.ts +13 -0
- package/package/dist/image-format.js +37 -0
- package/package/dist/index.d.ts +1256 -0
- package/package/dist/index.js +227 -0
- package/package/dist/is-audio-codec.d.ts +2 -0
- package/package/dist/is-audio-codec.js +7 -0
- package/package/dist/is-delay-render-error-with-retry.d.ts +1 -0
- package/package/dist/is-delay-render-error-with-retry.js +28 -0
- package/package/dist/is-serve-url.d.ts +1 -0
- package/package/dist/is-serve-url.js +15 -0
- package/package/dist/jpeg-quality.d.ts +2 -0
- package/package/dist/jpeg-quality.js +22 -0
- package/package/dist/locks.d.ts +7 -0
- package/package/dist/locks.js +47 -0
- package/package/dist/log-level.d.ts +4 -0
- package/package/dist/log-level.js +15 -0
- package/package/dist/logger.d.ts +20 -0
- package/package/dist/logger.js +89 -0
- package/package/dist/make-cancel-signal.d.ts +14 -0
- package/package/dist/make-cancel-signal.js +48 -0
- package/package/dist/make-metadata-args.d.ts +2 -0
- package/package/dist/make-metadata-args.js +22 -0
- package/package/dist/make-page.d.ts +30 -0
- package/package/dist/make-page.js +70 -0
- package/package/dist/memory/from-docker-cgroup.d.ts +1 -0
- package/package/dist/memory/from-docker-cgroup.js +66 -0
- package/package/dist/memory/from-lambda-env.d.ts +1 -0
- package/package/dist/memory/from-lambda-env.js +10 -0
- package/package/dist/memory/from-proc-meminfo.d.ts +2 -0
- package/package/dist/memory/from-proc-meminfo.js +44 -0
- package/package/dist/memory/get-available-memory.d.ts +2 -0
- package/package/dist/memory/get-available-memory.js +44 -0
- package/package/dist/merge-audio-track.d.ts +19 -0
- package/package/dist/merge-audio-track.js +133 -0
- package/package/dist/mime-db.d.ts +6 -0
- package/package/dist/mime-db.js +8636 -0
- package/package/dist/mime-types.d.ts +3 -0
- package/package/dist/mime-types.js +94 -0
- package/package/dist/mux-video-and-audio.d.ts +15 -0
- package/package/dist/mux-video-and-audio.js +54 -0
- package/package/dist/next-frame-to-render.d.ts +11 -0
- package/package/dist/next-frame-to-render.js +41 -0
- package/package/dist/normalize-serve-url.d.ts +1 -0
- package/package/dist/normalize-serve-url.js +19 -0
- package/package/dist/offthread-video-server.d.ts +51 -0
- package/package/dist/offthread-video-server.js +217 -0
- package/package/dist/open-browser.d.ts +47 -0
- package/package/dist/open-browser.js +200 -0
- package/package/dist/options/api-key.d.ts +15 -0
- package/package/dist/options/api-key.js +29 -0
- package/package/dist/options/audio-bitrate.d.ts +18 -0
- package/package/dist/options/audio-bitrate.js +35 -0
- package/package/dist/options/audio-codec.d.ts +55 -0
- package/package/dist/options/audio-codec.js +188 -0
- package/package/dist/options/beep-on-finish.d.ts +15 -0
- package/package/dist/options/beep-on-finish.js +35 -0
- package/package/dist/options/binaries-directory.d.ts +15 -0
- package/package/dist/options/binaries-directory.js +35 -0
- package/package/dist/options/chrome-mode.d.ts +17 -0
- package/package/dist/options/chrome-mode.js +46 -0
- package/package/dist/options/color-space.d.ts +23 -0
- package/package/dist/options/color-space.js +49 -0
- package/package/dist/options/crf.d.ts +17 -0
- package/package/dist/options/crf.js +43 -0
- package/package/dist/options/cross-site-isolation.d.ts +15 -0
- package/package/dist/options/cross-site-isolation.js +29 -0
- package/package/dist/options/delete-after.d.ts +19 -0
- package/package/dist/options/delete-after.js +37 -0
- package/package/dist/options/disable-git-source.d.ts +15 -0
- package/package/dist/options/disable-git-source.js +28 -0
- package/package/dist/options/disallow-parallel-encoding.d.ts +15 -0
- package/package/dist/options/disallow-parallel-encoding.js +35 -0
- package/package/dist/options/enable-lambda-insights.d.ts +15 -0
- package/package/dist/options/enable-lambda-insights.js +35 -0
- package/package/dist/options/enable-multiprocess-on-linux.d.ts +15 -0
- package/package/dist/options/enable-multiprocess-on-linux.js +36 -0
- package/package/dist/options/encoding-buffer-size.d.ts +18 -0
- package/package/dist/options/encoding-buffer-size.js +39 -0
- package/package/dist/options/encoding-max-rate.d.ts +18 -0
- package/package/dist/options/encoding-max-rate.js +35 -0
- package/package/dist/options/enforce-audio.d.ts +18 -0
- package/package/dist/options/enforce-audio.js +36 -0
- package/package/dist/options/folder-expiry.d.ts +15 -0
- package/package/dist/options/folder-expiry.js +37 -0
- package/package/dist/options/for-seamless-aac-concatenation.d.ts +19 -0
- package/package/dist/options/for-seamless-aac-concatenation.js +40 -0
- package/package/dist/options/gl.d.ts +24 -0
- package/package/dist/options/gl.js +68 -0
- package/package/dist/options/hardware-acceleration.d.ts +18 -0
- package/package/dist/options/hardware-acceleration.js +56 -0
- package/package/dist/options/headless.d.ts +15 -0
- package/package/dist/options/headless.js +36 -0
- package/package/dist/options/image-sequence-pattern.d.ts +15 -0
- package/package/dist/options/image-sequence-pattern.js +30 -0
- package/package/dist/options/index.d.ts +747 -0
- package/package/dist/options/index.js +97 -0
- package/package/dist/options/jpeg-quality.d.ts +17 -0
- package/package/dist/options/jpeg-quality.js +47 -0
- package/package/dist/options/latency-hint.d.ts +18 -0
- package/package/dist/options/latency-hint.js +27 -0
- package/package/dist/options/log-level.d.ts +16 -0
- package/package/dist/options/log-level.js +32 -0
- package/package/dist/options/metadata.d.ts +18 -0
- package/package/dist/options/metadata.js +47 -0
- package/package/dist/options/mute.d.ts +15 -0
- package/package/dist/options/mute.js +37 -0
- package/package/dist/options/number-of-gif-loops.d.ts +19 -0
- package/package/dist/options/number-of-gif-loops.js +44 -0
- package/package/dist/options/offthreadvideo-cache-size.d.ts +20 -0
- package/package/dist/options/offthreadvideo-cache-size.js +60 -0
- package/package/dist/options/offthreadvideo-threads.d.ts +20 -0
- package/package/dist/options/offthreadvideo-threads.js +40 -0
- package/package/dist/options/on-browser-download.d.ts +22 -0
- package/package/dist/options/on-browser-download.js +19 -0
- package/package/dist/options/option.d.ts +20 -0
- package/package/dist/options/option.js +2 -0
- package/package/dist/options/options-map.d.ts +2040 -0
- package/package/dist/options/options-map.js +192 -0
- package/package/dist/options/overwrite.d.ts +15 -0
- package/package/dist/options/overwrite.js +42 -0
- package/package/dist/options/prefer-lossless.d.ts +18 -0
- package/package/dist/options/prefer-lossless.js +26 -0
- package/package/dist/options/public-dir.d.ts +18 -0
- package/package/dist/options/public-dir.js +37 -0
- package/package/dist/options/public-path.d.ts +18 -0
- package/package/dist/options/public-path.js +37 -0
- package/package/dist/options/repro.d.ts +15 -0
- package/package/dist/options/repro.js +36 -0
- package/package/dist/options/scale.d.ts +15 -0
- package/package/dist/options/scale.js +41 -0
- package/package/dist/options/separate-audio.d.ts +18 -0
- package/package/dist/options/separate-audio.js +28 -0
- package/package/dist/options/throw-if-site-exists.d.ts +15 -0
- package/package/dist/options/throw-if-site-exists.js +28 -0
- package/package/dist/options/timeout.d.ts +15 -0
- package/package/dist/options/timeout.js +44 -0
- package/package/dist/options/video-bitrate.d.ts +15 -0
- package/package/dist/options/video-bitrate.js +35 -0
- package/package/dist/options/video-cache-size.d.ts +19 -0
- package/package/dist/options/video-cache-size.js +39 -0
- package/package/dist/options/video-codec.d.ts +23 -0
- package/package/dist/options/video-codec.js +104 -0
- package/package/dist/options/webhook-custom-data.d.ts +10 -0
- package/package/dist/options/webhook-custom-data.js +21 -0
- package/package/dist/options/x264-preset.d.ts +25 -0
- package/package/dist/options/x264-preset.js +55 -0
- package/package/dist/overwrite.d.ts +1 -0
- package/package/dist/overwrite.js +4 -0
- package/package/dist/p-limit.d.ts +1 -0
- package/package/dist/p-limit.js +57 -0
- package/package/dist/parse-browser-error-stack.d.ts +7 -0
- package/package/dist/parse-browser-error-stack.js +87 -0
- package/package/dist/parse-ffmpeg-progress.d.ts +1 -0
- package/package/dist/parse-ffmpeg-progress.js +18 -0
- package/package/dist/path-normalize.d.ts +1 -0
- package/package/dist/path-normalize.js +132 -0
- package/package/dist/perf.d.ts +5 -0
- package/package/dist/perf.js +37 -0
- package/package/dist/pixel-format.d.ts +6 -0
- package/package/dist/pixel-format.js +37 -0
- package/package/dist/pool.d.ts +8 -0
- package/package/dist/pool.js +30 -0
- package/package/dist/port-config.d.ts +14 -0
- package/package/dist/port-config.js +79 -0
- package/package/dist/prepare-server.d.ts +32 -0
- package/package/dist/prepare-server.js +123 -0
- package/package/dist/preprocess-audio-track.d.ts +27 -0
- package/package/dist/preprocess-audio-track.js +82 -0
- package/package/dist/prespawn-ffmpeg.d.ts +49 -0
- package/package/dist/prespawn-ffmpeg.js +112 -0
- package/package/dist/prestitcher-memory-usage.d.ts +10 -0
- package/package/dist/prestitcher-memory-usage.js +26 -0
- package/package/dist/print-useful-error-message.d.ts +2 -0
- package/package/dist/print-useful-error-message.js +110 -0
- package/package/dist/prores-profile.d.ts +7 -0
- package/package/dist/prores-profile.js +23 -0
- package/package/dist/puppeteer-evaluate.d.ts +17 -0
- package/package/dist/puppeteer-evaluate.js +162 -0
- package/package/dist/puppeteer-screenshot.d.ts +12 -0
- package/package/dist/puppeteer-screenshot.js +58 -0
- package/package/dist/pure.d.ts +17 -0
- package/package/dist/pure.js +17 -0
- package/package/dist/redirect-status-codes.d.ts +1 -0
- package/package/dist/redirect-status-codes.js +6 -0
- package/package/dist/render-frame-and-retry-target-close.d.ts +54 -0
- package/package/dist/render-frame-and-retry-target-close.js +179 -0
- package/package/dist/render-frame-with-option-to-reject.d.ts +48 -0
- package/package/dist/render-frame-with-option-to-reject.js +156 -0
- package/package/dist/render-frame.d.ts +47 -0
- package/package/dist/render-frame.js +51 -0
- package/package/dist/render-frames.d.ts +97 -0
- package/package/dist/render-frames.js +413 -0
- package/package/dist/render-has-audio.d.ts +8 -0
- package/package/dist/render-has-audio.js +20 -0
- package/package/dist/render-media.d.ts +135 -0
- package/package/dist/render-media.js +621 -0
- package/package/dist/render-partitions.d.ts +7 -0
- package/package/dist/render-partitions.js +50 -0
- package/package/dist/render-still.d.ts +74 -0
- package/package/dist/render-still.js +356 -0
- package/package/dist/replace-browser.d.ts +7 -0
- package/package/dist/replace-browser.js +48 -0
- package/package/dist/repro.d.ts +25 -0
- package/package/dist/repro.js +184 -0
- package/package/dist/resolve-asset-src.d.ts +1 -0
- package/package/dist/resolve-asset-src.js +17 -0
- package/package/dist/sample-rate.d.ts +1 -0
- package/package/dist/sample-rate.js +4 -0
- package/package/dist/screenshot-task.d.ts +12 -0
- package/package/dist/screenshot-task.js +86 -0
- package/package/dist/seamless-aac-trim.d.ts +12 -0
- package/package/dist/seamless-aac-trim.js +24 -0
- package/package/dist/seek-to-frame.d.ts +18 -0
- package/package/dist/seek-to-frame.js +148 -0
- package/package/dist/select-composition.d.ts +45 -0
- package/package/dist/select-composition.js +219 -0
- package/package/dist/serialize-artifact.d.ts +7 -0
- package/package/dist/serialize-artifact.js +2 -0
- package/package/dist/serve-handler/index.d.ts +4 -0
- package/package/dist/serve-handler/index.js +208 -0
- package/package/dist/serve-handler/is-path-inside.d.ts +1 -0
- package/package/dist/serve-handler/is-path-inside.js +27 -0
- package/package/dist/serve-handler/range-parser.d.ts +13 -0
- package/package/dist/serve-handler/range-parser.js +57 -0
- package/package/dist/serve-static.d.ts +18 -0
- package/package/dist/serve-static.js +141 -0
- package/package/dist/set-props-and-env.d.ts +22 -0
- package/package/dist/set-props-and-env.js +219 -0
- package/package/dist/stitch-frames-to-video.d.ts +77 -0
- package/package/dist/stitch-frames-to-video.js +350 -0
- package/package/dist/stringify-ffmpeg-filter.d.ts +24 -0
- package/package/dist/stringify-ffmpeg-filter.js +140 -0
- package/package/dist/succeed-or-cancel.d.ts +6 -0
- package/package/dist/succeed-or-cancel.js +23 -0
- package/package/dist/symbolicate-stacktrace.d.ts +29 -0
- package/package/dist/symbolicate-stacktrace.js +155 -0
- package/package/dist/take-frame.d.ts +13 -0
- package/package/dist/take-frame.js +47 -0
- package/package/dist/test/actual-concurrency.test.d.ts +1 -0
- package/package/dist/test/artifacts.test.d.ts +1 -0
- package/package/dist/test/asset-calculation.test.d.ts +1 -0
- package/package/dist/test/asset-compression.test.d.ts +1 -0
- package/package/dist/test/avoid-ffmpeg-stackoverflow.test.d.ts +1 -0
- package/package/dist/test/browser-log-message.test.d.ts +1 -0
- package/package/dist/test/calculate-atempo.test.d.ts +1 -0
- package/package/dist/test/compositor-rust.test.d.ts +1 -0
- package/package/dist/test/crf.test.d.ts +1 -0
- package/package/dist/test/derive-codec-from-file-extension.test.d.ts +1 -0
- package/package/dist/test/dont-skip-assets.test.d.ts +1 -0
- package/package/dist/test/download-file.test.d.ts +1 -0
- package/package/dist/test/even-dimensions.test.d.ts +1 -0
- package/package/dist/test/extra-frames-to-capture.test.d.ts +1 -0
- package/package/dist/test/extract-audio.test.d.ts +1 -0
- package/package/dist/test/extract-frame-rust.test.d.ts +1 -0
- package/package/dist/test/ffmpeg-filters.test.d.ts +1 -0
- package/package/dist/test/ffmpeg-merge-filter.test.d.ts +1 -0
- package/package/dist/test/ffmpeg-volume-expression.test.d.ts +1 -0
- package/package/dist/test/file-extension.test.d.ts +1 -0
- package/package/dist/test/find-closest-package-json.test.d.ts +1 -0
- package/package/dist/test/flatten-volume-array.test.d.ts +1 -0
- package/package/dist/test/format-logs.test.d.ts +1 -0
- package/package/dist/test/frame-padded-index.test.d.ts +1 -0
- package/package/dist/test/frame.test.d.ts +1 -0
- package/package/dist/test/get-assets-for-markup.d.ts +8 -0
- package/package/dist/test/get-audio-channels.test.d.ts +1 -0
- package/package/dist/test/get-bundle-url-from-serve-url.test.d.ts +1 -0
- package/package/dist/test/get-silent-parts.test.d.ts +1 -0
- package/package/dist/test/guess-extension-for-media.test.d.ts +1 -0
- package/package/dist/test/handle-weird-file-names.test.d.ts +1 -0
- package/package/dist/test/log-level.test.d.ts +1 -0
- package/package/dist/test/mime-types.test.d.ts +1 -0
- package/package/dist/test/offthread-extract-url.test.d.ts +1 -0
- package/package/dist/test/parse-ffmpeg-progress.test.d.ts +1 -0
- package/package/dist/test/partitions.test.d.ts +1 -0
- package/package/dist/test/pixel-format.test.d.ts +1 -0
- package/package/dist/test/port-config.test.d.ts +1 -0
- package/package/dist/test/port-selection.test.d.ts +1 -0
- package/package/dist/test/prores-profile.test.d.ts +1 -0
- package/package/dist/test/render-still.test.d.ts +1 -0
- package/package/dist/test/rust-errors.test.d.ts +1 -0
- package/package/dist/test/rust-get-video-metadata.test.d.ts +1 -0
- package/package/dist/test/rust-memory-usage.test.d.ts +1 -0
- package/package/dist/test/sanitize-file-path.test.d.ts +1 -0
- package/package/dist/test/serve-url.test.d.ts +1 -0
- package/package/dist/test/symbolicate-remote-stack.test.d.ts +1 -0
- package/package/dist/test/validate-concurrency.test.d.ts +1 -0
- package/package/dist/test/validate-config-stitcher.test.d.ts +1 -0
- package/package/dist/test/validate-config.test.d.ts +1 -0
- package/package/dist/test/validate-even-dimensions-with-codec.test.d.ts +1 -0
- package/package/dist/test/validate-image-format.test.d.ts +1 -0
- package/package/dist/test/webpack-to-serve-url.test.d.ts +1 -0
- package/package/dist/test-gpu.d.ts +21 -0
- package/package/dist/test-gpu.js +45 -0
- package/package/dist/tmp-dir.d.ts +1 -0
- package/package/dist/tmp-dir.js +63 -0
- package/package/dist/to-megabytes.d.ts +1 -0
- package/package/dist/to-megabytes.js +7 -0
- package/package/dist/truthy.d.ts +3 -0
- package/package/dist/truthy.js +6 -0
- package/package/dist/types.d.ts +10 -0
- package/package/dist/types.js +2 -0
- package/package/dist/v5-required-input-props.d.ts +6 -0
- package/package/dist/v5-required-input-props.js +2 -0
- package/package/dist/validate-concurrency.d.ts +7 -0
- package/package/dist/validate-concurrency.js +38 -0
- package/package/dist/validate-even-dimensions-with-codec.d.ts +14 -0
- package/package/dist/validate-even-dimensions-with-codec.js +40 -0
- package/package/dist/validate-every-nth-frame.d.ts +1 -0
- package/package/dist/validate-every-nth-frame.js +24 -0
- package/package/dist/validate-ffmpeg-override.d.ts +2 -0
- package/package/dist/validate-ffmpeg-override.js +12 -0
- package/package/dist/validate-number-of-gif-loops.d.ts +2 -0
- package/package/dist/validate-number-of-gif-loops.js +24 -0
- package/package/dist/validate-output-filename.d.ts +9 -0
- package/package/dist/validate-output-filename.js +32 -0
- package/package/dist/validate-puppeteer-timeout.d.ts +1 -0
- package/package/dist/validate-puppeteer-timeout.js +25 -0
- package/package/dist/validate-scale.d.ts +1 -0
- package/package/dist/validate-scale.js +26 -0
- package/package/dist/validate-videobitrate.d.ts +1 -0
- package/package/dist/validate-videobitrate.js +20 -0
- package/package/dist/validate.d.ts +4 -0
- package/package/dist/validate.js +8 -0
- package/package/dist/wait-for-symbolication-error-to-be-done.d.ts +3 -0
- package/package/dist/wait-for-symbolication-error-to-be-done.js +8 -0
- package/package/dist/wrap-with-error-handling.d.ts +8 -0
- package/package/dist/wrap-with-error-handling.js +18 -0
- package/package/dist/ws/ws-types.d.ts +15 -0
- package/package/dist/ws/ws-types.js +8 -0
- package/package/ensure-browser.mjs +3337 -0
- package/package.json +105 -104
- package/LICENSE.md +0 -49
- package/bunfig.toml +0 -2
- package/dist/assets/change-tempo.d.ts +0 -34
- package/dist/assets/change-tempo.js +0 -287
- package/dist/assets/change-tonefrequency.d.ts +0 -2
- package/dist/assets/change-tonefrequency.js +0 -28
- package/dist/assets/resample-audiodata.d.ts +0 -6
- package/dist/assets/resample-audiodata.js +0 -54
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRealFrameRange = void 0;
|
|
4
|
+
const getRealFrameRange = (durationInFrames, frameRange) => {
|
|
5
|
+
if (frameRange === null) {
|
|
6
|
+
return [0, durationInFrames - 1];
|
|
7
|
+
}
|
|
8
|
+
if (typeof frameRange === 'number') {
|
|
9
|
+
if (frameRange < 0 || frameRange >= durationInFrames) {
|
|
10
|
+
throw new Error(`Frame number is out of range, must be between 0 and ${durationInFrames - 1} but got ${frameRange}`);
|
|
11
|
+
}
|
|
12
|
+
return [frameRange, frameRange];
|
|
13
|
+
}
|
|
14
|
+
if (frameRange[1] >= durationInFrames || frameRange[0] < 0) {
|
|
15
|
+
throw new Error(`The "durationInFrames" of the <Composition /> was evaluated to be ${durationInFrames}, but frame range ${frameRange.join('-')} is not inbetween 0-${durationInFrames - 1}`);
|
|
16
|
+
}
|
|
17
|
+
return frameRange;
|
|
18
|
+
};
|
|
19
|
+
exports.getRealFrameRange = getRealFrameRange;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BrowserExecutable } from './browser-executable';
|
|
2
|
+
import type { LogLevel } from './log-level';
|
|
3
|
+
import type { ChromeMode } from './options/chrome-mode';
|
|
4
|
+
export declare const getLocalBrowserExecutable: ({ preferredBrowserExecutable, logLevel, indent, chromeMode, }: {
|
|
5
|
+
preferredBrowserExecutable: BrowserExecutable;
|
|
6
|
+
logLevel: LogLevel;
|
|
7
|
+
indent: boolean;
|
|
8
|
+
chromeMode: ChromeMode;
|
|
9
|
+
}) => string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getLocalBrowserExecutable = void 0;
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
+
const BrowserFetcher_1 = require("./browser/BrowserFetcher");
|
|
9
|
+
const logger_1 = require("./logger");
|
|
10
|
+
const getBrowserStatus = ({ browserExecutablePath, indent, logLevel, chromeMode, }) => {
|
|
11
|
+
if (browserExecutablePath) {
|
|
12
|
+
if (!node_fs_1.default.existsSync(browserExecutablePath)) {
|
|
13
|
+
logger_1.Log.warn({ indent, logLevel }, `Browser executable was specified as '${browserExecutablePath}' but the path doesn't exist.`);
|
|
14
|
+
}
|
|
15
|
+
return { path: browserExecutablePath, type: 'user-defined-path' };
|
|
16
|
+
}
|
|
17
|
+
const revision = (0, BrowserFetcher_1.getRevisionInfo)(chromeMode);
|
|
18
|
+
if (revision.local && node_fs_1.default.existsSync(revision.executablePath)) {
|
|
19
|
+
return { path: revision.executablePath, type: 'local-puppeteer-browser' };
|
|
20
|
+
}
|
|
21
|
+
return { type: 'no-browser' };
|
|
22
|
+
};
|
|
23
|
+
const getLocalBrowserExecutable = ({ preferredBrowserExecutable, logLevel, indent, chromeMode, }) => {
|
|
24
|
+
const status = getBrowserStatus({
|
|
25
|
+
browserExecutablePath: preferredBrowserExecutable,
|
|
26
|
+
indent,
|
|
27
|
+
logLevel,
|
|
28
|
+
chromeMode,
|
|
29
|
+
});
|
|
30
|
+
if (status.type === 'no-browser') {
|
|
31
|
+
throw new TypeError('No browser found for rendering frames! Please open a GitHub issue and describe ' +
|
|
32
|
+
'how you reached this error: https://remotion.dev/issue');
|
|
33
|
+
}
|
|
34
|
+
return status.path;
|
|
35
|
+
};
|
|
36
|
+
exports.getLocalBrowserExecutable = getLocalBrowserExecutable;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type PortStatus = 'available' | 'unavailable';
|
|
2
|
+
export declare const testPortAvailableOnMultipleHosts: ({ hosts, port, }: {
|
|
3
|
+
port: number;
|
|
4
|
+
hosts: string[];
|
|
5
|
+
}) => Promise<PortStatus>;
|
|
6
|
+
export declare const getDesiredPort: ({ desiredPort, from, hostsToTry, to, }: {
|
|
7
|
+
desiredPort: number | undefined;
|
|
8
|
+
from: number;
|
|
9
|
+
to: number;
|
|
10
|
+
hostsToTry: string[];
|
|
11
|
+
}) => Promise<{
|
|
12
|
+
port: number;
|
|
13
|
+
unlockPort: () => void;
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getDesiredPort = exports.testPortAvailableOnMultipleHosts = void 0;
|
|
7
|
+
const net_1 = __importDefault(require("net"));
|
|
8
|
+
const locks_1 = require("./locks");
|
|
9
|
+
const isPortAvailableOnHost = ({ portToTry, host, }) => {
|
|
10
|
+
return new Promise((resolve) => {
|
|
11
|
+
let status = 'unavailable';
|
|
12
|
+
const socket = new net_1.default.Socket();
|
|
13
|
+
socket.on('connect', () => {
|
|
14
|
+
status = 'unavailable';
|
|
15
|
+
socket.destroy();
|
|
16
|
+
});
|
|
17
|
+
socket.setTimeout(3000);
|
|
18
|
+
socket.on('timeout', () => {
|
|
19
|
+
status = 'unavailable';
|
|
20
|
+
socket.destroy();
|
|
21
|
+
resolve(status);
|
|
22
|
+
});
|
|
23
|
+
socket.on('error', () => {
|
|
24
|
+
status = 'available';
|
|
25
|
+
});
|
|
26
|
+
socket.on('close', () => resolve(status));
|
|
27
|
+
socket.connect(portToTry, host);
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
const testPortAvailableOnMultipleHosts = async ({ hosts, port, }) => {
|
|
31
|
+
const results = await Promise.all(hosts.map((host) => {
|
|
32
|
+
return isPortAvailableOnHost({ portToTry: port, host });
|
|
33
|
+
}));
|
|
34
|
+
return results.every((r) => r === 'available') ? 'available' : 'unavailable';
|
|
35
|
+
};
|
|
36
|
+
exports.testPortAvailableOnMultipleHosts = testPortAvailableOnMultipleHosts;
|
|
37
|
+
const getPort = async ({ from, to, hostsToTest, }) => {
|
|
38
|
+
const ports = makeRange(from, to);
|
|
39
|
+
for (const port of ports) {
|
|
40
|
+
if ((await (0, exports.testPortAvailableOnMultipleHosts)({
|
|
41
|
+
port,
|
|
42
|
+
hosts: hostsToTest,
|
|
43
|
+
})) === 'available') {
|
|
44
|
+
return port;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
throw new Error('No available ports found');
|
|
48
|
+
};
|
|
49
|
+
const portLocks = (0, locks_1.createLock)({ timeout: 10000 });
|
|
50
|
+
const getDesiredPort = async ({ desiredPort, from, hostsToTry, to, }) => {
|
|
51
|
+
await portLocks.waitForAllToBeDone();
|
|
52
|
+
const lockPortSelection = portLocks.lock();
|
|
53
|
+
const unlockPort = () => portLocks.unlock(lockPortSelection);
|
|
54
|
+
if (typeof desiredPort !== 'undefined' &&
|
|
55
|
+
(await (0, exports.testPortAvailableOnMultipleHosts)({
|
|
56
|
+
port: desiredPort,
|
|
57
|
+
hosts: hostsToTry,
|
|
58
|
+
})) === 'available') {
|
|
59
|
+
return { port: desiredPort, unlockPort };
|
|
60
|
+
}
|
|
61
|
+
const actualPort = await getPort({ from, to, hostsToTest: hostsToTry });
|
|
62
|
+
// If did specify a port but did not get that one, fail hard.
|
|
63
|
+
if (desiredPort && desiredPort !== actualPort) {
|
|
64
|
+
unlockPort();
|
|
65
|
+
throw new Error(`You specified port ${desiredPort} to be used for the HTTP server, but it is not available. Choose a different port or remove the setting to let Remotion automatically select a free port.`);
|
|
66
|
+
}
|
|
67
|
+
return { port: actualPort, unlockPort };
|
|
68
|
+
};
|
|
69
|
+
exports.getDesiredPort = getDesiredPort;
|
|
70
|
+
const makeRange = (from, to) => {
|
|
71
|
+
if (!Number.isInteger(from) || !Number.isInteger(to)) {
|
|
72
|
+
throw new TypeError('`from` and `to` must be integer numbers');
|
|
73
|
+
}
|
|
74
|
+
if (from < 1024 || from > 65535) {
|
|
75
|
+
throw new RangeError('`from` must be between 1024 and 65535');
|
|
76
|
+
}
|
|
77
|
+
if (to < 1024 || to > 65536) {
|
|
78
|
+
throw new RangeError('`to` must be between 1024 and 65536');
|
|
79
|
+
}
|
|
80
|
+
if (to < from) {
|
|
81
|
+
throw new RangeError('`to` must be greater than or equal to `from`');
|
|
82
|
+
}
|
|
83
|
+
return new Array(to - from + 1).fill(true).map((_, i) => {
|
|
84
|
+
return i + from;
|
|
85
|
+
});
|
|
86
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProResProfileName = void 0;
|
|
4
|
+
const getProResProfileName = (codec, proResProfile) => {
|
|
5
|
+
if (codec !== 'prores') {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
switch (proResProfile) {
|
|
9
|
+
case '4444-xq':
|
|
10
|
+
return '5';
|
|
11
|
+
case '4444':
|
|
12
|
+
return '4';
|
|
13
|
+
case 'hq':
|
|
14
|
+
return '3';
|
|
15
|
+
case 'standard':
|
|
16
|
+
return '2';
|
|
17
|
+
case 'light':
|
|
18
|
+
return '1';
|
|
19
|
+
case 'proxy':
|
|
20
|
+
return '0';
|
|
21
|
+
default:
|
|
22
|
+
return '3';
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.getProResProfileName = getProResProfileName;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GetSilentPartsResponse, SilentPart } from './compositor/payloads';
|
|
2
|
+
import type { LogLevel } from './log-level';
|
|
3
|
+
export type { SilentPart };
|
|
4
|
+
export declare const getSilentParts: ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, binariesDirectory, }: {
|
|
5
|
+
src: string;
|
|
6
|
+
minDurationInSeconds?: number;
|
|
7
|
+
logLevel?: LogLevel;
|
|
8
|
+
noiseThresholdInDecibels?: number;
|
|
9
|
+
binariesDirectory?: string | null;
|
|
10
|
+
}) => Promise<GetSilentPartsResponse>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSilentParts = void 0;
|
|
4
|
+
const compositor_1 = require("./compositor/compositor");
|
|
5
|
+
/*
|
|
6
|
+
* @description Gets the silent parts of a video or audio in Node.js. Useful for cutting out silence from a video.
|
|
7
|
+
* @see [Documentation](https://www.remotion.dev/docs/renderer/get-silent-parts)
|
|
8
|
+
*/
|
|
9
|
+
const getSilentParts = async ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, binariesDirectory, }) => {
|
|
10
|
+
const compositor = (0, compositor_1.startLongRunningCompositor)({
|
|
11
|
+
maximumFrameCacheItemsInBytes: null,
|
|
12
|
+
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
13
|
+
indent: false,
|
|
14
|
+
binariesDirectory: binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : null,
|
|
15
|
+
extraThreads: 0,
|
|
16
|
+
});
|
|
17
|
+
const minDurationInSeconds = passedMinDuration !== null && passedMinDuration !== void 0 ? passedMinDuration : 1;
|
|
18
|
+
if (typeof minDurationInSeconds !== 'number') {
|
|
19
|
+
throw new Error(`minDurationInSeconds must be a number, but was ${minDurationInSeconds}`);
|
|
20
|
+
}
|
|
21
|
+
if (minDurationInSeconds <= 0) {
|
|
22
|
+
throw new Error(`minDurationInSeconds must be greater than 0, but was ${minDurationInSeconds}`);
|
|
23
|
+
}
|
|
24
|
+
const noiseThresholdInDecibels = passedNoiseThresholdInDecibels !== null && passedNoiseThresholdInDecibels !== void 0 ? passedNoiseThresholdInDecibels : -20;
|
|
25
|
+
if (typeof noiseThresholdInDecibels !== 'number') {
|
|
26
|
+
throw new Error(`noiseThresholdInDecibels must be a number, but was ${noiseThresholdInDecibels}`);
|
|
27
|
+
}
|
|
28
|
+
if (noiseThresholdInDecibels >= 30) {
|
|
29
|
+
throw new Error(`noiseThresholdInDecibels must be less than 30, but was ${noiseThresholdInDecibels}`);
|
|
30
|
+
}
|
|
31
|
+
const res = await compositor.executeCommand('GetSilences', {
|
|
32
|
+
src,
|
|
33
|
+
minDurationInSeconds,
|
|
34
|
+
noiseThresholdInDecibels,
|
|
35
|
+
});
|
|
36
|
+
const response = JSON.parse(new TextDecoder('utf-8').decode(res));
|
|
37
|
+
await compositor.finishCommands();
|
|
38
|
+
await compositor.waitForDone();
|
|
39
|
+
const { silentParts, durationInSeconds } = response;
|
|
40
|
+
return {
|
|
41
|
+
silentParts,
|
|
42
|
+
audibleParts: getAudibleParts({ silentParts, durationInSeconds }),
|
|
43
|
+
durationInSeconds,
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
exports.getSilentParts = getSilentParts;
|
|
47
|
+
const getAudibleParts = ({ silentParts, durationInSeconds, }) => {
|
|
48
|
+
const audibleParts = [];
|
|
49
|
+
let lastEnd = 0;
|
|
50
|
+
for (const silentPart of silentParts) {
|
|
51
|
+
if (silentPart.startInSeconds - lastEnd > 0) {
|
|
52
|
+
audibleParts.push({
|
|
53
|
+
startInSeconds: lastEnd,
|
|
54
|
+
endInSeconds: silentPart.startInSeconds,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
lastEnd = silentPart.endInSeconds;
|
|
58
|
+
}
|
|
59
|
+
if (durationInSeconds - lastEnd > 0) {
|
|
60
|
+
audibleParts.push({
|
|
61
|
+
startInSeconds: lastEnd,
|
|
62
|
+
endInSeconds: durationInSeconds,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return audibleParts;
|
|
66
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { VideoMetadata } from './compositor/payloads';
|
|
2
|
+
import type { LogLevel } from './log-level';
|
|
3
|
+
export { VideoMetadata } from './compositor/payloads';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use `parseMedia()` instead: https://www.remotion.dev/docs/media-parser/parse-media
|
|
6
|
+
*/
|
|
7
|
+
export declare const getVideoMetadata: (videoSource: string, options?: {
|
|
8
|
+
logLevel?: LogLevel;
|
|
9
|
+
binariesDirectory?: string | null;
|
|
10
|
+
}) => Promise<VideoMetadata>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getVideoMetadata = void 0;
|
|
4
|
+
const node_path_1 = require("node:path");
|
|
5
|
+
const compositor_1 = require("./compositor/compositor");
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use `parseMedia()` instead: https://www.remotion.dev/docs/media-parser/parse-media
|
|
8
|
+
*/
|
|
9
|
+
const getVideoMetadata = async (videoSource, options) => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const compositor = (0, compositor_1.startLongRunningCompositor)({
|
|
12
|
+
maximumFrameCacheItemsInBytes: null,
|
|
13
|
+
logLevel: (_a = options === null || options === void 0 ? void 0 : options.logLevel) !== null && _a !== void 0 ? _a : 'info',
|
|
14
|
+
indent: false,
|
|
15
|
+
binariesDirectory: (_b = options === null || options === void 0 ? void 0 : options.binariesDirectory) !== null && _b !== void 0 ? _b : null,
|
|
16
|
+
extraThreads: 0,
|
|
17
|
+
});
|
|
18
|
+
const metadataResponse = await compositor.executeCommand('GetVideoMetadata', {
|
|
19
|
+
src: (0, node_path_1.resolve)(process.cwd(), videoSource),
|
|
20
|
+
});
|
|
21
|
+
await compositor.finishCommands();
|
|
22
|
+
await compositor.waitForDone();
|
|
23
|
+
return JSON.parse(new TextDecoder('utf-8').decode(metadataResponse));
|
|
24
|
+
};
|
|
25
|
+
exports.getVideoMetadata = getVideoMetadata;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getIdealVideoThreadsFlag = void 0;
|
|
4
|
+
const get_cpu_count_1 = require("./get-cpu-count");
|
|
5
|
+
const get_available_memory_1 = require("./memory/get-available-memory");
|
|
6
|
+
const MEMORY_USAGE_PER_THREAD = 400000000; // 400MB
|
|
7
|
+
const RESERVED_MEMORY = 2000000000;
|
|
8
|
+
const getIdealVideoThreadsFlag = (logLevel) => {
|
|
9
|
+
const freeMemory = (0, get_available_memory_1.getAvailableMemory)(logLevel);
|
|
10
|
+
const cpus = (0, get_cpu_count_1.getCpuCount)();
|
|
11
|
+
const maxRecommendedBasedOnCpus = (cpus * 2) / 3;
|
|
12
|
+
const maxRecommendedBasedOnMemory = (freeMemory - RESERVED_MEMORY) / MEMORY_USAGE_PER_THREAD;
|
|
13
|
+
const maxRecommended = Math.min(maxRecommendedBasedOnCpus, maxRecommendedBasedOnMemory);
|
|
14
|
+
return Math.max(1, Math.round(maxRecommended));
|
|
15
|
+
};
|
|
16
|
+
exports.getIdealVideoThreadsFlag = getIdealVideoThreadsFlag;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gotoPageOrThrow = void 0;
|
|
4
|
+
const gotoPageOrThrow = async (page, urlToVisit, actualTimeout) => {
|
|
5
|
+
try {
|
|
6
|
+
const pageRes = await page.goto({ url: urlToVisit, timeout: actualTimeout });
|
|
7
|
+
if (pageRes === null) {
|
|
8
|
+
return [null, new Error(`Visited "${urlToVisit}" but got no response.`)];
|
|
9
|
+
}
|
|
10
|
+
return [pageRes, null];
|
|
11
|
+
}
|
|
12
|
+
catch (err) {
|
|
13
|
+
return [null, err];
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
exports.gotoPageOrThrow = gotoPageOrThrow;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LogLevel } from './log-level';
|
|
2
|
+
import type { CancelSignal } from './make-cancel-signal';
|
|
3
|
+
export declare const guessExtensionForVideo: ({ src, indent, logLevel, binariesDirectory, cancelSignal, }: {
|
|
4
|
+
src: string;
|
|
5
|
+
indent: boolean;
|
|
6
|
+
logLevel: LogLevel;
|
|
7
|
+
binariesDirectory: string | null;
|
|
8
|
+
cancelSignal: CancelSignal | undefined;
|
|
9
|
+
}) => Promise<"mp3" | "wav" | "mp4" | "webm">;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.guessExtensionForVideo = void 0;
|
|
4
|
+
const call_ffmpeg_1 = require("./call-ffmpeg");
|
|
5
|
+
const guessExtensionForVideo = async ({ src, indent, logLevel, binariesDirectory, cancelSignal, }) => {
|
|
6
|
+
const { stderr } = await (0, call_ffmpeg_1.callFf)({
|
|
7
|
+
bin: 'ffprobe',
|
|
8
|
+
args: [src],
|
|
9
|
+
indent,
|
|
10
|
+
logLevel,
|
|
11
|
+
binariesDirectory,
|
|
12
|
+
cancelSignal,
|
|
13
|
+
});
|
|
14
|
+
if (stderr.includes('Audio: mp3,')) {
|
|
15
|
+
return 'mp3';
|
|
16
|
+
}
|
|
17
|
+
if (stderr.includes('Video: vp9')) {
|
|
18
|
+
return 'webm';
|
|
19
|
+
}
|
|
20
|
+
if (stderr.includes('Video: vp8')) {
|
|
21
|
+
return 'webm';
|
|
22
|
+
}
|
|
23
|
+
if (stderr.includes('wav, ')) {
|
|
24
|
+
return 'wav';
|
|
25
|
+
}
|
|
26
|
+
if (stderr.includes('Video: h264')) {
|
|
27
|
+
return 'mp4';
|
|
28
|
+
}
|
|
29
|
+
throw new Error(`The media file "${src}" has no file extension and the format could not be guessed. Tips: a) Ensure this is a valid video or audio file b) Add a file extension to the URL like ".mp4" c) Set a "Content-Type" or "Content-Disposition" header if possible.`);
|
|
30
|
+
};
|
|
31
|
+
exports.guessExtensionForVideo = guessExtensionForVideo;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PixelFormat } from './pixel-format';
|
|
2
|
+
export declare const validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
3
|
+
export declare const validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
4
|
+
export type VideoImageFormat = (typeof validVideoImageFormats)[number];
|
|
5
|
+
export type StillImageFormat = (typeof validStillImageFormats)[number];
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use VideoImageFormat or StillImageFormat instead
|
|
8
|
+
*/
|
|
9
|
+
export type ImageFormat = 'This type is deprecated, use VideoImageFormat or StillImageFormat instead';
|
|
10
|
+
export declare const DEFAULT_VIDEO_IMAGE_FORMAT: VideoImageFormat;
|
|
11
|
+
export declare const DEFAULT_STILL_IMAGE_FORMAT: StillImageFormat;
|
|
12
|
+
export declare const validateSelectedPixelFormatAndImageFormatCombination: (pixelFormat: PixelFormat | undefined, videoImageFormat: VideoImageFormat) => "none" | "valid";
|
|
13
|
+
export declare const validateStillImageFormat: (imageFormat: StillImageFormat) => void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Keeping the default image format PNG if you don't pass a
|
|
3
|
+
// value to the renderer for backwards compatibility.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.validateStillImageFormat = exports.validateSelectedPixelFormatAndImageFormatCombination = exports.DEFAULT_STILL_IMAGE_FORMAT = exports.DEFAULT_VIDEO_IMAGE_FORMAT = exports.validStillImageFormats = exports.validVideoImageFormats = void 0;
|
|
6
|
+
exports.validVideoImageFormats = ['png', 'jpeg', 'none'];
|
|
7
|
+
exports.validStillImageFormats = ['png', 'jpeg', 'pdf', 'webp'];
|
|
8
|
+
exports.DEFAULT_VIDEO_IMAGE_FORMAT = 'jpeg';
|
|
9
|
+
exports.DEFAULT_STILL_IMAGE_FORMAT = 'png';
|
|
10
|
+
// By returning a value, we improve testability as we can specifically test certain branches
|
|
11
|
+
const validateSelectedPixelFormatAndImageFormatCombination = (pixelFormat, videoImageFormat) => {
|
|
12
|
+
if (videoImageFormat === 'none') {
|
|
13
|
+
return 'none';
|
|
14
|
+
}
|
|
15
|
+
if (typeof pixelFormat === 'undefined') {
|
|
16
|
+
return 'valid';
|
|
17
|
+
}
|
|
18
|
+
if (!exports.validVideoImageFormats.includes(videoImageFormat)) {
|
|
19
|
+
throw new TypeError(`Value ${videoImageFormat} is not valid as an image format.`);
|
|
20
|
+
}
|
|
21
|
+
if (pixelFormat !== 'yuva420p' && pixelFormat !== 'yuva444p10le') {
|
|
22
|
+
return 'valid';
|
|
23
|
+
}
|
|
24
|
+
if (videoImageFormat !== 'png') {
|
|
25
|
+
throw new TypeError(`Pixel format was set to '${pixelFormat}' but the image format is not PNG. To render transparent videos, you need to set PNG as the image format.`);
|
|
26
|
+
}
|
|
27
|
+
return 'valid';
|
|
28
|
+
};
|
|
29
|
+
exports.validateSelectedPixelFormatAndImageFormatCombination = validateSelectedPixelFormatAndImageFormatCombination;
|
|
30
|
+
const validateStillImageFormat = (imageFormat) => {
|
|
31
|
+
if (!exports.validStillImageFormats.includes(imageFormat)) {
|
|
32
|
+
throw new TypeError(String(`Image format should be one of: ${exports.validStillImageFormats
|
|
33
|
+
.map((v) => `"${v}"`)
|
|
34
|
+
.join(', ')}`));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.validateStillImageFormat = validateStillImageFormat;
|