Remotion Lambda 多少钱?
此页面显示估算,以帮助你更好地预期 Remotion Lambda 的费用。
所有渲染均使用以下 Lambda 配置进行:
🌐 This page shows estimations to help you better expect how much Remotion Lambda will cost.
All renders are done with the following Lambda configuration:
- 2048 MB 内存(默认)
- 10GB 磁盘大小(Remotion 5.0 默认值)
- 默认 并发
us-east-1区域- Remotion 版本 4.0.381
价格也可能因地区、你的封装重量以及延迟波动而有所不同。 我们始终建议你自己测量组合的费用。
🌐 Prices may also vary based on the region, heaviness of your bundle, fluctuations in latency.
We always recommend to measure the cost of your composition yourself.
渲染 Hello World 项目
🌐 Rendering the Hello World project
呈现我们默认模板的 HelloWorld 组成。
🌐 Rendering the HelloWorld composition of our default template.
热启动 Lambda:$0.001,7.56秒
冷启动 Lambda:$0.001,11.02秒
在同一个 S3 存储桶中渲染 1 分钟的视频
🌐 Rendering a 1 minute Video in the same S3 bucket
OffthreadRemoteVideo.tsximportReact from 'react'; import {Video } from '@remotion/media'; import {CalculateMetadataFunction ,Composition ,staticFile } from 'remotion'; // https://www.remotion.dev/docs/mediabunny/metadata import {getMediaMetadata } from './get-media-metadata'; constsrc =staticFile ('bigbuckbunny.mp4'); export constcalculateMetadataFn :CalculateMetadataFunction <Record <string, unknown>> = async () => { const {durationInSeconds ,dimensions ,fps } = awaitgetMediaMetadata (src ); return {durationInFrames :Math .round (durationInSeconds *fps !), // 1440fps :fps !,width :dimensions !.width ,height :dimensions !.height , }; }; export constComponent = () => { return <Video src ={src } />; }; export constVideoFromFileComp = () => { return <Composition component ={Component }id ="VideoFromFile"calculateMetadata ={calculateMetadataFn } />; }; // In Root.tsx: // <VideoFromFileComp />
这是 使用的视频文件。
Warm Lambda:$0.017,18.91秒 Cold Lambda:$0.021,15.52秒
在你的视频中渲染视频会显著增加成本。
🌐 Rendering a video inside your video increases the cost significantly.
渲染一段10分钟的远程高清视频
🌐 Rendering a 10 minute Remote HD Video
OffthreadRemoteVideo.tsximportReact from 'react'; import {Video } from '@remotion/media'; import {CalculateMetadataFunction ,Composition } from 'remotion'; // https://www.remotion.dev/docs/mediabunny/metadata import {getMediaMetadata } from './get-media-metadata'; constsrc = 'https://remotion.media/BigBuckBunny.mp4'; export constcalculateMetadataFn :CalculateMetadataFunction <Record <string, unknown>> = async () => { const {durationInSeconds ,dimensions ,fps } = awaitgetMediaMetadata (src ); return {durationInFrames :Math .round (durationInSeconds *fps !), // 14315fps :fps !,width :dimensions !.width ,height :dimensions !.height , }; }; export constComponent = () => { return <Video src ={src } />; }; export constNewVideoComp = () => { return <Composition component ={Component }id ="NewVideo"calculateMetadata ={calculateMetadataFn } />; }; // In Root.tsx: // <NewVideoComp />
冷启动 Lambda:$0.108,60.98秒
热启动 Lambda:$0.103,56.09秒
渲染10秒远程4K视频
🌐 Rendering a 10 second Remote 4K Video
OffthreadRemoteVideo.tsximportReact from 'react'; import {Video } from '@remotion/media'; import {CalculateMetadataFunction ,Composition } from 'remotion'; // https://www.remotion.dev/docs/mediabunny/metadata import {getMediaMetadata } from './get-media-metadata'; constsrc = 'https://videos.pexels.com/video-files/5530402/5530402-uhd_3840_2160_25fps.mp4'; export constcalculateMetadataFn :CalculateMetadataFunction <Record <string, unknown>> = async () => { const {durationInSeconds ,dimensions ,fps } = awaitgetMediaMetadata (src ); return {durationInFrames :Math .round (durationInSeconds *fps !),fps :fps !,width :dimensions !.width ,height :dimensions !.height , }; }; export constComponent = () => { return <Video src ={src } />; }; export constNewVideoComp = () => { return <Composition component ={Component }id ="NewVideo"calculateMetadata ={calculateMetadataFn } />; }; // In Root.tsx: // <NewVideoComp />
冷启动 Lambda:$0.014,53.09秒
热启动 Lambda:$0.013,45.28秒
将分辨率提高到4K确实会显著增加渲染时间,因此增加成本。
🌐 Increasing the resolution to 4K does significantly increase the time to render and therefore the cost.
额外费用
🌐 Additional cost
上面的计算仅考虑了 Lambda 计算成本。 这通常是费用的大部分。 但是,你还会产生以下额外费用:
🌐 The calculation above only factors in Lambda computation cost.
This is usually the majority of the cost.
However, you also incur additional cost for:
- 带宽:拉取资源始终通过 HTTP 进行,并会产生 S3 出口费用。
- 存储:将网站和渲染内容存储在 S3 中会产生 S3 存储费用。
- CloudWatch 日志:渲染默认记录到 CloudWatch。
- Remotion 许可:4 人及以上的团队除了 AWS 费用外,还需要获得 Remotion 公司许可。
另请参阅
🌐 See also