Integrating SmartPlay into Your Encoding and Distribution Ecosystem

by Jan Ozer

In this post, we will discuss pricing and how to integrate SmartPlay into your encoding, delivery, and playback infrastructure.

Pricing Overview

Let’s briefly discuss the SmartPlay pricing model here and look at ROI at the end of this document. There are two pricing models. The first is based on usage, where usage is primarily based on either hours of viewing or number of subscribers. This model is most used by customers who deploy SmartPlay using the Quality mode to reduce cost/bandwidth and improve quality.

The other model is based on data (PBs) optimized which is available where the customer is deploying in Basic mode. If the primary reason for the purchase is cost-savings this model works better because the customer knows their CDN costs per PB and the savings that SmartPlay delivers, with the quality improvement as an added benefit.

MediaMelon does not charge based upon the number of video assets or video analyzed -pricing is all based on video consumption. MediaMelon also doesn’t charge for system components like the Content Analyzer; customers can deploy as many copies as necessary to measure the quality of their existing libraries and then scale back to handle ongoing demand. More on this in the next section.

System Overview

As covered in the previous post, SmartPlay works via hintfiles generated by the Content Analyzer that contain QBR quality data for each video asset. SmartPlay-enabled players use this data to choose the segments to retrieve, rather than their typical ABR logic. QBR is the perceptual video quality algorithm utilized by SmartPlay.

The diagram shows the two integration points for SmartPlay into customer’s content preparation and deployment infrastructure. At the head end, the MediaMelon Content Analyzer must be integrated with the customer’s CMS/MAM to trigger the production of the hintfiles which are stored with the ABR assets through the delivery pipeline.

Figure 1. SmartPlay integrates with your CMS/MAM to create the hintfiles,
and player for operation.

On the end-user device side, to enable SmartPlay operation, operators must integrate their players with the SmartPlay plug-in. During installation and startup, the MediaMelon Support team works with the Operator’s team to deploy and validate the integration between the Content Analyzer and the customer’s CMS/MAM and the player and the SmartPlay plug-in.

In terms of installation cost, MediaMelon will help customers setup Content Analyzers on their cloud accounts at no charge, though there may be some NRE fee for on-prem and other setups. In terms of player integration, MediaMelon offers existing integrations at no charge and typically waives NRE costs for additional players with sufficiently large volume agreements.

It is important to note that SmartPlay seamlessly supports partial installations of hinted video assets and supported players. If hintfiles don’t exist, players simply use existing ABR logic. If hintfiles do exist but the player doesn’t yet support SmartPlay, it will ignore the hintfiles and use existing ABR logic.

Most customers start with the simplest or the most popular player and add other players over time. They can also start with the top x video assets or top y channels. In this manner, customers can deploy SmartPlay in small planned steps and achieve the full benefits for supported assets and players incrementally during the course of the deployment.

Installing and Integrating the Content Analyzer

The MediaMelon Content Analyzer analyzes all segments of all streams in an ABR package, rates them on a scale from 1-5, and produces an encrypted hintfile for VOD streaming. As described in the following section, this hintfile is delivered to the video player at the start of the playback session and is used by the MediaMelon plug-in to modulate the playback experience.

As mentioned previously, the Content Analyzer produces at least two hintfiles; one for smartphones and another for all other devices. If the ABR technologies deployed by the operator use different segment sizes, the Content Analyzer creates separate hintfiles for all technologies.

In operation, the Content Analyzer utilizes a Machine Learning engine that is trained on the operator’s content. During installation, the system is trained on a subset of customer content. During the deployment, MediaMelon’s Analytics provides feedback on the performance of the QBR algorithm across the entire deployment which is fed back into the system to further improve the quality-related accuracy of the Content Analyzer.

Content Analyzer Speeds and Feeds

MediaMelon provides the Content Analyzer as a Docker container and can be installed either in a stand-alone machine on-prem or in the cloud on a virtual compute instance. As mentioned, there is no separate charge for the Content Analyzer so customers can deploy as many as needed to produce hintfiles for their existing libraries as well as for their newly acquired content.
The Content Analyzer is codec agnostic but must be tuned separately for each codec.

MediaMelon has tested very extensively with H.264, less so with HEVC, and very little with VP9 or AV1, which are not deployed by any existing customers yet. For supported formats, the Content Analyzer can work with video in MP4, TS, and fMP4 wrappers, either unsegmented or segmented for HLS or DASH.

