Reducing startup time in MP4 on - demand video streaming services with movie atom caching
This paper points out negative effects on quality of experience of video streaming sessions caused by metadata
atom in MP4 movie files. Based on experiments, it is shown that the duration for downloading metadata atom could
be relatively large for high-quality full-length movie videos. This leads to noticeable and disturbing startup delay to
users when watching MP4 movies online. According to our model of user behavior, such a long startup delay could
result in a large number of ”leaving users” who abandon their video streaming before videos start to play. In order
to reduce the startup delay and the portion of users who leave video sessions early, we present a mechanism, called
Movie Atom Caching, that reuses previously downloaded metadata atoms or proactively downloads and caches
movie metadata atoms at video players before users actually play the video. The mechanism is implemented in
our video streaming prototype system. Experiments on the system show that, in typical cases, user experience is
significantly improved as startup delay is cut down.
Trang 1
Trang 2
Trang 3
Trang 4
Trang 5
Trang 6
Trang 7
Trang 8
Trang 9
Tóm tắt nội dung tài liệu: Reducing startup time in MP4 on - demand video streaming services with movie atom caching
lication, MAC are likely to play by the user. Such files can be daemon, will monitor the publishing area for new obtained by using a recommendation system that files and automatically split each new file into belong to content management system of a video two files containing moov atom and mdat atom site, for example. respectively. As examplified in figure 5, v1.atom Although MAC algorithm is very simple, and v1.mdat are the two files splitted from the implementing it into good working software original file v1.mp4. Those files will be moved applications needs following requirements: to ”public area” and become ready for streaming. When a MAC client is commanded to view a • First of all, MAC should be extensions MP4 video, it will check for an apropriate atom or add-on components of existing solutions file in its local video cache. If such a file is for streaming MP4 files. Development found, it will be used as the atom header for of a new streaming server software is parsing multimedia data retrieved from server. In considered a bad design choice because of case MAC client has to download atom file from high implementation costs. server, the successfully downloaded atom file will also stored into the local video cache. • The streaming service for MAC protocol At server side, existing HTTP-based solutions should be compatible with non-MAC for streaming atom and mdat files of MP4 clients. Again, developing a completely new movies are used. Specifically, files in public streaming server software is not a good idea area and publishing area are stream by typical because of potential incompatibility with webserver like nginx [10]. This can be existing clients. done simply by configuring those locations as accessible resources to the webserver and the web • Finally, with similar reasons as above, ones application hosted by the webserver. Additionaly, should not develop a new video player for a simple web application developed in PHP is MAC. Insteads, plugins should be developed deployed on the webserver for handling both to integrate with existing video players. MAC non-MAC (normal HTTP) MP4 video 38 X. T. Hoang, T. T. Nguyen / VNU Journal of Science: Comp. Science & Com. Eng., Vol. 32, No. 1 (2016) 33–41 4. Performance Evaluation In this section, we present our setups for comparison startup delays between MAC and other protocols including progressive download, and HLS. In our experiments, the following elements are deployed: • A server machine on which: an FTP service (vsftpd) is running for allowing MP4 file uploads. An instance nginx webserver with supports for PHP 5 over fastCGI [11] are launched for providing HTTP streaming capabilities. And MAC daemon application are running for MAC protocol file preprocessing. All thosecomponents are run on a virtual 32-bit CentOS 6.x machine. • A client machine on which: required Fig. 4: Atom Caching/prefetching algorithm for startup delay reduction. player and its dependencies are installed. Those software components include ffmpeg library and MAC protocol plugin. All of them run on a Ubuntu 14.04 LTS 32-bit virtual machine. • And a virtual network setup by GNS3 simulator [12]. In our setup, the virtual network contains only a virtual Cisco 2691 router and two virtual links connecting the router with the server and client machines above. Such a simple virtual network is sufficient for us to create different values of end-to-end bandwidth between the client Fig. 5: Movie Atom Caching implementation. machine and the server machine. Our experiments for measuring startup delay streaming. The web application will conceal are conducted as follows: Startup delays are atom and mdat files under reference to original measured on 3 sample videos with the same MP4 files and provide a layer for providing settings of bitrate, frame-rate, I-frame rate, compatibility with both streaming protocols. and other parameters related to audio streams. Our MAC client is implemented using FFmpeg Table 2 summarizes those parameters. The [6]. Specifically, we developed a protocol plugin three sample movies have durations, respectively, for FFmpeg. Our plugin simply interfaces with 30, 60, and 90 minutes. The sample videos streaming service and local video cache for are used for streaming with MAC, HLS, and handling atom retrieval, caching and combining progressive download protocol under end-to-end with mdat data from server. Thanks to high bandwidths of 512 Kbps and 2 Mbps. We believe portability of FFmpeg, our MAC implementation that 2 Mbps is the typical access bandwidth can be built for both Windows and of ADSL subscribers on the internet currently. Linux platforms. And 512 Kbps can be used as a representative X. T. Hoang, T. T. Nguyen / VNU Journal of Science: Comp. Science & Com. Eng., Vol. 32, No. 1 (2016) 33–41 39 Table 2: Parameters of sample MP4 files large as 60 seconds), MAC results in much smaller streaming failure rates in all cases. Specifically, streaming failure rates are less Parameter Value than 10%, for k = 0, and less than 1% Video frame rate 30 frames/s for k > 0. Video Frame size 1280 x 720 pixels I-Frame rate 1 I-frame per 50 frames • Startup delay of MAC is slidely smaller than Audio bitrate 192 Kbps HLS. The reason that HLS has low startup Audio sample rate 48 kHz delay is as follows. HLS is a combination of Number of audio channels 2 channels smaller segments. Each small segment will require only small header atom, thus incurs relatively small delay to start. Although reencoding the original file into multiple residual bandwidth of such internet subscribers smaller files help in reducing startup delay, during normal working conditions. Ones can it incurs more pre-processing cost. Total say that 512 Kbps is a representative value data of all segment files are higher than the for typical network condition, while 2 Mbps is original file. And data rate of the video the representative one for very good network streaming will also higher. conditions. For each sample video and a value of the above bandwidths, 5 runs are performed and the final result is obtained by averaging over 5. Related Work the 5 results. Since we are interested only in how startup delay can be reduced thanks to caching In the past, most streaming solutions used moov atom, we let the the MAC client has moov streaming protocols such as RTP as a multimedia atom the requested movie in all those runs. For transport protocol and RTSP as session control the first time of requesting a MP4 video, where protocol. Today, popular video streaming its moov atom is not cached yet, startup delay of services are exclusively based on HTTP. Major MAC client actually is identical to that of HTTP advantages of HTTP-based streaming includes progressive download. simplicity in deployment, firewall-friendly Figure 6 and figure 7 show comparisons traffics, and already available at almost all client between MAC and progressive download in terms platforms. HTTP progressive download [2] of startup delay under typical access bandwidth of best illustrates those advantages. A content 512 Kbps and large access bandwidth of 2Mbps. provider who wants to provide video streaming Using results from those figures and models simply host MP4 files on its website, and then described in 2 (equation 9, 10), we can conclude clients can enjoy view video streams only with the followings: web browsers. For MP4 streaming over HTTP, it is crucial to • If waiting time threshold T0 that a user download moov atom of MP4 files in the first can wait is not higher than 20 seconds, place. To achieve that, a couple of methods progressive download is not acceptable to exist. Firstly, software tools, such as FFmpeg users in most of the cases. Meanwhile, MAC [6] and MP4 FastStart [13] can be used to provides relatively good user experience relocate moov atom to the begining of the file. with streaming failure rates are less than When movie files are progressively downloaded 40%, 20%, 10%, 5% for patience factor k by clients, naturally, moov atoms are downloaded equals 0, 1, 2, 3 respectively. first and video playback can be started right away. Another method for downloading moov atoms • If some users are sufficiently patient to wait in the first place is used by some video players, until moov atoms are retrieved (T0 is as e.g. VLC and iOS’s video player. Following this 40 X. T. Hoang, T. T. Nguyen / VNU Journal of Science: Comp. Science & Com. Eng., Vol. 32, No. 1 (2016) 33–41 Fig. 6: Startup delay comparisons (512 Kbps access Fig. 7: Startup delay comparisons (2.0 Mbps access bandwidth). bandwidth). method, a client opens a http connection with a and DASH, a more advance file format called standard HTTP Range request [14] to download fragmented MP4 is used for multimedia segments the mp4 file from the begining of the file. As and XML-based format is used to packaging long as it detects that those first bytes are not segments together. Since segments are small moov atom, another HTTP Range request is sent video chunks with about dozens of seconds in to server for requesting moov atom at the end of durations, segment atom headers are small in the file. size and can be retrieved shortly. Startup delay Although the two methods improve HTTP is thus not as high as progressive download. progressive download for MP4 streaming, they However, those solutions are not as popular as do not solve the long startup delay problem MP4 format because of their newly introduced as pointed out in this paper. By caching standards and less adopted in existing hardware and prefetching moov atoms, MAC can far and software. Also, a large number of video more improve user experience over progressive chunks could lead to several disadvantages download while keeping simplicity and ease of including difficult in managing multimedia assets deployment for the system. It is especially true and higher input/output operations on harddisks. for streaming of full-length movies. Apple’s HTTP Live Streaming (or HLS), Microsoft Smooth Streaming (MSS) [15], and Dynamic Adaptive Streaming over HTTP (or DASH) [16] are video streaming procotols that In comparisons with fragmentation approach allows delivery of video content over HTTP. (like HLS, MSS, and DASH), MAC provides They can also provide advanced features like a easy-to-use yet efficient improvement to an adaptive bitrate streaming [17]. In all those already popular scheme. It does not require solutions, the original media is splitted into reencode video into multi-file media assets, thus, segments. Each segment can be seen as a small it produces less complexity and overheads. The file with atom headers and data. Additional disadvantage is that, it is relatively limited ”packaging formats” are introduced to combine in providing advanced feature like streaming all segments into a playlist to form a complete with adaptive bitrate. However, we believe video content. In case of Apple HLS, multimedia that MAC can be used in combinations with segments have MPEG-2 transport stream (TS) fragmented streaming solutions, e.g., caching and files, and packaging format is simply a text prefetching atoms of segments, to improve further file whose extension is ”.m3u8”. In MSS streaming experience. X. T. Hoang, T. T. Nguyen / VNU Journal of Science: Comp. Science & Com. Eng., Vol. 32, No. 1 (2016) 33–41 41 6. Conclusions [4] F. Dobrian, V. Sekar, A. Awan, I. Stoica, D. Joseph, A. Ganjam, J. Zhan, H. Zhang, Understanding the In this paper, we have shown that in streaming Impact of Video Quality on User Engagement, ACM schemes where MP4 files are used as multimedia SIGCOMM Computer Communication Review 41 (4) assets, time for downloading moov atoms, a (2011) 362–373. [5] X. Liu, F. Dobrian, H. Milner, J. Jiang, V. Sekar, data segment in MP4 files which is important I. Stoica, H. Zhang, A Case for a Coordinated for decoding process, is noticeable. This Internet Video Control Plane, in: Proceedings amount of time leads to long startup delays of the ACM SIGCOMM 2012 Conference on and poor quality of experience. User behavior Applications, Technologies, Architectures, and Protocols for Computer Communication, SIGCOMM models were presented to show how startup ’12, ACM, New York, NY, USA, 2012, pp. 359–370. delay affects the streaming system. Analysis on doi:10.1145/2342356.2342431. the models reveals that reducing startup delay [6] F. Bellard, M. Niedermayer, et al., Ffmpeg, can greately improve user quality of experience [7] V. Organization, VLC Media Player, and keep users using the system service. In (2006). order to cut down startup delay, a caching [8] G. Lawton, LAMP Lights Enterprise Development mechanism, called MAC, was proposed and Efforts, Computer 38 (9) (2005) 0018–20. implemented. Our performance evaluations [9] R. Pantos, W. May, HTTP Live Streaming draft- pantos-http-live-streaming-05, Published by the showed that MAC improves startup delay Internet Engineering Task Force (IETF). significantly in MP4 file streaming applications [10] W. Reese, Nginx: the High-Performance Web Server and have competitive startup delay with modern and Reverse Proxy, Linux Journal 2008 (173) (2008) fragmented streaming schemes with very little 2. [11] M. R. Brown, FastCGI: A High-performance Gateway complexity and overhead. Interface, in: Fifth International World Wide Web Conference, Vol. 6, 1996. Acknowledgments [12] Y. WANG, J. WANG, Use gns3 to Simulate Network Laboratory, Computer Programming Skills This work was supported by the project & Maintenance 12 (2010) 046. CN.14.02 funded by VNU University of [13] MP4 FastStart, Accessed: 2015-12-04. Engineering and Technology. [14] R. Fielding, Lafon, Y., Ed., and J. Reschke, Ed.,” Hypertext Transfer Protocol (HTTP/1.1): Range References Requests, Tech. rep., RFC 7233, June (2014). [15] A. Zambelli, IIS smooth Streaming Technical [1]N.F arber,¨ S. Dohla,¨ J. Issing, Adaptive Progressive Overview, Microsoft Corporation 3. Download Based on the MPEG-4 File Format, Journal [16] T. Stockhammer, Dynamic Adaptive Streaming Over of Zhejiang University SCIENCE A 7 (1) (2006) 106– HTTP–: Standards and Design Principles, in: 111. Proceedings of the Second Annual ACM Conference [2] P. Gill, M. Arlitt, Z. Li, A. Mahanti, Youtube on Multimedia Systems, ACM, 2011, pp. 133–144. Traffic Characterization: A View From the Edge, in: [17] Melnyk, Miguel A and Stavrakos, Nicholas J and Proceedings of the 7th ACM SIGCOMM Conference Penner, Andrew and Tidemann, Jeremy and Breg, on Internet Measurement, ACM, 2007, pp. 15–28. Fabian, Adaptive Bitrate Management for Streaming [3] Information Technology – Coding of Audio-visual Media Over Packet Networks (2011). Objects – Part 14: MP4 File Format (2003).
File đính kèm:
- reducing_startup_time_in_mp4_on_demand_video_streaming_servi.pdf