If you’re an engineer at a company in charge of live streaming, you’re likely facing the daunting task of managing live video transcoding for millions of users. You need to ensure that every viewer, even those with a poor internet connection quality, receives a seamless streaming experience.
This means you need to generate multiple bitrate streams, which involves encoding the same content at different quality levels. You also need to navigate differing compliance standards. Ensuring that your streams adhere to content licensing agreements and copyright law involves securing the necessary rights and permissions, implementing digital Rights Management (DRM) to prevent unauthorized access, and adhering to Geographic restrictions. Additionally, data protection regulators like GDPR in Europe and CCPA in the United States require you to implement stringent data protection measurements, obtain user consent, and ensure the secure handling of personal data.
Then there’s the issue of egress costs. After transcoding the live video in real time, you need to deliver these streams to viewers’ devices. This involves transferring data from transcoding servers to Content Delivery Networks (CDNs), which incurs significant egress costs. Balancing these costs while maintaining a high-quality streaming experience is a constant challenge.
Navigating these challenges requires a robust, scalable, and cost-effective solution. That’s where Akamai’s cloud-based transcoding services come in, dynamically scaling to meet the demand of fluctuating audience size and ensure seamless delivery of live content globally.
Using Akamai Cloud Computing
Let’s look at a real world issue faced by a company dealing with massive growth in live video streaming. This company, experiencing triple growth in traffic across North America and Europe, found themselves at a critical juncture. Their on-prem data centers struggled with the sudden spikes in viewership and the growing demand for seamless live streaming. High egress costs and the unpredictable nature of internet traffic made further investment in their on-prem infrastructure a risky proposition.
The existing infrastructure, with its limited capability and scalability, couldn’t keep up with the performance demands. Virtual Machines (VMs) were unable to transcode videos quickly enough, leading to bottlenecks and a sub-par viewing experience during peak times. The company needed a solution that could dynamically scale with their traffic, ensuring high quality live streams without incurring exorbitant costs.
Faced with these challenges, they turned to Akamai to scale their live transcoding capability and support their global traffic growth. Akamai’s cloud-based services provided the scalability and efficiency needed to meet their demands.
Let’s explore how we architected a robust live video transcoding solution to address those needs.
We architected this solution to optimize the three parts of live video transcoding:
- Ingestion
- Transcoding
- Distribution
First, the video content is ingested, then it’s processed and goes through the transcoding process, and then it’s delivered to end users.
Step 1: Ingestion
When the social media influencer hits “Go Live” on their social media platform, a few things happen at the same time behind the scenes. First, the live feed from the publisher is sent to the partner’s ingest infrastructure in the same region. This infrastructure is responsible for receiving the live stream, ensuring it is captured correctly, and preparing it for further processing. The ingestion process then takes one of two paths: either it is already in a format compatible with the input requirements and can bypass transcoding and will be directly sent to the CDN for distribution, or it will undergo transcoding and then be distributed.
If the original video stream captured from the event is already in a suitable format for online streaming, like H.264 or HEVC, then you can send this video directly to the CDN for distribution. Instead of taking the extra step to transcode the video into another format, such as for adaptive bitrate streaming or different device compatibility, you choose to bypass transcoding altogether. So, the original video stream, in its native format, is sent directly to the Akamai CDN for distribution. By skipping the transcoding step for this one format, you save processing time and resources, leading to faster delivery of the video to your audience.
Step 2: Transcoding
When the original video stream requires transcoding, it’s directed to the nearest Akamai data center, utilizing Akamai’s widespread global infrastructure. This strategy ensures that transcoding occurs in proximity to end users, effectively reducing latency. To facilitate transcoding, dedicated VM instances are dynamically provisioned based on traffic demands. This solves the scalability and resource optimization challenge that many companies face in transcoding video streams for live streaming.
By dynamically provisioning VM instances based on traffic demands, we are able to right-size the computational resources for handling transcoding tasks efficiently during peak usage periods. You don’t need to worry if you over or under-provision resources here. Without this dynamic provisioning mechanism, transcoding tasks might overwhelm the available resources, leading to delays, degraded performance, or even system failures during times of high traffic. By scaling resources up or down in response to demand, the system can maintain performance and optimize video streaming experiences for users, regardless of fluctuations in viewer numbers or streaming demands.
Additionally, each VM is equipped with block storage to temporarily store the raw video files. Once transcoded, the resulting videos, derived from the single original raw stream, are stored in an object storage bucket.
Step 3: Content Delivery
Then the videos are transcoded into different outputs and distributed globally via the CDN, and to different regions around the world. These could be different resolution outputs (1080p, 720p), or different bitrate outputs, or special formats like HDR. An added bonus is that if you transcode your videos with Akamai, you’ll get a very competitive egress cost. If it is being transferred to another CDN, there is a small cost, but much lower than other CDN providers.
Benefits of using Akamai for Social Media Live Streaming
There are many reasons to use Akamai for live streaming. Let’s take a look at some of them. First, if you transcode your videos with Akamai, and you transfer them to the Akamai CDN, you get very competitive egress fees relative to hyperscaler cloud providers. If it is being transferred to another CDN, there is a small cost, though generally at lower rates when compared to other CDN providers.
We also have core compute regions close to users around the globe. Live streaming requires local infrastructure near to the users for real time streaming, meaning the transcoding cluster needs to be much closer to the end user who will be watching the video. The closer to the end user (viewer), the lower the latency.
When you do live video transcoding with Akamai, you need to be able to scale the number of VMs up and down based on traffic. Encoders for live events can be spun up and then down when the event is over. This feature helps handle peak loads without sacrificing video quality or experiencing buffering issues.
Akamai also enhances resource efficiency for live video transcoding. Traditional methods of transcoding involve maintaining a fixed number of encoders regardless of traffic. This can lead to underutilization during periods of low demand and overloading during peak times. By dynamically spinning up encoders when needed and spinning them down when the event is over, you can optimize resource usage and reduce costs. This strategy promotes a great cost-to-performance ratio, especially when comparing us to other cloud providers, and we could transcode the same number of streams per VM.
Cost Analysis of Live Video Transcoding on Akamai
This social media company was considering AWS as well as Akamai for their live video transcoding. To do our cost analysis, let’s assume the following. Let’s assume you need 24 VMs, that each produce 4 streams. In the following table, we’ll compare one month of expenses using Akamai’s dedicated 64 GB 32 CPU Instances vs. AWS’s c6a.8xlarge instances.
Two major costs to consider are compute and egress. The compute cost is the instance cost per month * the number of instances. The egress cost calculation will convert aggregate egress into GB/hr. The aggregate egress bandwidth per channel is the bandwidth when all bitrates in their bitrate ladder are added together. 10Mbps is a safe number for a standard HD channel with 4Mbps, 3Mbps, 2Mbps, 1Mbps (4+3+2+1=10).
Compute Cost | Egress Cost* | Total Cost | |
Akamai | $576 Instance Cost/month * 24 instances = $13,824/month | $542.40/month | $14,366.40/month |
AWS | $982.87 Instance cost/month * 24 instances = $23,588.88/month | $27,717.19/month | $51,306.07/month |
Figures sourced on May 24, 2024
Let’s calculate the egress cost for Akamai. Each VM includes 8TB of egress, pooled together. Each channel uses 10Mbps, which equals 3.13TB/month (730 hours). Each VM has 4 channels, totaling 4 * 3.13TB = 12.52TB per VM. With 8TB included, the overage per VM is 12.52TB – 8TB = 4.52TB (or 4520GB). The overage cost is $0.005 per GB, so the cost per VM is 4520GB * $0.005/GB = $22.60. There are 24 VMs, so the total egress included is 24 * 8TB = 192TB (or 192,000GB). There are 96 channels, which totals 96 * 3.13TB = 300.48TB (or 300,480GB). Subtract the pooled included egress from the total: 300,480GB – 192,000GB = 108,480GB of overage. Multiply the overage by the egress rate: 108,480GB * $0.005/GB = $542.40. So, the total egress cost for Akamai is $542.40.
There are a few key differences here.
- Compute costs are lower at Akamai because the instance cost per month is much less. ($14,366 vs. $17.046.43)
- Akamai has significantly lower egress costs compared to AWS ($542 monthly vs. $27,717 monthly).
When you choose Akamai for your live video transcoding vs. AWS, you could save $36,939.67 monthly! This cost saving is important for social media companies doing live streaming not only because it saves them money, but also because it provides a better user experience for the viewers tuning into the live stream.
As you can see, Akamai’s egress costs offer developers a cost-effective solution for live transcoding, with a pooled egress number and low overage costs, providing significant savings compared to other providers like AWS.
Conclusion
One of the world’s leading social media giants turned to Akamai for a solution that not only promised cost-effectiveness but also boasted unparalleled performance. They needed a transcoding solution that could handle a high volume of live streams efficiently, without compromising on quality or incurring exorbitant costs. With Akamai, this company found exactly what they were looking for.
Akamai was able to transcode more live streams per instance compared to AWS. It was a win-win scenario – they were able to deliver high-quality live video streams with low latency while simultaneously optimizing their costs. If you or your organization is considering optimizing its live video transcoding solutions, you can try Linode’s solutions by signing up to get $100 in free credits.
Comments