Over the past decade, online streaming has undergone tremendous evolution. Initially, most streaming took place on desktop devices, but that is no longer the case. Today, video streaming is conquering the big screen: smart TVs.
There are quite a few different OTT operating systems to keep in mind when venturing into TV streaming, and given its popularity, Samsung’s Tizen should be at the top of your list. Deploying an OTT app on the Tizen operating system is generally straightforward, but there are a few technical elements to consider.
In this article, we will explore possible approaches to delivering apps and enabling video playback. We’ll walk through the strengths and weaknesses of different types of media players for building an app for the Tizen operating system on Samsung devices.
TL;DR: Developing a Tizen TV app at a glance
- Bringing video efficiently to all different versions of Tizen is a challenge, but your audience likely uses a wide range of different Tizen versions. Therefore, premium OTT video services can not simply ignore older versions.
- Native playback is available using AVPlay, but it comes at a cost. It is tempting to use Tizen’s native AVPlay streaming support, as it is easy to get started, but it is usually too limiting for premium OTT video providers and can cause issues due to different support across versions. This becomes especially apparent when your use case includes DRM or SSAI.
- You can use a third party or your own video player on Tizen for greater flexibility. MSE and EME make this possible. Since there is still a broad variation of different API versions available, the video player you use must be optimized for the older versions used in Tizen. Due to the quirks in the Tizen platform and its decoders, it is also crucial to ensure that your player optimizes for these to avoid playback issues. When picking which player to use, make sure to check compatibility.
The basics of developing apps on Tizen
One of the most notable “big screens” in the streaming space is Samsung with the Tizen operating system. Samsung accounts for 49% of streaming on smart TVs, leaving other vendors such as LG and Vizio in the rearview.
Due to its growing popularity, with almost 50 million Samsung Smart TVs shipped every year, interest in deploying OTT apps directly on these devices has risen significantly. Its popularity and rapid evolution over the past few years make it a solid choice for investing in your streaming app’s platform expansion.
Users can install Tizen apps from the Samsung App Store. Fortunately, publishing an app in this app store isn’t all too difficult. Similar to most app stores for other platforms, applications are submitted for review to Samsung and, once approved, will be published in the store. However, it’s worth noting that you need to go through the review process again for any update you want to make to your app.
Two approaches to developing a TV app for Tizen
When developing a TV streaming app, one of the most crucial decisions to make is choosing a video player. This part of the app is critical, as it drives a significant part of the viewer experience. It also determines the number of features your team will need to build and maintain.
In general, there are two approaches to developing a Tizen app: leveraging the streaming support of the native video player (AVPlay) or creating a “bring your own” video player that utilizes advanced APIs.
Approach 1: Use AVPlay, Tizen’s native video player
Like most smart TV systems, Tizen comes with its own native video player, which supports the most common streaming protocols. Tizen’s native video player is called AVPlay. Using AVPlay is relatively straightforward and simply requires loading the AVPlay API library.
With this library loaded, you can easily enable playback using the AVPlay API by defining the playback window, indicating that AVPlay is to be used, configuring a media source, loading the media source to prepare for playback, and triggering playback.
AVPlay video player features
Beyond getting playback up and running very quickly, AVPlay brings some additional capabilities. These include:
- Support for streaming protocols such as Smooth Streaming, MPEG-DASH, and HTTP Live Streaming (HLS)
- Basic trick play by seeking or changing the playback speed
- The ability to receive notifications in case of buffering or errors
- Support for alternative audio channels
- Basic DRM playback
- Support for subtitle formats such as SMPTE-TT, SAMI, and DFXP
It’s worth noting that AVPlay has been around since Tizen’s early days in 2015, with the launch of Tizen 2.3, and has undergone significant evolution. As a result, AVPlay differs in capabilities across different platform versions of Tizen.
Challenges of using AVPlay
There are two main challenges that OTT video publishers often encounter when working with AVPlay: capabilities are limited to basic use cases due to little flexibility, and different versions of AVPlay are tied down to support specific versions of streaming protocols and greatly differ in capabilities.
Where limited basic use case support is often initially not seen as a huge issue, the problems start to grow once new business cases are added.
Some notable use cases that are difficult or even impossible to support properly include:
- Monetization through client-side (CSAI) or server-side ad insertion (SSAI)
- Reducing playback latency for optimal user experience in interactive or live broadcasts
- Advanced bitrate selection (or even manual bitrate selection)
- Identifying streaming issues as error responses is incredibly brief
- Monitoring QoE due to a lack of detailed events (no possibility to inspect the size of the buffer, details of different tracks and qualities, etc.)
- Support for alternative subtitle formats and subtitle styling
- Improved scrubbing with thumbnails or iFrame streams
In addition to these limitations, support for streaming protocols varies significantly between different versions of AVPlay. The root cause appears to be the lack of software updates for Samsung TVs. Samsung tends to have a policy of locking models released in a specific year to the Tizen version released that year. Samsung TVs from 2015 will be locked to Tizen 2.3, while those from 2016 will be locked to 2.4, and so on.
These and similar limitations force you to either set up a specific stream for every Tizen version and incrementally add capabilities, or go for a lowest common denominator approach with limited capabilities across all devices. This decision can have a significant impact on either operational cost or viewer experience.
Approach 2: Bring your own video player with MSE/EME
Due to the limitations of native players like AVPlay, the “bring your own” approach to video players is growing rapidly among OTT video publishers. This approach allows publishers to avoid the most significant issues with AVPlay due to the differences between Samsung TV models and Tizen versions.
When taking the bring your own (BYO) player approach, it is crucial that hardware capabilities for DRM decryption and media decoding can be leveraged. This has an impact on the viewer experience, as it unlocks more advanced streaming capabilities, such as HDR.
On Samsung’s Tizen platform, media hardware access is possible thanks to the Media Source Extension (MSE) API and the Encrypted Media Extension (EME) API. While versions differ, Tizen’s support is broad enough to implement almost all the most essential use cases with only a minor set of limitations.
MSE API
The MSE API provides access to the decoders. Samsung has gradually extended support for this over the last years, increasing frame rates, resolutions, and bitrates as devices became more powerful. The API allows an application to allocate buffers on the device’s audio and video decoders and feed them with media data.
This enables the implementation of standard streaming protocols, such as HLS and MPEG-DASH, among others. A video player can download the required playlist or manifest, identify the relevant segments, download them, and append them one after the other as playback happens.
EME API
In parallel, the EME API enables applications to play back DRM-protected content and provides access to the Content Decryption Modules (CDMs), which are available on the platform. On Tizen, this allows you to access the underlying key systems for PlayReady and Widevine.
When media is protected with one of these DRMs, the EME API will expose this and allow the application to configure the CDM with a response to its license challenge. Fortunately, leveraging the EME API to play back DRM-protected content is relatively straightforward.
Functionalities of a fully-featured video player
A fully featured media player has so much to offer. Some of its key functionalities include:
- Identifying user behavior, such as playing/pausing
- Reacting to the user seeking a new timestamp
- Modifying the media player’s volume
- Following the appropriate autoplay policies to start playback upon the application being opened
- Providing support for changing the playback speed
- Monitoring the available network environment and dynamically switching to the appropriate bitrate
- Ensure continued playback in case media data is unavailable
- Avoiding and handling buffer underrun (and the resulting stalling behavior for viewers)
- Exposing alternative audio and video tracks to the viewer and allowing them to switch
- Retrieving and overlaying subtitles and closed captions, timed exactly right to ensure a good viewer experience
- Handling errors in the DRM license request flow
Choosing a media player when developing a Tizen App
Even with all the basics implemented, there is still a significant difference between different media player options. While there are open-source libraries such as hls.js, dash.js, and Shaka Player that provide basic playback support for the HLS and/or MPEG-DASH protocol, more advanced players such as Dolby OptiView Player give even more support.
These advanced players support integrations with various DRM systems, monetization options with CSAI and SSAI, picture-in-picture support, offline downloading, and more.
However, the most critical parameter to consider when choosing a media player for Tizen is the list of supported platforms and versions. Most popular libraries are built with web browsers in mind for laptops and mobile devices. Often, the assumption is made that all browsers implement all APIs in the same way, but they can differ significantly.
Also, the Tizen platform and smart TVs in general often have significantly different hardware and use cases than standard playback on a laptop. This can lead to risks if smart TV platforms are forgotten and do not make it into the testing cycle.
For example, the compatibility list of hls.js does not list Tizen, dash.js doesn’t list any platforms at all, and only claims to rely on MSE being implemented, and Shaka Player only mentions Tizen 2017 models as actively tested and supported.
Using Dolby OptiView Player for building a Tizen app
At Dolby, we actively support the Tizen platform and have code to handle differences and quirks compared to standard browser environments in our Dolby OptiView Player SDK.
This includes:
- Workarounds for limitations in the number of decoders that can be used in parallel
- Switching from one video codec to another
- Enabling and disabling DRM
- Handling for higher bitrates
- Alternative codecs
- HDR content on big screens
Since compatibility issues from version to version are a concern with Tizen, it’s helpful to use a media player that is equipped to adapt as needed.
Alternative: Use a hybrid of both approaches
Another option is to use a hybrid approach where you leverage a BYO approach, and fall back to AVPlay for other use cases. Dolby OptiView Player allows you to configure which version you want to use the MSE/EME approach, and on which versions you want to leverage AVPlay through a single API for configuration and interaction with other systems such as QoE and QoS monitoring.
In practice, it is most valuable to leverage MSE/EME, especially for later versions of Tizen. For really early versions of Tizen, using a hybrid approach allows you to enable AVPlay on those specific old versions where it still makes sense in your target audience.
The hybrid approach can bring the best of both worlds with extensive capabilities using a BYO video player, while falling back on AVPlay for difficult-to-support versions.
Final thoughts
Choosing your video player can be a daunting process. You need to ensure that all key features are present and that compatibility across different versions of Tizen is guaranteed for your use cases.
If you’re looking to take a BYO approach to developing a streaming app for Tizen, we are here to help. The Dolby OptiView Player is a powerful tool for creating dynamic viewing experiences that are compatible with different versions of Tizen OS and Samsung TVs.
Contact us to learn more about how our player can fit into your app development!