Figure 2. You can run the Content Analyzer manually (shown),
via batch commands, watch folders, or a REST API.

Typically, operators integrate the Content Analyzer using watch folders or REST API calls with their CMS/MAM and MediaMelon offers a web-based interface for manual asset processing (see above). In addition to the Content Analyzer GUI and REST API, operators can generate QBR hintfiles using the QBRPrep command-line utility. This does not contain the database and backup capabilities of the Content Analyzer tool but is suitable for direct integration into a workflow via a command-line interface.

A single instance of the Content Analyzer on a modern system runs at about 10x real-time, assuming a typical ABR asset. Processing speed depends on NAS and network speed as well. Operators can deploy multiple Content Analyzers in parallel and feed off of the same queue (watch folder or other automation).

As a rough calculation, assume an operator has 10,000 hours of existing content. Depending upon their priorities (e.g. time-to-market vs. compute availability), they can choose to deploy one or more Content Analyzers. Simple math, for 10k hours of content, they will need 10k/10=1k hours = 42 days for a single Content Analyzer instance, or ~5 days for 10 CA instances. It’s safer to also budget a 10% overhead for delays, reruns etc.

As mentioned, most operators produce hintfiles for their content incrementally, as any content without a hint file is simply distributed via existing ABR logic.

Integrated Operation

As mentioned, most operators produce hintfiles for their content incrementally, as any content without a hint file is simply distributed via existing ABR logic. Most operators run the Content Analyzer via integration with their CMS/MAM. These steps describe the sequence of events from the time a new media asset becomes available to the time it is played by the end-user device:

1. New media asset. A new media asset becomes available in the main media storage repository. The asset is already transcoded to the customer’s encoding ladder and optionally segmented/packaged in ABR delivery protocols (such as HLS or MPEG-DASH).

2. New Job file. The CMS/MAM creates a new Job file (Figure 3) and lists the properties of the new media asset and its variants. The Job file is placed in the shared repository that has been configured for the SmartPlay Service.

Figure 3. The new Job file tells the Content Analyzer to produce the hintfiles.

3. New Analysis job. Once the new Job file is detected in the shared repository, the SmartPlay Service generates a new analysis job task and adds it to the processing queue. The job file is removed from the shared storage. The queued jobs are executed in FIFO fashion by one or more worker instances that analyze all segments in the ABR package and create the hintfile.

4. New Hintfile(s). Once the analysis is done, one or more hintfiles are produced, depending on the segmentation variations (e.g. 2 sec vs 6 sec segment duration) and the target playback device families (e.g. big vs small screen sizes). The hintfiles are stored in the shared storage repository and the corresponding media assets are removed.

5. Publishing of new media content. Once the hintfiles are detected in the shared storage, the CMS/MAM service publishes them to the VoD Portal where the ABR assets of the media content reside already.

6. Playback of new media content. When the end-user starts to watch the new media content, the corresponding assets and hintfiles are downloaded (from the VoD Portal or the CDN) and the SmartPlay-enabled player is able to control which segments are retrieved for playback.


Working with Just-In-Time or Dynamic packagers

The use of just-in-time or dynamic packagers does not impact SmartPlay unless the segment duration is changed from the duration used to create the initial hintfiles, which typically isn’t the case. When the segment duration is changed for some reason, the operator must generate a new hintfile.

In these cases, the Content Analyzer doesn’t have to start from scratch. Rather it can use quality-related metadata stored during the initial content analysis to accelerate hintfile generation.


SmartPlay Live

During live streaming, the Content Analyzer takes RTMP or MPEG2TS streams as input and produces a metadata stream in a sliding-window fashion similar to HLS and DASH manifests as opposed to a metadata file. Players subscribe to the stream to access the hintfile information which uses a presentation time stamp to correlate between the metadata stream and the video stream.

The process of analyzing and generating hints itself takes less time than the segment length, typically around 200ms, which can be reduced even further using certain optimizations like not decoding all the profiles, and other techniques. For this process, the Content Analyzer can use a different feed than what is being sent to the packager to eliminate any chance of disruption or delay.

