Originally published at: http://www.sitepoint.com/html5-video-understanding-compression-drm/
In a previous tutorial, I gave a high-level overview of HTML5 video and many of the transport standards that we can use. In this tutorial—the second in a series on using Azure Media Services to create and consume HTML5 video. I’ll cover the way we can ingest our content using a video recording tool, as well as ways to encrypt or protect our video so that only viewers with permission can view it. Finally, we’ll cover the differences between a compression codec, a container, and a transport.
You’ll need to create a Media Service account in Azure before you can do anything. Here’s a tutorial on how to do that. If you don’t have an Azure account, you can sign up for a 30 day trial ($200 worth), or reach out to me about receiving a BizSpark account to get $150 per month per developer on your team, for three years.
Below is a list of recent updates to Microsoft’s Media Services offering.
- Can be combined with dynamic packaging, dynamic encryption, sub-clipping, dynamic manifest manipulation, ad-marker insertion, and seamless live to on-demand capabilities
Automatic platform detection and playback
- Picks the best format for a browser / device.
Unified HTML5 and JS APIs
Playback for protected content
- AES & Play Ready
Video player debugging
- Logging, monitor quality of bit rate streams, diagnostic info
What is RTMP?
We need a format to ingest our content from our video recording tool, which I’ll cover in the next tutorial. To do that, we serve our content to Azure using RTMP.
Real Time Messaging Protocol was initially a proprietary protocol developed by Macromedia (now owned by Adobe) for streaming audio, video and data over the Internet between a Flash player and a server. Today however, it does not rely on Flash, as we’ll see in our example today.
I discussed several forms of streaming in my previous post, but I left out RTMP. The shortcoming to this method is that it requires specialized webservers which only deliver the frames of video content the user is currently viewing. Adaptive streaming on the other hand, does not require a special server or protocol.
This is a transport which delivers the container (.mp4, FLV) to your video player. Here’s a more in-depth lesson from the Sr. PM on the Media Services team, Cenk Dingiloglu.
RTMP is what we’ll be using to ingest our video content from our video recorder (camera on your laptop, phone, or an external device), and distribute on our channel. Viewers of our channel can than receive this video in a variety of ways, including HLS, Smooth Streaming, or MPEG-DASH.