Skip to main content
BlogComputeHow to Lower Video Transcoding Costs by Migrating to Dedicated Linode Instances

How to Lower Video Transcoding Costs by Migrating to Dedicated Linode Instances

Header image featuring the text how to lower video transcoding costs by migrating to dedicated Linode instances, with an icon to the right of a video screen playing back video to multiple streams.

There are many costs associated with building in the cloud. For video transcoding, we have storage costs, compute instance costs, and most importantly, egress costs.  Egress costs are oftentimes overlooked and can make a significant impact on your bottom line. The challenge comes when you want to distribute content globally in all the right formats while keeping costs low. Every time data is accessed or transferred out of the cloud, whether it’s streaming video content, downloading files, or serving web pages, egress fees come into play. On a global scale, these costs become a significant line item. 

So how do we deliver assets to audiences worldwide without breaking the bank? This is a challenge many companies face, most recently by one of our customers who is an internet-based TV and on-demand content provider. This customer is a prominent over-the-top (OTT) platform that specializes in providing live TV channels, on-demand content, and catch-up TV services to viewers across the globe. They invest heavily in scalable cloud-based solutions to ensure minimal buffering and latency streaming experiences, especially during peak traffic periods. This customer initially turned to Oracle Cloud GPUs and AWS VT1 instances to handle their video transcoding. However, those cloud providers came with a heavy price tag, so much so that it became financially non-viable for the customer. Each time their video content was streamed, downloaded, or served to end-users, they incurred substantial egress fees. These costs quickly added up, especially given their global audience and the need for high-quality, low-latency streaming. They wanted to maximize their transcoding stream per VM to have a better cost-to-performance ratio, while also deploying their transcoded videos to users to provide low-latency content. However, as their user base grew and their content distribution scaled globally, the financial burden became untenable.

Faced with these escalating costs, the customer needed to find a more cost-effective solution without sacrificing performance or user experience. This led to a thorough reevaluation of their video transcoding and content distribution strategy, which I’ve talked about before in this blog post. They sought alternatives that would allow them to optimize the number of transcoding streams per virtual machine (VM), thereby improving their cost-to-performance ratio. Additionally, they aimed to deploy transcoded videos closer to their users to reduce latency and further enhance the viewing experience.

The rising costs associated with AWS VT1 – particularly in egress fees for transfer out of AWS – prompted a reevaluation of the video transcoding content distribution platform. 

The Challenges of Video On-Demand Transcoding

Imagine you are an engineer at a major OTT platform, responsible for video transcoding for millions of users. It’s a daunting task that demands both technical expertise and financial prudence. Your role is pivotal in ensuring that viewers receive high-quality, seamless video streams, regardless of their location or the device they’re using.

Every day, you manage a fleet of virtual machines (VMs) tasked with the heavy lifting of encoding video content. This process is not just about converting video formats; it’s about optimizing for different resolutions, bitrates, and codecs to ensure that content is accessible and looks great on various screens, from smartphones to 4K TVs. The challenge is to keep these VMs running efficiently to handle the constant stream of incoming video data while avoiding bottlenecks and minimizing latency.

We also need to keep in mind that video transcoding is resource-intensive. Each video must be processed in multiple formats and qualities to accommodate different network conditions and device capabilities. This requires significant computational power, which translates into high costs for CPU, GPU, and memory resources. As an engineer, you’re constantly monitoring these resources, balancing the load across multiple VMs to prevent overutilization and ensure optimal performance.

In addition to the computational demands, there’s another critical aspect to consider: data egress costs. Every time a video is streamed, downloaded, or transferred to a content delivery network (CDN), your company incurs egress fees. This cost is typically based on the volume of data transferred and can vary depending on factors such as the destination of the data, the distance traveled, and the bandwidth consumed. These fees can quickly add up, especially when you’re dealing with large volumes of high-definition content streamed to a global audience. Managing these costs is essential for maintaining your company’s bottom line.

To address these challenges, you need a strategy that maximizes the efficiency of your transcoding infrastructure while keeping costs under control. To do this, you need to optimize your VM utilization and ensure that each VM is used to its full potential without being overloaded. This translates to transcoding more streams per VM. You also need to choose the right cloud provider. Different cloud providers offer varying pricing models and performance capabilities. Evaluating these options to find a provider that offers the best balance of cost and performance is crucial. You also need to implement strategies to reduce egress fees, such as caching frequently accessed content closer to end-users, using CDNs effectively, and considering alternative cloud storage solutions with lower egress costs. Lastly, you need to explore cost-effective compute instances, like Linode, which can offer predictable pricing and better cost-performance ratios compared to traditional cloud providers.

In essence, your role as an engineer is to ensure that your video transcoding infrastructure is robust, scalable, and cost-effective. This involves a constant balancing act of optimizing technical performance and managing financial constraints. By implementing a thoughtful strategy and leveraging the right tools and technologies, you can meet the demands of millions of users while safeguarding your company’s bottom line.

Cost Analysis for Video Transcoding

Let’s take a look at a detailed cost analysis comparing video transcoding using 64 GB dedicated Linode instances versus AWS EC2 VT1 vt1.6xlarge instances, considering both egress costs and total cost-to-performance ratio. 

