npx remotion lambda 组合
从 Lambda 函数内部获取的服务器 URL 打印组成 ID 列表。
🌐 Print list of composition IDs from a serve URL, fetched from inside a Lambda function.
应用编程接口
🌐 API
npx remotion lambda compositions <serve-url>- 使用
sites create命令或通过调用deploySite()获取 Serve URL。
显示输出
循环 60 1080x1080 200 (3.33 秒)
取消渲染 30 920x720 100 (3.33 秒)
iframe 30 1080x1080 10 (0.33 秒)
错开测试 30 1280x720 100 (3.33 秒)
冻结示例 30 1280x720 300 (10.00 秒)
基础弹簧 30 1080x1080 100 (3.33 秒)
带持续时间的弹簧 30 1080x1080 100 (3.33 秒)
缺失图片 30 1080x1080 10 (0.33 秒)
十帧测试器 30 1080x1080 10 (0.33 秒)
Framer 30 1080x1080 100 (3.33 秒)
跳过零帧 30 1280x720 100 (3.33 秒)
脚本 30 1280x720 100 (3.33 秒)
多音频 30 1280x720 30 (1.00 秒)
帧 10 出错 30 1280x720 1000000 (33333.33 秒)
上下文封装 1280x720 静止
丢点 30 1080x1080 5400 (180.00 秒)
remotion lambda compositions 对比 remotion compositions
🌐 remotion lambda compositions vs. remotion compositions
你也可以使用 npx remotion compositions 在本地获取托管在 S3 上的网站的构成。
反之,你也可以使用 npx remotion lambda compositions 从不托管在 AWS Lambda 上的 Serve URL 获取构成。
🌐 You can also get the compositions of a site that is hosted on S3 locally using npx remotion compositions.
Vice versa, you can also get the compositions from a Serve URL that is not hosted on AWS Lambda using npx remotion lambda compositions.
如果机器无法运行 Chrome,你应该使用 npx remotion lambda compositions,而不是 npx remotion compositions。
🌐 You should use npx remotion lambda compositions if you cannot use npx remotion compositions because the machine cannot run Chrome.
标志
🌐 Flags
--props
Input Props to pass to the selected composition of your video. Must be a serialized JSON string (--props='{"hello": "world"}') or a path to a JSON file (./path/to/props.json).
Windows 终端不支持内联 JSON 字符串,因为它会移除 " 字符,请改用文件名。
--config
Specify a location for the Remotion config file.
--env-file
Specify a location for a dotenv file. Default .env.
--log
设置日志级别。增加或减少输出量。可接受的值:error、warn、info(默认)、verbose
如果你不想每次都传递命令行标志,可以考虑创建一个 remotion.config.ts 配置文件。
--timeout
定义在组合获取超时(以毫秒为单位)之前,解决所有 delayRender() 调用可能需要的时间。默认值:30000。
🌐 Define how long it may take to resolve all delayRender() calls before the composition fetching times out in milliseconds. Default: 30000.
不要将其与部署 Lambda 函数时的 --timeout 标志 混淆。
--ignore-certificate-errors
导致 Chrome 中的无效 SSL 证书(例如自签名证书)被忽略。
🌐 Results in invalid SSL certificates in Chrome, such as self-signed ones, being ignored.
--disable-web-security
这将最显著地禁用 Chrome 中的 CORS 以及其他安全功能。
🌐 This will most notably disable CORS in Chrome among other security features.
--dark-modev4.0.381
Whether Chromium should pretend to be in dark mode by emulating the media feature 'prefers-color-scheme: dark'. Default is false.
--disable-headless
Deprecated - will be removed in 5.0.0. With the migration to Chrome Headless Shell, this option is not functional anymore.--disable-headlessIf disabled, the render will open an actual Chrome window where you can see the render happen. The default is headless mode.
--quiet, --q
仅打印组成 ID,用空格分隔。
🌐 Only prints the composition IDs, separated by a space.
--force-bucket-namev3.3.42
指定要使用的特定存储桶名称。这不推荐,最好让 Remotion 自动发现正确的存储桶。
🌐 Specify a specific bucket name to be used. This is not recommended, instead let Remotion discover the right bucket automatically.
--user-agentv3.3.83
允许你设置 headless Chrome 浏览器使用的自定义用户代理。
🌐 Lets you set a custom user agent that the headless Chrome browser assumes.
--media-cache-size-in-bytesv4.0.352
Specify the maximum size of the cache that <Video> and <Audio> from @remotion/media may use combined, in bytes. The default is half of the available system memory when the render starts.
--offthreadvideo-cache-size-in-bytesv4.0.23
From v4.0, Remotion has a cache for <OffthreadVideo> frames. The default is null, corresponding to half of the system memory available when the render starts.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.
The used value will be printed when running in verbose mode.
Default:
null
--offthreadvideo-video-threadsv4.0.261
The number of threads that<OffthreadVideo> can start to extract frames. The default is 2. Increase carefully, as too many threads may cause instability.
--force-path-stylev4.0.202
将 forcePathStyle 传递给 AWS S3 客户端。如果你不知道这是什么,你很可能用不到它。
🌐 Passes forcePathStyle to the AWS S3 client. If you don't know what this is, you probably don't need it.
另请参阅
🌐 See also