HTTP Live Streaming player

HLS Player

Custom HTTP Live Streaming Solutions

Our custom HTTP live streaming (HLS) solutions include advanced adaptive bitrate streaming, robust content delivery networks, and integration capabilities. We offer high-quality video streaming experience for your audience, regardless of their device or network conditions.

In addition to HLS player design, we provide STB and smart TV app development services, implement required middleware, and integrate CAS and DMS solutions. Whether you need to customise an off-the-shelf solution or build a new one from scratch, our team can assist you at every development stage.

Challenge

Our team worked on a project to enable live TV playback 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 resulted in various video/audio glitches.
 

Our Solution

We examined the HLS player implementation and discovered it was a modified version of the standard NuPlayer, copied to the /vendor AOSP folder and renamed to Am-NuPlayer. Although the solution provider made changes to support additional features, the audio switching and seeking functionality could have been improved.

Upon further analysis, we identified the root cause of the issue in the module responsible for content downloading. However, due to its specific architecture, improvements were impossible. As a result, we opted to create our own HLS implementation and integrate it with 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 tracks on-demand, and 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 retrieves 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 to be fetched.


Media Container

Media Container stores downloaded segments for each open track. It has an interface both for the Media Downloader to stack the downloaded data and for the client to supply it with data. Additionally, it allocates memory for the downloaded data directly to the Media Downloader, minimising unnecessary data copying. 

Technologies

HLS, C++, AOSP, AMLogic SDK

Kirill Zut Promwad

"The project results are excellent. We developed the HLS player in C++, making it platform-independent and capable of running on desktop Linux and Android systems. Through the new HlsSource module, the player communicates with AmNuPlayer, enabling fast and smooth audio track switching without any visible audio/video glitches. It effectively handles separate audio tracks from different playlists, as well as built-in audio tracks within the same video stream".

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

Do you need a quote for your engineering project in the digital TV & video streaming sector?

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