Let’s assume a streaming provider needs to transcode 100 hours of video content per month. Each video file has an average size of 1 GB, and the provider wants to transcode to three different output formats to support various devices and resolutions. We’ll also assume it takes 2 hours to transcode 1 hour of video content on both providers and that they each need 50 instances.

Cost per dedicated CPU instanceTotal cost for 50 instances
64 GB Dedicated Linode instance$0.864/hour50 instances * $0.864/hour * 200 hours = $8,640/month
AWS vt1.6xlarge instance$1.30/hour50 instances * $1.30/hour * 200 hours = $13,000/month
Note: You can find up to date pricing information for Linode here and for AWS here

This cost comparison illustrates the significant savings achieved by migrating to Linode Dedicated VMs. In this analysis, using Linode Dedicated Instances for video transcoding is 33% cheaper than using AWS VT1. In addition to lower instance costs, Akamai also offers a significant allocation of complimentary egress when clients opt for Akamai Compute instances, further reducing overall egress costs compared to AWS. Not only do you get to do your video transcoding for a lower cost,  but you get zero egress costs when transcoding with Akamai and distributing the content with our CDN. If a customer uses Akamai CDN for transferring transcoded videos to and from Points of Presence (PoPs), the associated costs are effectively eliminated. By utilizing our compute resources for transcoding, customers can enjoy minimal egress expenses, ensuring a cost-effective solution for their data transfer needs.

Solution: Migrating to Dedicated Linode Instances

Let’s take a look at how this OTT customer migrated from AWS EC2 VT1 instances to 64GB dedicated Linode instances. They used Linode Object Storage to upload the videos and then connected that to the Linode Kubernetes Engine which performed the video transcoding. When the transcoding was complete, the output videos were placed in an output bucket and then distributed with Akamai’s CDN. Let’s dive deeper into the steps below of how Linode’s 64GB dedicated VMs made this video transcoding process happen smoothly and cost-effectively.

Step 1: Content ingestion and storage

First, Linode ingests the raw live or on-demand videos. These videos are uploaded to a local, dedicated object store, Linode Object Storage, specifically designed to handle incoming content. This bucket acts as a repository for raw videos awaiting processing. Here, metadata associated with each video, such as title, description, and timestamps, may also be stored alongside the video files. When a video is uploaded to this bucket, the video processing pipeline begins. 

Step 2: Transcoding Workflow Initialization

Once the raw videos are uploaded to the Linode bucket, the transcoding VMs come into play. These dedicated VMs are configured to continuously monitor the bucket, scanning for new videos that require processing. Upon detecting a new video, the transcoding software (in this case, this customer used Capella) is triggered to initiate the transcoding process. During this transcoding process, the raw video files get converted into various formats and resolutions optimized for different devices and bandwidths. This is where the power of video transcoding on Linode comes into play. The dedicated Linode VMs leverage parallel processing capabilities to efficiently handle multiple transcoding tasks simultaneously, ensuring timely processing of incoming videos.

Step 3: Output Storage

As the transcoding software processes the raw videos, the transcoded outputs are generated and stored in an output Linode bucket (or the same bucket in a different folder). These transcoded videos are now ready for delivery to end-users, having been transformed into formats compatible with a wide range of devices and streaming platforms. As a bonus, Linode’s Object Storage ensures high availability and durability of the transcoded videos, with redundancy and data integrity mechanisms in place to safeguard against data loss. 

Step 4: CDN Integration

For enhanced performance and scalability, this customer chose to integrate Akamai’s CDN into their video processing workflow. Akamai caches, distributes, and controls access to the video library, delivering content to end-users with low latency and high throughput. By leveraging Akamai’s edge caching and global distribution capabilities, the customer was able to optimize their content delivery by serving videos from the nearest edge location to the end user, reducing latency and improving user experience. As a bonus, there is no egress charge when distributing content with Akamai’s CDN because the customer used Akamai compute for transcoding.

Step 5: Infrastructure Management and Automation

To streamline operations and facilitate scalability, this customer used the Linode Automation API to manage their infrastructure and deploy new code versions. The Linode automation API allows for the programmable provisioning and configuration of virtual machines, storage volumes, and networking resources, enabling infrastructure to be managed efficiently through code. By using infrastructure as code (IaC), this customer defined their infrastructure requirements declaratively using code, automated repetitive tasks, and ensured consistency across environments. 

Final Thoughts

I hope this explanation of the challenges of on-demand video transcoding, optimizing VM utilization, and keeping egress costs low, helped illustrate a solution to a problem that continues to grow exponentially as we consume more and more streaming video content daily. Using Linode’s dedicated instances for video transcoding turned out to be 33% cheaper than using AWS VT1 instances in the specific use case. And remember, when you use Akamai for video transcoding and use our CDN for distribution, your egress costs are eliminated. 

If you’d like to learn more about how to implement this yourself, read this tutorial on Scalable Video Transcoding on Linode, where you’ll learn how to convert an mp4 file to HLS with Kubernetes and Capella. Be sure to sign up to get $100 in free credits to complete the tutorial. You can also read our new guide walks you through setting up live transcoding for UGC Streaming on Akamai.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *