TAPAS: a Tool for Rapid Prototyping of Adaptive Streaming Algorithms
Total Page:16
File Type:pdf, Size:1020Kb
TAPAS: a Tool for rApid Prototyping of Adaptive Streaming algorithms Luca De Cicco Vito Caldaralo Politecnico di Bari, Italy Quavlive srl, Italy [email protected] [email protected] Vittorio Palmisano Saverio Mascolo Quavlive srl, Italy Politecnico di Bari, Italy [email protected] [email protected] ABSTRACT and user screen resolution. The two leading standardiza- tion efforts related to adaptive streaming are the HTTP The central component of any adaptive video streaming sys- 1 tem is the stream-switching controller. This paper intro- Live Streaming (HLS) proposed by Apple and the ISO duces TAPAS, an open-source Tool for rApid Prototyping standard Dynamic Adaptive Streaming over HTTP (MPEG- of Adaptive Streaming control algorithms. TAPAS is a flex- DASH) [10]. Both the standards require the video content ible and extensible video streaming client written in python to be encoded at different bitrates and resolutions, the video that allows to easily design and carry out experimental per- levels or representations. Then, each video level is logically or physically divided into segments, or chunks, of fixed dura- formance evaluations of adaptive streaming controllers with- 2 out needing to write the code to download video segments, tions. A manifest file is stored at the server and is used to parse manifest files, and decode the video. TAPAS currently associate to each (chunk,video level) pair its corresponding supports DASH and HLS and has been designed to minimize URL. The client downloads and parses the manifest file and the CPU and memory footprint so that experiments involv- constructs a data structure that is used to request consec- ing a large number of concurrent video flows can be carried utive video segments of possibly different representations. out using a single client machine. An adaptive streaming A controller dynamically decides, for each video segment, controller is implemented to illustrate the simplicity of the the video level to be streamed to achieve the best possible tool along with a performance evaluation which validates quality given the available bandwidth with the constraint of the tool. avoiding video interruptions. Both HLS and MPEG-DASH require the controller to be implemented at the client and to use HTTP requests to fetch the video segments from stan- Categories and Subject Descriptors dard HTTP servers. C.2.0 [Computer Communication Networks]: [Gen- The controller is a key component of any video stream- eral] ing system having the overall goal of maximizing the user QoE. Towards this end, a careful design phase is required Keywords which typically follows an iterative and incremental devel- Adaptive streaming, DASH, HLS, rapid prototyping opment method made of two phases which form a cycle: 1) design and implementation of the controller; 2) experimen- 1. INTRODUCTION tal performance evaluation to check whether the specifics are met. In order to carry out the experimental evaluation, Today video streaming applications generate more than a testbed has to be set-up and a complete adaptive video half of the global Internet traffic [3]. The choice of using the streaming player, incorporating the controller, has to be im- progressive download streaming (PDS) approach made by plemented. Developing an adaptive video streaming player YouTube in 2005 has been the main driver of this growth. is a time consuming process even for the experienced pro- With the PDS technique the video is encoded at a given grammer and requires several modules to be designed and bitrate and it is sent to the user through a HTTP connection implemented. using a TCP socket and played using a web browser. In this paper we propose TAPAS, a Tool for rApid Pro- An evolution of PDS is the adaptive streaming. With this totyping Adaptive Streaming controllers, that allows to only technique the video content bitrate and resolution can be dy- focus on controller design rather than having to spend time namically varied to match the network available bandwidth on the complex task of implementing a complete adaptive video player. After the design and experimentation phase is Permission to make digital or hard copies of all or part of this work for personal or completed, the controller can be implemented and integrated classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full cita- in a production adaptive video streaming player. Our over- tion on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or re- 1 publish, to post on servers or to redistribute to lists, requires prior specific permission R. Pantos and W. May. HTTP Live Streaming. IETF Draft, June 2012. and/or a fee. Request permissions from [email protected]. 2 VideoNext’14, December 02-05 2014 Sydney, Australia. In the case of HLS a set of extended M3U8 playlists is Copyright 2014 ACM 978-1-4503-3281-1/14/12 ...$15.00. used. In this paper we will use the terms manifest or playlist http://dx.doi.org/10.1145/2676652.2676654 . interchangeably. Client all goal is to make TAPAS a reference tool for the research Display community in order to foster experiment reproducibility. HTTP request HTTP The tool has been designed to allow a large number of TAPAS concurrent video streaming sessions to be launched on the NetShaper Server same machine. To make this possible, TAPAS allows to dis- able decoding of the video so that both CPU load and RAM usage can be contained. Another important feature is that, Log RTT, rate, queue being TAPAS written in Python, the design of a new con- troller requires only to extend a base controller class without Figure 1: A typical controlled testbed having to compile the code. TAPAS has been tested to be compliant with the video samples provided in the DASH dataset [7] and the YouTube DASH dataset [1]. Algorithm 1 Tapas player The DASH Industry Forum3 (DASH-IF) initiative collects several reference web players supporting DASH for both 1 c = Controller(ctrl_options) 2 p = Parser(url_playlist) HTML5 and Flash. Even though these players are com- 3 m = MediaEngine(media_options) plete, they all have to be run in web browsers, making ex- 4 player = TapasPlayer(controller=c, parser=p perimentation of the control algorithm difficult. In particu- 5 media=m, other_options) 6 player.play() lar, experimenting with web based video players limits the number of concurrent videos that can be run from the same machine due to memory and CPU requirements. Moreover, instrumentation of the experiment and results logging may and playing the received video. In particular, it provides be a complex task. The most closely related work to ours a full adaptive video streaming player that is able to play is [9] where authors present a plugin written in C++ to en- video streams using both DASH and HLS standards. The able DASH on the popular VLC4 media player. The plugin unique feature of TAPAS is its flexibility: new control logics is written to allow the implementation of controllers by ex- and manifest parsers can be implemented by inheriting base tending a base class. However, since the video stream has to classes as it will be shown in the following. In this manner, be decoded, the tool proposed in [9] cannot be used to run the researcher can focus only on the design of the controller experiments in which a large number of video streaming in by leveraging all the other implemented components. parallel is involved due to excessively high CPU and RAM Figure 1 shows a typical controlled testbed that can be requirements. used to carry out an experimental evaluation of a stream- 2. ARCHITECTURE switching control algorithm. The testbed can be imple- The stream-switching controller is the key component of mented using only two hosts: the first machine runs TAPAS any adaptive video streaming system; for each video segment that requests the video chunks to a standard HTTP server s it chooses the video level l in the discrete set of available placed on the second host. On the second host a bandwidth i j shaper similar to dummynet can be employed to emulate a video levels L with the overall goal of maximizing the user QoE in terms of: 1) video playout continuity: interruptions WAN scenario in which the end-to-end bandwidth, the base due to buffer underruns should be avoided and video level RTT of the link, and the bottleneck queue can be freely ad- switching frequency should be minimized; 2) video quality: justed. It is important to notice that TAPAS can be used in the video level should be maximized; 3) latency: the start- any other scenario provided that the videos are made avail- up delay, i.e. the time elapsed to start the video stream able through a HTTP server. We have tested TAPAS to be playback, should be minimized. compliant with many webTVs employing HLS or DASH. After the control algorithm has been designed, a careful TapasPlayer is implemented by aggregation of three inter- experimental evaluation phase is required to verify that the acting components: 1) the Controller that selects the video design requirements are met. To the purpose, a full adaptive level of the next segment to be downloaded; 2) the Parser, video streaming player has to be implemented comprising at that parses the video manifest file; 3) the MediaEngine that least the following modules: 1) a parser module that parses stores the downloaded video in the playout buffer and plays the manifest file; 2) a downloader that fetches the video the video. Each of these three components can be extended segments from the HTTP server and feeds them to the player individually by inheriting the corresponding base class (see playout buffer; 3) a media engine that plays the video stored Section 3 for further details).