Greening the Video Transcoding Service with Low-Cost Hardware
Total Page:16
File Type:pdf, Size:1020Kb
Greening the Video Transcoding Service with Low-Cost Hardware Transcoders Peng Liu, University of Wisconsin—Madison; Jongwon Yoon, Hanyang University; Lance Johnson, University of Minnesota; Suman Banerjee, University of Wisconsin—Madison https://www.usenix.org/conference/atc16/technical-sessions/presentation/liu This paper is included in the Proceedings of the 2016 USENIX Annual Technical Conference (USENIX ATC ’16). June 22–24, 2016 • Denver, CO, USA 978-1-931971-30-0 Open access to the Proceedings of the 2016 USENIX Annual Technical Conference (USENIX ATC ’16) is sponsored by USENIX. Greening The Video Transcoding Service With Low-Cost Hardware Transcoders1 Peng Liu*, Jongwon Yoon†, Lance Johnson‡, and Suman Banerjee* *University of Wisconsin-Madison, pengliu,suman @cs.wisc.edu †Hanyang University, [email protected]{ } ‡University of Minnesota, [email protected] Abstract mats make it difficult for some video service providers to prepare all media content in advance. Therefore, video Video transcoding plays a critical role in a video stream- transcoding has been widely used for optimizing video ing service. Content owners and publishers need video data. For example, Netflix encodes a movie as many transcoders to adapt their videos to different formats, bi- as 120 times before they stream the video to users [37]. trates, and qualities before streaming them to end users Transcoders are also commonly used in the area of mo- with the best quality of service. In this paper, we report bile device content adaptation, where a target device does our experience to develop and deploy VideoCoreClus- not support the format or has a limited storage capacity ter, a low-cost, highly efficient video transcoder clus- and computational resource that mandate a reduced file ter for live video streaming services. We implemented size. the video transcoder cluster with low-cost single board However, video transcoding is a very expensive pro- computers, specifically the Raspberry Pi Model B. The cess, requiring high computational power and resources. quality of the transcoded video delivered by our clus- Thus, it is critical to have an energy efficient and low- ter is comparable with the best open source software- cost video transcoding solution. In addition, video based video transcoder, and our video transcoders con- transcoders’ performance is important to enhance the sume much less energy. We designed a scheduling algo- overall quality of video streaming services. Regarding rithm based on priority and capacity so that the cluster the performance of transcoder, two metrics are impor- manager can leverage the characteristics of adaptive bi- tant: quality and speed. Video quality with a given bi- trate video streaming technologies to provide a reliable trate determines the amount of data needed to be trans- and scalable service for the video streaming infrastruc- mitted in the network for a video. Transcoding speed ture. We have replaced the software-based transcoders determines the time to finish the transcoding. Thus, it for some TV channels in a live TV streaming service de- is critical for live video streaming services. Other met- ployment on our university campus with this cluster. rics, e.g., cost and power consumption, are also need to be considered in video transcoding system deployment. 1 Introduction Various video transcoding technologies are proposed and used, including cloud transcoding, software-based Video streaming service is one of the most popular In- transcoding on local servers, and hardware transcoding ternet services in recent years. In particular, multime- with specialized processors. In this paper, we intro- dia usage over HTTP accounts for an increasing portion duce VideoCoreCluster – a low-cost, energy efficient of today’s Internet traffic [47]. For instance, video traf- hardware-assisted video transcoder cluster to provide fic is expected to be 80 percent of all consumer Internet transcoding services for a live video streaming service. traffic in 2019, up from 64 percent in 2014 [5]. In or- The cluster is composed of a manager and a number of der to provide high and robust quality of video streaming cheap single board computers (Raspberry Pi Model B). services to end users with various devices with diverse We use the hardware video decoder and encoder mod- network connectivities, content owners and distributors ules embedded in the System on Chip (SoC) of a Rasp- need to encode the video to different formats, bitrates, berry Pi to facilitate video transcoding. With an opti- and qualities. It is redundant to encode and store a source mized transcoding software implementation on the Rasp- video to different variants for archiving purposes. The berry Pi, each Raspberry Pi is able to transcode up to broad spectrum of varieties of bitrates, codecs and for- 3 Standard Definition (SD, 720x480) videos or 1 High USENIX Association 2016 USENIX Annual Technical Conference 407 Definition (HD, 1280x720) and 1 SD videos in real time with very low power consumption. We also developed the cluster manager based on an IoT machine-to-machine SourceSoS urce VideoVideo Media ServerServer Web ServerServer ServerServer protocol - MQTT [42] to coordinate the transcoding tasks and hardware transcoders in order to provide re- liable transcoding service for video streaming services. Compared to software-based video transcoders, Video- CoreCluster has lower cost and higher energy efficiency. Adaptive bitrate (ABR) video streaming over HTTP is a popular technology to provide robust quality of ser- Video vice to end users whose mobile devices have dynamic Player network connectivities. Multiple ABR technologies are used in the industry, but they share a similar idea. Media Figure 1: TV Streaming Service Architecture. servers cut source videos into small segments and en- code every segment to multiple variants with different bitrates. During playback, a video player selects the best 2 Background and Setup variants for these segments base on the video player’s performance, network connectivity, or user’s preference. We worked with the IT department of the University of Streaming video over HTTP has many advantages [60], Wisconsin-Madison to provide a free TV service for stu- we chose it for our live video streaming service because it dents on campus. Students can watch 27 (currently) TV is easy to deploy a video player on web browsers of mo- channels with their mobile devices. Six of these channels bile devices with different operating systems, and we do are HD channels with a resolution 1280x720, 30fps. The not need to reconfigure middle-boxes (firewalls, NATs, other 21 channels are SD with resolutions up to 720x480, etc.) in current campus network deployment for our ser- 30fps. In the most recent month (April 2016), there were vice. We design VideoCoreCluster according to the re- more than 4000 view sessions and about total 480 watch- quirements of ABR live video streaming so that it can ing hours. ABR video streaming techniques are used to provide robust transcoding service. provide high-quality video streaming service to mobile Contributions: The most important contribution of devices with diverse link capabilities and network dy- this paper is a practical implementation of real-time namics. The system supports both Apple’s HTTP Live transcoding system based on energy efficient hardware- Streaming (HLS) [13] and MPEG-DASH [60] to provide assisted video transcoders. Our contributions are multi- service to heterogeneous devices. Figure 1 shows the ar- fold: chitecture of the system. Specifically, a TV frontend re- ceives the TV signal and encodes the video stream into We design and implement a cost-effective transcod- H.264 + AAC format, then the video stream is pushed to • ing solution on a low-cost device, Raspberry Pi source video server. The transcoder cluster pulls videos Model B. from the source video server and pushes the transcoded results to media server in order to provide multiple vari- Our system is based on hardware video decoder and ants of the video streams for every TV channel. The • encoder, which is significantly more energy effi- source video server and media server can be combined cient than software-based transcoding system. in deployment, so we will not discuss them separately in the following sections. The web server hosts web pages We leverage characteristics of adaptive bitrate video and video players for different web browsers. • streaming over HTTP to design a reliable and scal- able system for live video streaming service. The 2.1 Challenges of ABR Techniques on Live system is easily deployable. We currently employ our VideoCoreCluster into an IP-based TV stream- Video Streaming ing service in the University of Wisconsin-Madison. Low latency is critical for a live video streaming service, in which a media server has to generate video data on- The paper is organized as follows. In Section 2, we the-fly to provide continuous streaming service to the introduce the background of our video transcoding sys- end user. A media server supporting ABR needs to guar- tem and the possible approaches to building it. Then we antee all the variants of a video segment are available describe the architecture of VideoCoreCluster in Section when a client requests one of them. Due to the strict re- 3. We evaluate the system in Section 4 and discuss the quirement on low-latency transcoding, several optimiza- related work in Section 5. Section 6 concludes the paper. tion techniques (e.g., high throughput video transcoding, 2 408 2016 USENIX Annual Technical Conference USENIX Association multi-pass encoding for enhancing video quality) are not However, software video encoders are more flexible than applicable for live streaming. Moreover, an index file hardware video encoders. It is much easier to try new al- containing a list of the available video variants should gorithms on a software video encoder to improve video be generated in real-time, and it has to be updated on quality than a hardware video encoder. Video encoders time and be consistent with the availability of these vari- on FPGA platform make a good trade-off on efficiency ants.