Abstract
Video transcoding techniques provide an efficient mechanism to make video content adaptive to the capabilities of a variety of clients. However, providing appropriate quality-of-service (QoS) is challenging due to the heavy workload of transcoding operations. This paper presents a dual transcoding method designed to guarantee QoS in streaming services by maximizing resource usage in a server equipped with both CPU and GPU computing units. By predicting the workload of incoming requests and scheduling them to the most suitable processor, the proposed method achieved a speedup of 1.84 compared to traditional approaches.
Introduction
As mobile video consumption continues to grow, streaming providers must transcode master videos into multiple formats and resolutions (e.g., 1080p, 720p, 360p) to accommodate diverse device capabilities and network conditions. This process is computationally intensive. While modern servers often feature powerful multi-core CPUs and General-Purpose Graphics Processing Units (GPGPUs), most transcoding software is optimized for only one of these resources. This leads to inefficiencies where one resource may sit idle while the other is bottlenecked. The challenge lies in effective load balancing within a single machine to maximize throughput and maintain QoS.
The Dual Transcoding Framework
The researchers developed a framework using the FFmpeg library that leverages both CPU and GPU resources simultaneously. For CPU-based tasks, the system utilizes the x264 encoder. For GPU-based tasks, it employs NVIDIA’s cudaEncoder.
A critical observation in this architecture is the resource dependency: while the GPU handles the heavy encoding work, the CPU is still required to decode the source video. The dual method recognizes this and ensures the CPU is not overwhelmed by decoding tasks while simultaneously performing its own encoding assignments.
Workload Prediction and Scheduling
The core of the proposed system is an intelligent scheduler that uses linear regression to predict computational load. The researchers identified that the primary driver of transcoding load is the output resolution of the target video.
As shown in the figure above, while input resolution and bitrate have minimal or linear impacts, output resolution exhibits a significant and predictable relationship with CPU load. Using models in the form of $Y = mX + b$, the system predicts the percentage of CPU and GPU load for each request.
Scheduling is then performed based on the server's current state:
- State 1 (GPU Overloaded): New tasks are sent to the CPU.
- State 2 (CPU Overloaded): New tasks are sent to the GPU.
- State 3 (Balanced Capacity): Tasks are assigned using a specific formula to maintain optimal balance between the two processors.
Key Results
Experimental results demonstrated high accuracy in workload prediction, with measured loads staying within 3.5% of predicted values. In a mixed-workload scenario involving 1080p and 240p requests, the Dual Transcoding method achieved a 1.84x performance improvement over a CPU-only approach. Specifically, the system successfully processed 12 simultaneous streams (6 at 1080p and 6 at 240p) while maintaining QoS, reaching near-maximum utilization of both the CPU (95.8%) and GPU (99%).
Conclusion and Future Work
The dual transcoding approach effectively increases the capacity of a single server by intelligently utilizing heterogeneous computing resources. However, the current model's linear regression constants are hardware-specific. Future research aims to develop a hardware-independent prediction model that can automatically self-calibrate to any CPU/GPU combination, further enhancing the scalability of high-performance video streaming services.
Summary updated