HTTP Live Streaming player

HLS Player

HTTP Live Streaming Player

Promwad ODC / DTV has unique experience in the development of set-top boxes and the integration of MW and CAS / DRM solutions. In addition to engineering support and development services for backend and client software and related hardware, we provide our clients with an optimized HLS streaming solution.

You get either a final solution or a custom one: depending on your needs, we can quickly deploy any additional functionality in your HTTP Live Streaming player.

Challenge

Our team worked on a project where the main challenge was playing Live TV via HLS protocol on the Amlogic S905x platform set-top box.

The playback itself was stable enough, but we encountered several problems with additional functionality. For instance, time-shifted viewing, switching between audio tracks, or seeking the video worked with different video/audio glitches that were quite irritating.

Our solution

We examined the player implementation. It appeared to be a modified copy of standard NuPlayer, copied to /vendor AOSP folder and renamed to Am-NuPlayer. Solution provider changed it to support some additional features, but audio switching/seeking was not good enough.

We found the cause of the problem in the module responsible for downloading the content, but its specific architecture didn’t allow any improvements. So instead, we decided to write our own HLS implementation and adapt it to the "Source" API.

hls player promwad

HLS library architecture

HLS library architecture


HLS Download Manager

The main class is responsible for data downloading and storage. It stores data on all possible HLS-stream tracks, opening track on-demand, starting and coordinating the process of downloading playlists and segments of all open tracks. It also switches the quality of the playback. 


Media Downloader

Media Downloader downloads data for a specific open track. The class has two main commands – updateUrl and downloadNext. MediaContainer can notify the client about new data and give it to the client right after a download has been started. So the client (player) can start playing without waiting for the first segment download.


Media Container

Media Container stores downloaded segments for each open track. It has an interface both for Media Downloader (to stack the downloaded data) and for the client to supply it with data. It allocates memory for the downloaded data to the Media Downloader. It helps to avoid unnecessary data copying. 

Technologies

HLS, C++, AOSP, AMLogic SDK

Kirill Zut Promwad

"The project results are excellent. We have written the HLS player in C++, so it is platform-independent (it can work at least on desktop Linux and Android) and does its job well. Via the new HlsSource module, the player communicates with AmNuplayer and allows fast and smooth audio track switching without any visible audio/video glitches. It can handle separate audio tracks (from different playlists) and built-in ones (when several audio tracks are in the same stream with video)".

— Kirill Zut, Head of ODC/DTV department at Promwad.

Do you need a quote for your engineering project for the DTV & broadcasting industry?

Please, drop us a line. We will contact you today or next business day. All submitted information will be kept confidential.