Introducing Azure Media Test Tool
A reliable and versatile test tool is very important in building a video streaming solution. This is of course also true for building solutions on Azure Media Services, either live or on-demand. For example, in live streaming, even without content protection or CDN, an “issue” could be due to any one or more of the following components:
- Live encoder;
- Azure Media Services channel;
- Azure Media Services streaming endpoint/dynamic packager;
- Player framework/SDK;
- Player application.
These five components could well be from four different vendors (as in the case of NBC Sports/Sochi Olympics solution). A reliable test tool is important in helping you determine the source of issue. Azure Media Test Tool (https://aka.ms/amtest) has been developed for the goal of facilitating such efforts.
Azure Media Test Tool is a browser tool based on Azure Media Player API. It always runs on the “latest” released version of Azure Media Player API. And it can be used to test different combinations of protocols between player and streaming:
- Player in HTTP, streaming in HTTP;
- Player in HTTPS, streaming in HTTPS;
- Player in HTTP, streaming in HTTPS;
- Player in HTTPS, streaming in HTTP (this mixed mode is not recommended for production purpose due to security concern.)
Azure Media Test Tool supports the following:
- All events are handled displayed (this can be disabled so that playback does not fall off the live edge due to too much CPU demand);
- All error details are displayed, as much as API can capture;
- All playback statistics are displayed;
- All Video Telemetry is captured (yes, the author recently developed an Azure-based Video Telemetry solution and has been used in Azure Media Test Tool);
- All major browsers are supported with different tech being selected on different browser/platform combination.
Some Features of Azure Media Test Tool
Below are among the growing list of features supported by Azure Media Test Tool.
Almost all configurable parameters exposed by Azure Media Player API are made available through UI in this tool. You can show/hide the configurations section by clicking on the “player_settings” link at top left part of the screen. By default the configurations section is hidden.
Events and Errors
All player events are handled and event info is printed. If error occurs, error info is also printed.
To test dynamic ad insertion in live streaming, either before a live streaming event or in the process of building a live streaming solution, we need to make sure that SCTE-35 ad markers inserted through live encoder API indeed flow through the live channel workflow and appear in client manifests. In addition, we need to make sure these ad markers have the correct cue IDs and ad durations. The following screen shot shows the ad markers in the output of Azure Media Services dynamic packager, delivered to client players.
Live Encoder Thumbnails
If you use live encoding in Azure Media Services, unlike the case in which live encoder running outside of Azure, the preview content is the output of live encoder, instead of directly from ingest. For troubleshooting or live event monitoring, we may need to check live encoder’s working status by checking its thumbnails output periodically. If you paste the preview URL of a live channel into the URL text box, and click on “live_thumbnails” at the bottom of the page, live encoder thumbnails will be shown at the bottom, refreshed every 15 seconds, as shown below.
If you only need to test PlayReady protected contents or CENC with multi-DRM protected contents without access control, you can use the tool under either HTTP or HTTPS without need to login. More details on DRM and Common Encryption features of Azure Media Test Tool can be found here. If you click on “drm_cenc” link at the bottom, protection header information is displayed, as shown below.
This test tool also includes an end-to-end PlayReady DRM and Common Encryption with multi-native-DRM subsystem. The end-to-end DRM/CENC feature is required to be run under HTTPS and you need to contact the author to add your login. For various test scenarios of using different native DRMs on different platforms, one can see the test section in the blog CENC with Multi-DRM and Access Control: A Reference Design and Implementation on Azure and Azure Media Services. Different login accounts in different domains are also discussed in this blog. You can use your MSA (Microsoft Account like firstname.lastname@example.org or email@example.com), Microsoft domain account (if you are a Microsoft employee) or an account created in the custom domain (willzhanad.onmicrosoft.com).
Tokens and Claims
In the end-to-end PlayReady DRM or CENC with multi-native-DRM content protection with access control, JWT tokens and the claims contained in them are of vital importance. The Azure Media Test Tool allows you to inspect all the involved authorization_code, id_token, access_token, and claims.
Azure Media Test Tool is integrated with the Video Telemetry solution which was developed by the author using Azure Application Insights. With Video Telemetry data processed and stored in Azure storage, the telemetry data can be viewed via either Preview Azure Portal or Power BI using Application Insights Content Pack for Power BI. The screenshot below is the Power BI dashboard for Azure Media Test Tool over past 30 days.
Live Archive Absolute Time
When we use PresentationTimeRange in Dynamic Manifest Manipulation (DMM) .NET API to virtually cut the beginning and end of a live archive, we need the absolute time (the time code often created by live encoder). However, when we play a live archive, what we observe is the relative time from the start (0) of the video. Azure Media Test Tool provides the formula to calculate absolute time from relative time for a given live archive. You can just put in your live archive URL in the tool, and click on live_archive link at the bottom, the formula will be displayed as below:
Spherical Video for 360/Virtual Reality
Virtual Reality (VR) video streaming, both live and on-demand, is already a reality. At 2016 NAB, Azure Media Services Team announced and demonstrated Azure Media Services support of live and on-demand delivery of 360/VR streaming. To facilitate testing of VR video streaming, Azure Media Test player supports playback of spherical video in Chrome, Firefox and MS Edge and the streaming will be in DASH. Here are the simple steps to test spherical video playback in DASH.
Your Feedback Is Welcome
Your feedback is welcome and will be seriously considered for future features to be added to the test tool. Please direct your suggestions and questions to William.Zhang@microsoft.com.
And have fun with the tool!