Abstract
Video transcoding is the process of converting a video to the format supported by the viewer's device. Video transcoding requires huge storage and computational resources, thus, many video stream providers choose to carry it out on the cloud. Video streaming providers generally need to prepare several formats of the same video (termed pre-transcoding) and stream the appropriate format to the viewer. However, pre-transcoding requires enormous storage space and imposes a significant cost to the stream provider. More importantly, pre-transcoding proven to be inefficient due to the long-tail access pattern to video streams in a repository. To reduce the incurred cost, in this research, we propose a method to partially pre-transcode video streams and re-transcode the rest of it in an on-demand manner. We will develop a method to strike a trade-off between pre-transcoding and on-demand transcoding of video streams to reduce the overall cost. Experimental results show the efficiency of our approach, particularly, when a high percentage of videos are accessed frequently. In such repositories, the proposed approach reduces the incurred cost by up to 70%.
Introduction
Video Stream Providers (VSPs) like Netflix or YouTube face a massive financial challenge: they must provide videos in dozens of formats to support everything from 4K TVs to low-end smartphones. Traditionally, they have two choices. First, Pre-transcoding, where they convert and store every possible format in advance. This eats up massive amounts of expensive cloud storage. Second, Re-transcoding (On-demand), where they store only the original and convert it whenever a user hits "play." This saves storage but incurs high computational costs every single time a popular video is watched.
The challenge is that video popularity follows a "long-tail" distribution—a few videos are hits, while most are rarely seen. Furthermore, even within a single video, viewers are much more likely to watch the beginning than the end. Existing methods usually treat a video as an "all-or-nothing" unit, missing the opportunity to optimize based on these internal viewing patterns. This paper introduces a "partial pre-transcoding" strategy to slash the costs of hosting video-on-demand (VOD) services in the cloud.
Methodology: Partial Pre-transcoding
The authors propose a middle ground: Partial Pre-transcoding. Their approach treats a video not as a single file, but as a series of Groups of Pictures (GOPs)—the smallest independent units in a video stream.
The core of their method involves two primary components:
- Cost-Benefit Analysis: The system calculates a "cost ratio" for each video, comparing the monthly cost of storing a pre-transcoded version versus the cumulative cost of transcoding it on-the-fly based on predicted view counts.
- GOP Thresholding: Since the beginning of a video is watched more often than the end, the cost-effectiveness of pre-transcoding drops as you move further into the timeline. The algorithm identifies a "GOP threshold"—a specific point in the video where it becomes cheaper to stop storing the transcoded bits and start transcoding them on-demand instead.
The system uses a Power-law model to estimate how many views each segment of a video will receive and a Weibull distribution to model the overall popularity of videos across the entire repository.
Experimental Setup and Datasets
The researchers used a two-step approach for their data validation:
- Baseline Analysis: They analyzed 103 real-world videos across various categories (movies, sports, news, etc.) to extract characteristics like GOP size and transcoding time. They found that GOP sizes follow a Gaussian distribution and that there is a linear relationship between GOP size and the time it takes to transcode it.
- Synthesized Repository: Using the parameters derived from the real videos, they synthesized a massive repository of 50,000 videos (totaling ~113 TB) to test their algorithms at scale.
Key Insights
- The "Internal" Long Tail: The most significant insight is that viewing patterns within a video mirror the popularity patterns between videos. By focusing storage resources on the first few minutes of a video, VSPs can provide a seamless start for users while offloading the "unlikely-to-be-seen" endings to on-demand compute.
- Storage vs. Compute Equilibrium: Cloud storage is billed monthly, while compute is billed hourly. The paper identifies that for "Frequently Accessed Videos" (FAVs), storage is almost always cheaper, but for the "long tail" of unpopular videos, compute is the winner.
- Granularity Matters: By moving from a "whole video" management style to a "GOP-level" management style, the system can fine-tune the storage-compute trade-off with much higher precision.
Results
The authors evaluated their method using AWS pricing (t2.small instances for compute and S3 for storage):
- Significant Savings: The partial pre-transcoding method reduced total costs by up to 70% compared to a pure re-transcoding approach when 30% of the repository consisted of popular videos.
- Superiority over Pre-transcoding: Compared to fully pre-transcoding everything, the proposed method saved up to 60% in costs.
- CDN Impact: Even when factoring in Content Delivery Network (CDN) costs (which are usually high), the partial approach remained the most cost-efficient, reducing expenses by roughly 66%.
Conclusion and Future Work
Partial pre-transcoding offers a robust solution for cloud-based video repositories by balancing the high cost of storage with the high cost of on-demand computation. However, the current model relies on knowing (or accurately estimating) the number of views a video will receive. If a video's popularity is unpredictable, the cost-benefit analysis might fail.
Future work should focus on integrating Machine Learning to predict the future view counts of new videos more accurately and developing offline algorithms that can dynamically adjust the GOP threshold as a video's popularity changes over time (e.g., a video going viral and then fading away).
Summary updated