Publish a Movie with Azure Media Services
I'm interested in sharing videos without using an ad-driven service. Azure is a simple and affordable option. Here is both how I did it and how much it is going to cost me.
How To: Upload and Publish an MP4
Upload an 8 MB MP4 video so it is public on the web.
- Open the Azure Management Portal.
- Create a new Media Services account.
- Once it's done, open the new Media Services account.
- Then click CONTENT > UPLOAD CONTENT.
- Upload an 8 MB MP4 file from your local machine.
- Once uploaded, select the video and click publish.
- Copy and navigate to the publish URL.
Here it is in an HTML5 video tag.
How Much $
How much does it cost to upload an existing MP4 and publishing it to the web? Azure offers a bunch of services related to media services. I only need two:
- Storage
- Data Transfer
For the following examples, I'm transferring a 30 second, high definition video that's 8 MB.
It would cost me less than a penny per month if nobody watched my video and just $1.00 if it received 1300 views.
Storage Costs
Block blobs (binary large objects) can store videos. I use a locally redundant blob for now. This costs $0.0254 per GB for the first TB. That's a lot of 30 second videos.
($0.0254 / 1 GB) * (1 GB / 1024 MB) = ($0.0000248046875 / 1 MB)
($0.0000248046875 / MB) * (8 MB) = ($0.0001984375 / 8 GB)
It's far less than a penny per 8 GB video. A little more math shows that it costs $1.00 / month to store 5039 similar videos.
Data Transfer Costs
They only get you on the way out. That is, uploading a video to Azure is free but it costs money if someone wants to watch it. Outbound data transfers are free for the first 5 GB / month. After that is costs $0.0918 / GB or less.
($0.0918 / 1 GB) * (1 GB / 1024 MB) = ($0.0000896484375 / 1 MB)
($0.0000896484375 / MB) * (8 MB) = ($0.0007171875 / 8 GB)
That costs far less than a penny per viewing of an 8 GB video. A little more math shows that it would cost $1.00 for 1394 views.
The standard Content Delivery Network (CDN) pricing is similar.
Unnecessary Costs
The rest are unnecessary costs for my simple purposes.
VOD Encoding & Processing
Video on Demand (VOD) Encoding allows us to convert a video from one format to another (e.g. AVI to MP4). Unnecessary. We can upload and serve MP4s.
Video on Demand (VOD) Encoding Reserved Units are an opt-in way to provide dedicated resources for our encoding / indexing tasks. Unnecessary.
Video on Demand (VOD) Indexing lets us make our video content available for search. Unnecessary.
Streaming
Streaming Units are an opt-in way to provide dedicated, guaranteed resources for our on-demand or live videos. Unnecessary. We can stream without dedicated resources.
Live Channels let us do live video. Unnecessary.
Content Protection
PlayReady provides digital rights management. Unnecessary.
Advanced Encryption Standard (AES) Keys provides encryption. Unnecessary.
Conclusion
Using Azure Media Services is a reasonably priced and easy way to share video. The main concern will be preventing a malicious user from making thousands of requests a month, thereby costing me data transfer fees.
I'm going to experiment with the one video for now