npx remotion lambda compositions
从 v3.3.2 版本开始可用。
从 Lambda 函数内部获取的 serve URL 打印出组合 ID 列表。
API
bash
npx remotion lambda compositions <serve-url>
bash
npx remotion lambda compositions <serve-url>
- 使用
sites create
命令获取 Serve URL,或通过调用deploySite()
获取。
显示输出
looped 60 1080x1080 200 (3.33 sec)
cancel-render 30 920x720 100 (3.33 sec)
iframe 30 1080x1080 10 (0.33 sec)
stagger-test 30 1280x720 100 (3.33 sec)
freeze-example 30 1280x720 300 (10.00 sec)
base-spring 30 1080x1080 100 (3.33 sec)
spring-with-duration 30 1080x1080 100 (3.33 sec)
missing-img 30 1080x1080 10 (0.33 sec)
ten-frame-tester 30 1080x1080 10 (0.33 sec)
framer 30 1080x1080 100 (3.33 sec)
skip-zero-frame 30 1280x720 100 (3.33 sec)
scripts 30 1280x720 100 (3.33 sec)
many-audio 30 1280x720 30 (1.00 sec)
error-on-frame-10 30 1280x720 1000000 (33333.33 sec)
wrapped-in-context 1280x720 Still
drop-dots 30 1080x1080 5400 (180.00 sec)
remotion lambda compositions
vs. remotion compositions
您还可以使用 npx remotion compositions
本地获取托管在 S3 上的站点的组合。
反之,您也可以使用 npx remotion lambda compositions
从未托管在 AWS Lambda 上的 Serve URL 获取组合。
如果机器无法运行 Chrome,则应使用 npx remotion lambda compositions
,而无法使用 npx remotion compositions
。
标志
--props
传递给视频所选组合的输入 Props。。
必须是序列化的 JSON 字符串 (--props='{"hello": "world"}'
) 或 JSON 文件的路径 (./path/to/props.json
)。
从根组件中,可以使用 getInputProps()
读取 props。
您可以使用 calculateMetadata()
转换输入 props。
--config
指定 Remotion 配置文件的位置。
--env-file
指定 dotenv 文件的位置 - 默认为 .env
。了解 Remotion 中环境变量的工作原理。
--log
设置日志级别。增加或减少输出量。可接受的值:error
、warn
、info
(默认)、verbose
如果您不想每次都传递命令行标志,请考虑创建一个 remotion.config.ts
配置文件。
--timeout
定义在毫秒内解析所有 delayRender()
调用之前,组合获取超时的时间。默认值:30000
。
不要与部署 Lambda 函数时的 --timeout
标志 混淆。
--ignore-certificate-errors
导致 Chrome 中无效的 SSL 证书(如自签名证书)被忽略。
--disable-web-security
这将主要在 Chrome 中禁用 CORS 等安全功能。
--disable-headless
打开一个实际的浏览器来观察组合获取。
--quiet
, --q
仅打印由空格分隔的组合 ID。
--force-bucket-name
v3.3.42
指定要使用的特定存储桶名称。不建议这样做,而是让 Remotion 自动发现正确的存储桶。
--user-agent
v3.3.83
允许您设置 headless Chrome 浏览器所假定的自定义用户代理。
--offthreadvideo-cache-size-in-bytes
v4.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
--force-path-style
v4.0.202
将 forcePathStyle
传递给 AWS S3 客户端。如果您不知道这是什么,那么您可能不需要它。
另请参阅
Please paste the Markdown content you would like me to translate into Chinese.