MPEG DASH: Streaming with DataArt



    Delivery networks

    The volume of multimedia content delivered to end users is growing. Owning and managing an appropriate delivery infrastructure is an inefficient investment for most companies, especially if IT is not their target business. In these cases, as a rule, third-party solution providers are used - the so-called Content Delivery Networks. Media content delivery networks historically focused on static files: images, animations, documents - and had their own delivery infrastructure based on the HTTP protocol.

    A natural step for these networks was the adaptation of video delivery technologies based on the same transport protocol - HLS (Apple), HDS (Adobe) and SmoothStreaming (Microsoft). These technologies - the predecessors of MPEG-DASH - were 99% identical in principle design, but they differed greatly in the way data and metadata were represented.

    The HTTP media delivery scheme includes two components: a description of the sequence of URIs of the components of a media resource and an infrastructure that delivers data in accordance with the URIs specified in the description. The HLS, HDS, and SmoothStreaming protocols radically differ in the description features, although they support similar media formats.

    Unified technology

    Content developers and companies need to support at least two formats to reach 100% of their online audience. For example, Apple products use HLS, and HDS can be used for flash players on older browsers that do not support HTML5.

    The good news is that most modern TVs and set-top boxes support or plan to support the MPEG-DASH protocol. However, native support for Apple’s MPEG-DASH in the near future can not be expected (unlike devices using the Android OS).

    MPEG-DASH Open Source Player

    As you can read here , DataArt recently released a video player that supports the MPEG-DASH protocol.

    Since ratification in the ISO standard, i.e. for three years, MPEG-DASH is considered, to a certain extent, as a technological breakthrough, as it is convenient for content creators, advertisers and, most importantly, consumers. Now this technology is used by the services of UStream, LiveStream, YouTube, etc. There are no rumors that the main opponent of DASH, Apple, is going to revise its policy by the fall of 2015.

    DataArt has developed its own application for viewing video streaming on mobile devices using MPEG-DASH technology for iOS, similar to products such as HLS.

    In the spirit of open source ideas, I suggest looking behind the curtains of our development process. While developing a video player, we were faced with several interesting obstacles.

    • To understand how the format works, the DataArt team installed the Nginx server and deployed the video stream using FFmpeg. To run the test video, we used a browser with support for dash.js. At the initial stage of development, we discovered the ability to create a player using the object-oriented open source library Libdash. Our team was aware that Libdash is a simple parser that allows you to accept descriptions via a specific URL and break it into classes in C ++. However, this information did not help much, therefore, for the convenience of working with Objective-C, we implemented the parser functionality using standard libraries and the standard NSURLConnection for HTTP requests.
    • After a few hitches with compatibility and synchronization, we started testing the client on the fifth generation iPod Touch. It was then that it turned out that playing HD-video was at a low frame rate due to lags during decryption. Therefore, we decided to hang this task on the central processor, which instantly solved the problem. At the deployment stage, VoD (video on demand) introduced playback, pause and rewind functions, the ability to select streaming links using the history table.
    • We have developed an algorithm that adapts to network conditions and can choose the video quality itself depending on the download speed of past videos and at the same time automatically select the size of the segment that can be downloaded in the minimum time. In the future, we plan to improve the algorithm by introducing the Markov Decision Making Process (MDP).
    • At the final stage, they solved the problem with the different types of data contained in the description. Some have server bitrate restrictions, others are tied to initialization segments and sidx (SegmentIndexBox), which have bitrate restrictions for each media segment on the server. But the solution to the problem was not long in coming: we found that JavaScript has a built-in parser with dash.js and successfully converted it into an algorithm for downloading segments in Objective-C

    As a result, we created a smart mobile video player with stable playback of HD-video, dynamic built-in advertising and integrated support for digital rights management. The player’s code is in the public domain, and accordingly, it can be manually changed to meet specific requirements.

    According to the press release, MPEG-DASH has many advantages: general encryption, effective ad insertion and support for multiple CDNs and caches with a common dominant description. We are pleased to contribute to this vibrant ecosystem.
    github.com/MPEGDASHPlayer

    Authors:
    Andrey Sorokin, Senior Software Architect.
    Roman Egoryshev, Vice President, Media and Entertainment.

    Also popular now: