In this presentation you will see how to use Microsoft Azure Media Services to upload, package, secure, distribute and view your videos. Presented November 15, 2014 at the London Azure Camp hosted by the London .NET Developers group in London, Ontario, Canada.
A Journey Into the Emotions of Software Developers
Build end-to-end video experiences with Azure Media Services
1. Build end-to-end video experiences
with Azure Media Services
Ken Cenerelli
@KenCenerelli
kencenerelli.wordpress.com Microsoft Azure
2. Agenda
Online Media Today
What is Azure Media Services
Architecture and Features
Video-on-demand service
Dynamic packaging
Securing your media
Live Streaming service
12. Step 1: Ingest Content
Different options of Ingesting a Mezzanine Asset
• Pre-encrypt files prior to uploading (AES 256)
• Secure HTTPS upload
• Network level peering for fast HTTP into Azure
• Fast upload using UDP with Aspera
• Storage Import/Export service to ship large amounts of media to DC
Multiple storage accounts enabled to manage your media asset
Azure Blob
14. Microsoft Azure Media Encoder
• Supports encoding to H.264 or VC-1 video
• Encodes audio to AAC-LC, HE-AAC, Dolby DD+, WMA
• Packages to MP4, Smooth Streaming, Http-Live-Streaming
• Encrypts with PlayReady, Common Encryption, AES
Encoding with third-parties
• Partner SDK for enabling ‘build-in’ encoders
Azure BlobAzure Blob
Encoding Reserved Units
Step 2: Encode, Package or Encrypt
15. Step 3: Deliver Content
Managed streaming service… it just works!
• Guaranteed bandwidth
• Auto recovery, redundancy and failover
• Multiple origins support and scale independently
Azure and 3rd party CDN support
IP Whitelisting
Ingest
Azure Blob
Asset
Origin Server
16. Pricing and SLA
For more information, please refer to Azure Media Services Pricing Details
Encoding
Service
Free Trial
(3mths)
Shared Reserved
Encoding
Price
Free
(100GB limit)
$1.99 Per GB
$1.99 Per GB +
$99 per month/RU
Encoding
SLA
NA
Availability = 99.9%
• Measured as REST API availability
• No guarantee on wait time between
tasks
Availability = 99.9%
• Measured as REST API availability
• Media tasks running concurrently =
Number of reserved units
Streaming
Service
Free Trial
(3mths)
Shared Reserved
Streaming
Price
Free
(100GB limit)
Standard Egress Rates
Standard egress rates +
$199 per month
Streaming
SLA
NA Availability = NA
• No bandwidth guarantee
Availability = 99.9%
• Measured as server availability based on
response time
• Peak bandwidth of 200 Mbps per
Reserved Unit allocated for Origin
21. Dynamic packaging
Allows you to re-use your encoded content and bring it to various streaming formats without repackaging the content.
Video sources Multi-bitrates Mp4
Origin Server
HLS
Smooth
Streaming
Encode
Video sources Multi-bitrates Mp4
Origin Server
HLS
Smooth
Streaming
Encode
Dynamic
Packaging
Traditional Encode and Package
Dynamic Packaging
Input format: Mp4 or Smooth Streaming
Output format: Smooth Streaming , Http-Live-Streaming (v4 and v3), MPEG-DASH
You need to have at least 1 reserved streaming unit to enable dynamic packaging!
DASH
22. Dynamic packaging
using .NET SDK extension for Media Services
Demo: How to use dynamic packaging feature to
produce SS, HLS and DASH content
23. Useful information - Dynamic Packaging
http://channel9.msdn.com/Events/Build/2014/3-610?#time=15m34s
Introducing Extensions for Microsoft Azure Media Services .NET SDK
Demo – how to create HLS and Smooth Streaming assets using dynamic
packaging
Dynamic packaging and Encoding and Reserved units
25. Why do you need to secure your content
Subscription Fee
(User Authentication)
Ad-funded
(Player Authentication)
High-premium content provider:
• Prevent piracy
• Prevent Man-in-the-middle
Ad-funded
(Player Authentication)
Employee only
Enterprise or Time-sensitive event:
• Piracy is not a major issue
• Prevent Man-in-the-middle
27. Options with Media Services
AES Clear Key dynamic encryption
• Encrypt on-the-wire communication using the
widely-known symmetric AES encryption
algorithm.
• An authentication service for key is provided.
DRM technology (PlayReady)
• Encrypt Smooth Streaming content with PlayReady
protection via common encryption scheme (CENC),
and the option of packaging it into HLS or DASH.
• DRM technology allows you to define restrictive
licensing agreement to manage user access rights to
your media.
Who should use this feature:
• “Trust your client”: Key is stored in clear format
so it requires you to trust your client not to pass
key around
• “Light” encryption: prevent “man-in-the-middle”
attack
• Lower cost compared to DRM solution
Who should use this feature:
• Premium content or high business impact content:
decoding happens in a secure DRM decoder
environment
• Prevent piracy and “man-in-the-middle” attack
• More business models enabled
29. Pre-encrypted PlayReady
file:
License Acquisition URL
Key ID
Content key
Storage Origin
Server
PlayReady + Smooth Streaming
PlayReady server
Client SDK
+
PlayReady SDK
Customers
Architecture: PlayReady DRM solution
30. Useful information – Secure delivery
Secure your media with Azure Media Services
Protecting Smooth Streaming and MPEG DASH with PlayReady
How to Protect an asset with PlayReady protection
Introducing the New Office 365 Video Experience
31. Why do you need to secure your content
Subscription Fee
(User Authentication)
Ad-funded
(Player Authentication)
High-premium content provider:
• Prevent piracy
• Prevent Man-in-the middle
Ad-funded
(Player Authentication)
Employee only
Enterprise or Time-sensitive event:
• Piracy is not a major issue
• Prevent Man-in-the middle
32. Video for Office 365
powered by Azure Media Services
Secure, cloud-based video upload, storage and optimized playback for the enterprise
Create, manage and subscribe to various channels
Capture, share and discover from any device
34. Media Services Live
Stream live content directly through public
cloud
Multi-format output (Smooth Streaming, HLS
and DASH)
Global reach – deploy anywhere quickly
Cloud elasticity
• No capital expenses
• Ramp quickly to global scale
• Tear down immediately
35. Channel
Azure Load Balancer
Blob Storage
Preview URL
Program URL
Ingest:
Ingest URL to accept Live streams with different
bitrates (smooth streaming) through load
balancer
Forwards the stream to all preview end-points
Preview:
Receives stream from Ingest
Forwards to Program
Exposes Preview URL (for monitoring and
voice-over)
Program:
Writes it to Blob Storage for Live DVR and
Archive
Dynamic package into HLS, Smooth and DASH
2013 we started to see TV threatened by streaming TV
Provides a way better viewing experience
Azure Media Services is a platform-as-a-service that enables you to build customizable media workflow; you could upload, encode, encrypt, package, and deliver video content to multiple platforms and devices.
Built on top of Microsoft Azure
Media Services is PaaS
Offers developers a REST API to access the service
Windows Azure Portal is a “Build-On” partner
Videos can be delivered through a CDN
Client SDKs allow developers to build on various devices and platforms for free
Ingest content from local disk to Azure Blob storage
By default you will share the encoding through a queue
You can also provision your own Encoding Reserved Units to run multiple jobs at once
Supports standard codecs like H.264 and AAC-LC
Smooth Streaming is an IIS Media Services extension that enables adaptive streaming of media to clients over HTTP
PlayReady is a content protection technology from Microsoft that includes encryption, output protection and Digital Rights Management (DRM)
Microsoft provides an origin server so customers can watch the content
Guaranteed bandwidth when you have your own box (think about viral videos)
See /Demo1 folder from readiness kit for steps of this demo.
To watch a recorded version of this demo see http://channel9.msdn.com/Events/Build/2014/3-610?#time=9m24s
Upload, encode and playback in portal
1. In the management portal show the +New entry point for creating media services
2. Flip to existing media services instance
3. Click into the media service, select the Content tab
4. Press Upload in the command bar
5. Select a file and click ok
6. Once source video is uploaded, click encode in the command bar and do a rename
7. Show the Job tab to show that it is encoding
8. Encoding tab is where you can show the Reserved Capacity
9. Select Preset drop down Playback via HTML5 (IE/Chrome/Safari)
10. Once encoding job is done, click Publish in the command bar
11. Once published click Play in the command bar
Portal is not the only way to work with Media Services
Traditionally you would encode and package your content for multiple formats to be stored on the server
Dynamic packaging means after encoding the origin server will package the content on the fly based on need
Save time and money by not needing intermediate packaging step
Save money in storage costs as only need one copy of encoded video
Must have at least one reserved streaming unit
Dynamic Adaptive Streaming over HTTP (DASH), also known as MPEG-DASH, is an adaptive bitrate streaming technique that enables high quality streaming of media content over the Internet delivered from conventional HTTP web servers
This demo is available in the /Demo2 folder of the readiness kit.
1. Pre-reqs: Follow steps in top of program.cs
2. Delivery Refer to recorded version of demo - http://channel9.msdn.com/Events/Build/2014/3-610?#time=15m34s
3. Note:
Instead of using the custom website player. once encoding and publish is done you can watch the video directly from within the portal on the Content Tab click play
You need to have at least 1 reserved streaming unit to enable dynamic packaging!
Man-in-the-middle attack is eavesdropping on videos
Two options: AES clear key and Digital Rights Management (DRM)
For both, when the video is moved from the cloud to your player it is encrypted with AES
AES clear key is on client side; client can see the key so you must trust your client
DRM means neither the key nor the content are exposed on the client
DRM model is used enforce a 48 –hour or 3-time viewing on a rented movie
AES is lower cost versus DRM
DRM needs DRM SDK on player
DRM SDK is not free
Some platforms might not have a DRM SDK
HTTP Live Streaming (also known as HLS) is an HTTP-based media streaming communications protocol implemented by Apple Inc. as part of their QuickTime, Safari, OS X, and iOS software
Only partner ezDRM for a PlayReady server
Smooth Streaming is an IIS Media Services extension that enables adaptive streaming of media to clients over HTTP
PlayReady is a content protection technology from Microsoft that includes encryption, output protection and Digital Rights Management (DRM)
Example of AES for Enterprise is Office 365
Authenticated through A.D.
All videos are encrypted thorough AES
Dynamic Adaptive Streaming over HTTP (DASH), also known as MPEG-DASH, is an adaptive bitrate streaming technique that enables high quality streaming of media content over the Internet delivered from conventional HTTP web servers
HTTP Live Streaming (also known as HLS) is an HTTP-based media streaming communications protocol implemented by Apple Inc. as part of their QuickTime, Safari, OS X, and iOS software
Submit a URL to Microsoft of the live stream
You must encode the stream as they do not have live encoding; so only smooth streaming as input
Microsoft provisions a channel with the ingestion
It’s the forwarded to Preview module to monitor it or add voice over
It then goes to Program module to provide it to the users
It is written to Blob Storage immediately so it can be VOD