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.
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).
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.