In some instances, the Content Analyzer can provide the hintfile before the video reaches the player, which happens because of inherent delays in the OTT stream or delays for regulatory reasons. In these cases, the player has an advance view of video quality and if the buffer space is available, it can fully implement quality mode and increase bitrates of the video to improve quality. If the advance view is not available, SmartPlay can only reduce bitrates, providing cost savings but no quality increase.

MediaMelon has tested SmartPlay Live with a number of tier-1 operators. The results showed that SmartPlay can reduce CDN costs even when videos are encoded with content-aware encoders like Harmonic EyeQ and Elemental QVBR. The test also showed that if the hint file stream gets to the player in advance, SmartPlay can improve quality as well.


Player Integration

The SmartPlay plug-in is available in JavaScript, Java, C++, and Roku’s Brightscript and is compatible with any platform that provides access to buffer status and the ability to direct the player to select an alternate bitrate / ABR track. The plug-in’s memory and CPU footprints are minimal as it doesn’t decode or display video, it just downloads the hintfile, parses the data, and communicates with the media player and the SmartPlay portal. In MediaMelon lab tests, the plug-in adds about 5% to CPU overhead and consumes about 200 KB of memory.

Installing the plug-in requires a minor integration with the player to add communication calls that SmartPlay needs for the switching decisions, which is briefly described below. MediaMelon has existing integrations with all open-source players, including Exoplayer, Shaka, VideoJS, and others, which provides compatibility with any Android-based STB, dongle, or smart TV. With commercial players, MediaMelon has integrations with Nexplayer, Visualon, Bitmovin, Theoplayer and others, and has created integrations with iOS and tvOS.

For unsupported players, MediaMelon staff works with the player vendor to enable the necessary communication between the player’s software development kit and the SmartPlay plugin, which typically requires less than 10 lines of code. At this point, there is no charge for these new integrations.

SmartPlay Operation

SmartPlay operation involves the ABR Player, the SmartPlay plug-in, and the MediaMelon SmartPlay Portal which is run by MediaMelon as a SaaS. When a player is initialized (i.e. when the player window is shown but before the user presses play), the SmartPlay plug-in is also initialized, and contacts the MediaMelon portal to register the user (operator, device, network etc) and obtain the SmartPlay initialization parameters, such as operating mode (Quality vs. Bitrate), target quality levels, the location of hintfiles, etc.

Figure 4. Signal flow diagram for SmartPlay integration.

When the ABR player loads a new manifest file, the SmartPlay plug-in initiates a parallel load process for the corresponding hintfile. The critical video delivery path is never altered/disrupted, so the manifest files are not modified and do not carry any signals for SmartPlay.

The core player is never aware of the existence of hintfiles, which are loaded and used by the SmartPlay plug-in to inform the switching decisions.

During operation, the ABR player provides track information from the master manifest to the SmartPlay plug-in, along with any incompatible tracks and any protected tracks, such as advertisements, that the plug-in should not attempt to optimize. Before retrieving a segment, the ABR player sends that recommendation to the SmartPlay plug-in which either confirms the decision or sends the ABR Player a different segment to download.

Periodically, throughout the play session, the SmartPlay plug-in communicates with the MediaMelon Portal to deliver usage statistics and update its configuration.

Redundancy and Fallback

SmartPlay is designed to ensure against any service interruptions. For example, the MediaMelon SmartPlay portal has both a primary and backup configuration hosted on different servers.

If the MediaMelon SmartPortal is not accessible during the player initialization (e.g. before the play starts), the ABR player will fall back to ABR mode. If the MediaMelon Portal is accessible during the player initialization and becomes inaccessible after the asset began playing, then SmartPlay continues to operate normally, though playback statistics may not be reported accurately to the MediaMelon portal during the outage.


Return On Investment

Upfront, I described high-level pricing policies; these numbers from MediaMelon show pricing based upon the per-subscriber model and summarize the Return on Investment for three customer scenarios.

MediaMelon’s calculations assume a 25% bandwidth saving and a 10% reduction in churn due to quality of experience improvement. If you factor in only the bandwidth savings, which appear modest given the real-world numbers we saw from Telecine in my previous article, the ROI is approximately 3X. If you factor in the additional revenue from customer retention, the ROI increases to over 10X.


MediaMelon helps with improving OTT service monetization.  Contact us for more information, a demonstration and to discuss a POC