DataArt Builds an Open-Source Video Player Using MPEG-DASH

18/03/15
Share

As you may have seen this morning, we recently launched an open-source video streaming solution, built to use MPEG-DASH.

See also: Under the Hood: Harvey’s Army App Development.

For around three years, MPEG-DASH has been the Next Big Thing; an ISO ratified standard that aims to create a better experience for content makers, advertisers, and more importantly, consumers streaming video.

Today, the technology is adopted by UStream, LiveStream, YouTube and several others; there are rumblings that the biggest DASH holdout – Apple, is going to sign on by autumn 2015.

In the spirit of open-source, I'd like to offer you a look behind the curtain of our development. When building our new video player, we ran into some interesting hurdles.

DataArt developed its own mobile video streaming application using MPEG-DASH technology running on an iOS client, similar to proprietary commercial products such as HLS. 

  • In order to get around the operating principles of this standard, our team installed an Nginx server and deployed video streaming with the help of FFmpeg. In order to playback test the video we used a web browser with a dash.js backend.  During the first stage of the development we realized that it's possible to build the player using the open-source object-oriented library Libdash. The team knew that Libdash is a simple parser that would allow receiving manifests through a specific URL and break it down into C++ classes, however, it appeared to be not of much help in our case. Therefore, for convenience in working with Objective-C we've re-implemented the parser functionality using standard libraries and the standard NSURLConnection for HTTP requests.
  • After a few hiccups with compatibility and synchronization, we started testing the client on an iPod touch 5th Gen. That's when it was discovered that playing HD videos had a low fps rate due to lags in decoding and led to the decision of transferring this task to the GPU, which solved the problem. At the stage of VoD deployment we implemented play/pause/rewind features and the ability to select stream links with a history table.
  • We developed an algorithm adaptive to network conditions that was able to select the quality of the next segment depending on the download speed of previous ones and, at the same time, automatically choose the segment size that would download in less time than the playback of the previous. In the future we plan to improve the algorithm by implementing MDP (Markov decision process).
  • The final stage was to solve a problem with the different data types contained in manifests, some of which had bit ranges on the server while others pointed to initialization segments and sidx (SegmentIndexBox) that had bit ranges for every media-segment on the server. The solution appeared to be close to hand as we found that there is a built in JavaScript parser in dash.js that we successfully converted into a segment download algorithm in Objective-C.

As a result, we built a speedy mobile video player with the ability to maintain stable HD playback, dynamic ad insertion and integrated support of digital rights management. The players' code is open-source; therefore, it can be used as the basis for custom development and tailored to meet specific needs.

To reiterate what we said in the press release, there are many benefits to MPEG-DASH. Common encryption, efficient ad insertion and Support for multiple CDNs/caches with the same manifest are chief among them. Today, we're very excited to make our contribution to this vibrant eco-system.

https://github.com/MPEGDASHPlayer
Sign Up for Updates!

Subscribe now to receive industry-related articles and updates

Choose industries of interest
Thank You for Joining!

You will receive regular updates based on your interests. No spam guaranteed

Add another email address
Read more
Sign Up for Updates!
Choose industries of interest
Thank You for Joining!

You will receive regular updates based on your interests. No spam guaranteed

Add another email address
Welcome
We are glad you found us
Please explore our services and find out how we can support your business goals.
Get in Touch