Professional Documents
Culture Documents
Video On Demand (VOD) : Technical Data Deck
Video On Demand (VOD) : Technical Data Deck
Demand (VOD)
Technical data deck
Agenda
Technical introduction Players
• Market situation & fragmentation
Media ingest • Azure Media Player
• • Native app solutions
Ingest technologies
• • Partner solutions
Assets & asset files
Publishing
• Streaming units
• Locators
• Dynamic packaging
• Dynamic manifest
Deliver media anywhere
What happens when you combine a great cloud with great delivery?
Portal Azure AD
Connect Health
Batch Mobile Logic Notification
Remote App Team Project Application
Apps Apps Hubs
Active Insights AD Privileged
Directory Identity
Management
Multi-Factor
Authentication Analytics & IoT Media & CDN Data Backup
VoD/Live Media
HDInsight Machine Transcoding Analytics SQL SQL Data
Automation Operational
Learning Database Warehouse
Insights
Key Vault Data Event Multi DRM VoD/Live Channel Redis Import/Export
Streaming Cache Search
Factory Hubs
Store /
Marketplace Site
Stream Mobile Recovery
Azure Media Content Delivery DocumentDB Tables
Analytics Engagement
Player Network (CDN)
VM Image Gallery StorSimple
& VM Depot
Infrastructure Services
Compute Storage Networking
Virtual Containers BLOB Azure Files Premium Virtual Load DNS Express Traffic VPN Application
Machines Storage Storage Network Balancer Route Manager Gateway Gateway
• Fast, parallel writes, secure and protected both during transit and while at
rest in the cloud
• Secure HTTP and fast UDP upload for files
• RTMP, MPEG2-TS/RTP, and fMP4/HTTP ingest for Live
• Multiple storage redundancy options
• Azure ExpressRoute
• Lower latency
• Increased reliability and speed
• Better security
Encoding
Release
http://aka.ms/amse
Source code
https://github.com/Azure/Azure-Media-Servic
es-Explorer/
Blog post
http://azure.microsoft.com/blog/2014/10/08/
managing-media-workflows-with-the-new-az
ure-media-services-explorer-tool/
Azure Media Services SDKs and REST API
You can call the API from any development language and implement
complex workflows
PHP: https://azure.microsoft.com/en-us/develop/php/
Java: https://azure.microsoft.com/en-us/develop/java/
.NET: NuGet package: windowsazure.mediaservices
AMS Acct
Media Ingest
• HTTP Upload
• Can use ExpressRoute ASSET ASSET ASSET
ExpressRoute
(Block Blob) SIGNIANT
• BULK Upload
• Create ingest manifest (BULK)
• Upload files to Blobs
(optional AES encryption)
• Poll manifest progress
FILE(S)
Media assets
Block Blobs inside Storage Container
ASSET
... • Video Files
(stitching, video overlays)
.MXF .MP4 .TS .MOV
• Audio Files
... (dubbing, audio overlays)
.WAV .MP3
... • Images
(logo overlay)
.PNG
Assets
Are identified through a unique ID – link to a block blob location on storage
Can take a custom ID through their “AlternateId” attribute
Can be uploaded
• Clear: no encryption (AssetCreationOptions.None)
• CENC: for CENC encrypted content (AssetCreationOptions.CommonEncryptionProtected)
• Envelope: for HLS AES encrypted content (AssetCreationOptions.EnvelopeEncryptionProtected)
• Storage Encrypted: on-disk AES 256 encryption (AssetCreationOptions.StorageEncrypted)
When encrypted before upload, the key needs association with asset
Unencrypt:
• For Encoding / Processing: automatic decryption for Storage Encrypted assets (not for CENC or Envelope)
• For Streaming: or progressive download: through an Asset Delivery Policy
with policy type “NoDynamicEncryption”
• Unencrypt with a processor
• Download through SDK
Asset upload example
Add NuGet package “windowsazure.mediaservices”
var assetFile =
inputAsset.AssetFiles.Create(“video.mp4”);
assetFile.upload(@“C:/videos/video.mp4”);
Reserved Units
Media Services
VOD Encoding Stage
• Scale Up
• Scale Out
• Manage Jobs by Priority
Chaining:
TASK 2 TASK 3
Media processors for encoding
Media Encoder Standard Media Encoder Premium Workflow
Presets: Ease Presets: Power
- Single string presets - No presets
- Customizable JSON presets - Always custom designed, using
- Declarative Premium Workflow Designer
{ { {
"Version": 1.0, "Profile": "Auto", "Profile": "AACLC",
"Codecs": [ "Level": "auto", "Channels": 2,
{ "Bitrate": 400, "SamplingRate": 48000,
"KeyFrameInterval": "00:00:02", "MaxBitrate": 400, "Bitrate": 128,
"H264Layers": [ "BufferWindow": "00:00:05", "Type": "AACAudio"
{ "Width": 320, }
"Profile": "Auto", "Height": 180, ],
"Level": "auto", "BFrames": 3, "Outputs": [
"Bitrate": 3400, "ReferenceFrames": 3, {
"MaxBitrate": 3400, "AdaptiveBFrame": true, "FileName": "{Basename}_{Width}x{Height}_{VideoBitrate}.mp4",
"BufferWindow": "00:00:05", "Type": "H264Layer", "Format": {
"Width": 1280, "FrameRate": "0/1" "Type": "MP4Format"
"Height": 720, } }
"BFrames": 3, ], "Type": "H264Video" }
"ReferenceFrames": 3, }, ]
"AdaptiveBFrame": true, }
"Type": "H264Layer",
"FrameRate": "0/1"
},
Media Encoder Standard
var job = _context.Jobs.Create(“MES Job”);
var processor = _context.MediaProcessors.Where(p => p.Name ==
“Media Encoder Standard”).ToList().OrderBy(
p => new Version(p.Version)).LastOrDefault();
job.Submit();
Media Encoder Premium workflow
Does not take a preset string but takes a workflow as first input asset
Create a .workflow file using the “Workflow Designer” desktop software
Upload .workflow file into a new Asset
When launching “Media Encoder Premium Workflow” job:
• Use .workflow asset as first input asset
• Use media asset to encode as second input asset
• Use an empty configuration string, unless for advanced “property-override” scenarios like multi-file input
http://.../manifest(format=mpd-time-csf)
LOCATOR
MPEG-DASH
http://.../manifest(format=m3u8-aapl)
Streaming
HLS
Units
http://.../manifest(format=f4m-f4f)
• No static packaging, just once the storage HDS (Adobe licensed users only)
• Same url, only differing by suffix
Output • Also works with assets encrypted-at-rest
Asset
Dynamic Manifest: filters
http://.../manifest(filter=mytrackfilter)
http://.../manifest(filter=mytimeandtrackfilter)
Tracks
Streaming Stage http://.../manifest(filter=mytimefilter)
Filter
manifest(filter=mytrackfilter;mytimefilter)
Time
Streaming
Filter
Units
Combined
• Filters can be on two levels:
• Asset Filter
Output • Global
Asset • Asset filters take precedence over global filters when same name is used
• Filters can be combined: (filter=firstfilter;secondfilter) 3 filters max
Filtering tracks
4 Mbps
2 Mbps
Tracks Streaming Stage
Filter
1 Mbps
Streaming
French Audio
Units
Dutch Audio
4 Mbps
2 Mbps
Time Streaming Stage
Filter
1 Mbps
Streaming
French Audio
Units
Dutch Audio
All are expressed in the given time scale (default 10 000 000 HNS)
Learning path – Video on demand
https://azure.microsoft.com/en-us/documentation/learning-paths/media-services-streaming-on-demand
Players
Fragmentation
PC/MAC MOBILE
VIDEO BROWSER BROWSER
NO PLUGIN
Mpeg
Dash
Smooth
Streaming
Content
HLS Protection
Unified CSS UI
Unified JS Interface
Tech order
• Detect browser/device capabilities
DASH player
• Auto determines the best player based on tech order
(HTML5 EME/MSE)
• Selects the correct streaming URLs from AMS
Flash player
Silverlight player
Playback (VOD, live, protected content)
Native HTML5
(Built in browser)
Auto-select of streaming tech
Firefox 41
ith Flas
h Win 10
ac k w
Playb gh t PlayReady
CLEAR
wit h Silverli
ck
Streaming Stage Playba
Playback with Flash
IE11
SMOOTH Win 7
Playback with Silverlight
PlayReady
CLEAR
LOCATOR
Playback with HTML5 MSE IE11
MPEG-DASH Win 10
Playback with HTML5 EME
CLEAR
PlayReady
aka.ms/azuremediaplayer
Getting started
1. Add the JavaScript libraries (CDN)
2. Initialize with JavaScript or HTML
<!DOCTYPE html>
<html>
<head>
<!--Azure Media Player Scripts-->
<link href=“//amp.azure.net/libs/amp/latest/skins/amp-default/azuremediaplayer.min.css" rel="stylesheet" type="text/css">
<script src="//amp.azure.net/libs/amp/latest/azuremediaplayer.min.js"></script>
</head>
<body>
<video id="azuremediaplayer" class="azuremediaplayer amp-default-skin amp-big-play-centered" tabindex="0"> </video>
<script>
var myOptions = {"nativeControlsForTouch": false, autoplay: true, controls: true, width: "640", height: "400", poster:
"[poster uri]" };
Edge Xbox One1 (Nov 2015 update) azureHtml5JS azureHtml5JS not supported
Windows 10
Chrome 37+ Windows 8.1 azureHtml5JS azureHtml5JS azureHtml5JS (Widevine)
Mac OS X Yosemite1
Windows 10
Firefox 42+ Windows 8.1 azureHtml5JS azureHtml5JS silverlightSS (PlayReady)
Mac OS X Yosemite+1
Windows 10
Firefox 35-41 flashSS flashSS silverlightSS (PlayReady)
Windows 8.1
Safari iOS 6+ html5 html5 (no token)3 not supported
Safari 8+ OS X Yosemite+ flashSS flashSS silverlightSS (PlayReady)
Sample
Bitrate selection
• Automatically determines the appropriate bitrate based on the bandwidth
available
• App developers can force a bitrate if necessary
• End users can use the UI to select a bitrate to save bandwidth
myPlayer.addEventListener(amp.eventName.loadedmetadata, function () {
var stream = myPlayer.currentVideoStreamList().streams ?
myPlayer.currentVideoStreamList().streams[0] : undefined;
if (stream) {
stream.selectTrackByIndex(0);
}
});
Sample
Heuristic profiles
• Choose how AMP loads the stream at start time
• Valid for AzureHtml5JS (uses HTML5 and MPEG-DASH)
• Quick Start Mode (default):
• Loads as fast as possible starting at the lowest bitrate
• High Quality Mode:
• Loads at the highest possible quality starting with a bandwidth check
var myOptions = {
"nativeControlsForTouch": false,
autoplay: true,
controls: true,
width: "640",
height: "400",
poster: "[poster uri]",
heuristicProfile: "HighQuality"
};
myPlayer.src([{ src: "[src uri]", type: "application/vnd.ms-sstr+xml" }]);
Multi-audio selection
• By default, the last audio track in manifest is selected
• App developers can change the audio track via an API
• End user can change the audio strea, via the UI
• Valid for AzureHtml5JS and FlashSS
myPlayer.addEventListener(amp.eventName.loadedmetadata, function () {
if (myPlayer.currentAudioStreamList()) {
for (var i = 0; i < myPlayer.currentAudioStreamList().streams.length; i++) {
if (myPlayer.currentAudioStreamList().streams[i].language == "es") {
myPlayer.currentAudioStreamList().switchIndex(i);
break;
}
}
}
});
Sample
Localization
• Reach audiences all over the world
• Localize player UI and error messages
var myOptions = {
"nativeControlsForTouch": false,
autoplay: true,
controls: true,
width: "640",
height: "400",
poster: "[poster uri]",
language: "es"
};
myPlayer.src([{ src: "[src uri]", type: "application/vnd.ms-sstr+xml" }]);
Sample
Analytics hooks
• AMP uses standard HTML5 eventing model
• Listen to events via addEventListener API and send to analytics backend
myPlayer.addEventListener("play", function(){
//send event to analytics server backend
});
myPlayer.addEventListener("error", function(){
var currentTime = Math.round(myPlayer.currentTime());
var errorHexCode = myPlayer.error().code.toString(16);
Var errorMessage = myPlayer.error().message;
//send error with error code event to analytics server backend
});
Sample
Player analytics
Solution based on Application Insights and Power BI
• Demographics: Understand who your users are and where they come from
• Engagement: Understand what is your most popular content and how long
people are watching it
• Quality of Experience (QoE): Shows the streaming experience of viewers,
determining abandonment rates due to poor quality
HTML5 app development
AMP can be embedded in an HTML5 app!
Windows app
iOS app
Android app
Documentation
Top ISV solutions in Video On-Demand (VOD)
Haivision Media Gateway on Microsoft Azure gives enterprises and Hive Streaming is an SDN for streaming video within Enterprise networks.
broadcasters a scalable and cost-effective solution to distribute high quality, Integrated with Skype Meeting Broadcast and Office Video, Hive facilitates the
low-latency video over the public Internet to multiple locations, bringing a delivery of live and VOD using dynamically created peer networks. When
welcome replacement to the long lead times, prohibitive costs and scheduling used in an Enterprise, Hive ensures that viewers can watch high quality video
challenges associated with satellite and custom networks for video distribution. without congesting the network and without adding new hardware.
• Access as many resources as you need, instantly, pay for what you use • Pre-integrated with the Skype Meeting Broadcast
• Multiple options to easily traverse known and unknown firewalls • Offers the opportunity to re-use your existing hardware
• Haivision’s SRT technology to transport the highest quality live video • Between 95-99% of video traffic is offloaded from critical and weak network
over the Internet links
• Save bandwidth at the source location by using the cloud • Comprehensive suite of analytics provide a wealth of information
Provides high-quality video and audio streaming software to organizations for Damdy develops SaaS solutions that allow companies to manage, convert, edit
unlimited use cases worldwide. Wowza technology powers reliable live and and distribute their digital content to targeted audiences on all type of
on-demand streaming to any device, anywhere, anytime. devices. Cloud Video Center is an online video platform (an “Enterprise Tube”)
that helps brands to manage and broadcast their video content (VOD and
Key Use Cases/ Benefits live).