This topic explains how to calculate usage and select a billing method to help you save on costs.
Background
Alex is an entrepreneur in Hangzhou who leads a team that developed a live streaming social application. Each day, 100 streamers go live on the application. All streamers broadcast simultaneously for one hour, and each stream has an average of 1,000 viewers.
Alex chooses the pay-by-traffic billing method.
The time shifting feature is enabled for each live stream. The time shifting period is set to one day.
Streamers broadcast from different devices, such as mobile phones and PCs. However, all viewers watch on the mobile application. To ensure consistent video quality, each video stream must be transcoded to the standard H.264 format at 1080p.
To ensure content security, the automated review feature is enabled for each live stream. This includes pornography detection and terrorist content review. The snapshot interval for review is 5 seconds. Snapshots are stored in Object Storage Service (OSS) and deleted after two days.
To allow users to watch replays, the live recording feature is also enabled. Streams are recorded and encapsulated into both MP4 and FLV files. The files are stored in OSS.
Based on this scenario, Alex will use the following ApsaraVideo Live features: live stream traffic, time shifting, live stream transcoding, live stream snapshots, automated review, live stream recording, and live stream storage.
Usage calculation
Billable item | Data | Quantity | Usage calculation |
Live stream traffic | Number of concurrent ingest streams | 100 |
|
Number of concurrent viewers per stream | 1,000 | ||
Duration of each stream (hours) | 1 | ||
Video bitrate after transcoding (Mbps) | 0.5 | ||
Video bitrate before transcoding (Mbps) | 1 | ||
Time shifting | Duration of each stream (hours) | 1 | Daily time shifting data written: 100 (streams) × 0.5 (video bitrate in Mbps) × 3,600 (viewing time in seconds) ÷ 1,024 ÷ 8 (to convert Mbps to GB) = 21.97 GB |
Number of concurrent ingest streams | 100 | ||
Video bitrate after transcoding (Mbps) | 0.5 | ||
Live stream transcoding | Number of streams to transcode | 100 | Daily transcoding length: 100 (streams) × 60 (minutes) = 6,000 minutes |
Duration of each stream (hours) | 1 | ||
Live stream snapshots | Number of streams for review | 100 | Number of snapshots generated per day: 100 (streams) × 3,600 (stream duration in seconds) ÷ 5 = 72,000 snapshots |
Duration of each stream (hours) | 1 | ||
Snapshot interval for review (seconds) | 5 | ||
Automated review | Number of snapshots for review | 72,000 | Number of snapshots reviewed for pornography and terrorist content per day: 72,000 (snapshots) × 2 (items) = 144,000 snapshots |
Number of review items | 2 | ||
Live stream recording | Number of concurrent recording ingest endpoints | 100 |
|
Duration of each stream (hours) | 1 | ||
Storage | Video storage | 87.90 GB/day |
Total daily storage: 43.95 GB + 43.95 GB = 87.90 GB Note The recorded videos are the original ingested streams, not the transcoded streams. |
Snapshot storage | Assuming each of the 72,000 snapshots is 0.5 MB | 35.16 GB/day |
Cost calculation
The following unit prices are based on the ApsaraVideo Live pricing information from the official Alibaba Cloud website as of January 1, 2021. For the latest unit prices, see the ApsaraVideo Live Pricing page.
Billable item | Billable metric | Usage | Daily cost (Example: Day 1 of the month) |
Live stream traffic | Downstream traffic | 21.46 TB/day | Traffic is billed based on a tiered pricing model. The usage is accumulated and billed progressively over a calendar month. For more information about the billing rules, see Pay-by-traffic. 10 TB × USD 0.042/GB + 11.46 TB × USD 0.04/GB = USD 899.48 |
Time shifting | Time shifting data written | 21.97 GB/day | Billing is based on the time shifting specifications and the amount of data written. For more information about the billing rules, see Time shifting costs. 21.97 GB × USD 0.039/GB = USD 0.85 |
Live stream transcoding | Transcoding length | 6,000 minutes/day | Billing is based on the transcoding standard, resolution, and total transcoding length. For more information about the billing rules, see Live stream transcoding costs. 6,000 minutes × USD 0.0099/minute = USD 59.4 |
Live stream snapshots | Number of snapshots | 72,000 snapshots/day | Billing is based on the number of snapshots. For more information about the billing rules, see Live stream snapshot costs. 72 thousand snapshots × USD 0.015/thousand snapshots = USD 1.08 |
Automated review | Number of reviewed images | 144,000 images/day | Billing is based on the number of images scanned by the review service. For more information about the billing rules, see Automated review costs. Assuming all are confirmed by the algorithm: 144 thousand images × USD 0.223/thousand images = USD 32.11 |
Live stream recording | Peak number of concurrent recording ingest endpoints per month | 100 ingest endpoints/month | Monthly recording service fee: 100 ingest endpoints/month × USD 4.5/ingest endpoint = USD 450/month |
Recording length | 12,000 minutes/day | Recording and container format conversion fee: Billed by recording length. For more information about the billing rules, see Live stream recording costs. 12,000 minutes × USD 0.0025/minute = USD 30 | |
Storage | Video storage | 87.90 GB/day; 2,637 GB/month. | For information about storage billing, see Storage costs. If you choose standard locally redundant storage, the estimated monthly cost is: (2,637 + 70.32) GB × USD 0.017/GB/month = USD 46.2/month |
Snapshot storage | 35.16 GB/day; If snapshots are stored for only two days, they occupy 70.32 GB. |
Summary
Alex will receive two types of bills: monthly and daily.
Monthly bills are generated and charged at the end of each month:
The monthly cost includes USD 46.2 for storage and USD 450 for the monthly recording service.
Daily bills are generated and charged at the end of each day:
The daily costs include USD 899.48 for live stream traffic, USD 0.85 for time shifting, USD 59.4 for live stream transcoding, USD 1.08 for snapshots for automated review, USD 32.11 for automated review, and USD 30 for recording and container format conversion.
For users such as Alex with stable business needs:
You can choose resource plans and storage plans to significantly reduce costs. The more resource plans you purchase, the greater the discount.
You can also consider combining subscription resource plans with the pay-as-you-go method to maximize resource utilization and minimize costs.