Uploading Video assets via Azure Media Service Part 1
In this article, we will learn how to use azure media service for uploading video files to azure.
Azure Media Services allows you to build cost effective and end-to-end media distribution solutions that can upload, encode, package, and stream media to Windows, iOS, Android, Adobe Flash, and other devices and platforms.
The benefits that Media Services offers over the traditional approach to building a media workflow are as follows:
•An API that allows developers to easily create, manage, and maintain custom media workflows.
•A standardized workflow that improves coordination and productivity when there are multiple participants involved in the creation and management of content.
•Automatic scalability by using global data centers to trans code and deliver media assets, without having to plan for capacity spikes or worry about idle data centers.
•Cost effectiveness by encoding media once, and then using dynamic packaging to deliver it in multiple formats.
Media Services provides everything you'll need to easily build and operate the three standard media solutions:
• Video-on-demand (VOD) services. Media Services provides everything you'll need to operate VOD services to multiple devices and platforms, including all the tools and services you'll need to handle media processing, delivery, and consumption.
• Online video platforms (OVP). Media Services will integrate with your OVP and Content Management System (CMS) to help your platform gain scale by using the global footprint of Azure data centers, without having to plan for capacity spikes or worry about idle data centers.
• End-to-end solutions. Media Services can be used to easily build secure end-to-end media workflows entirely in Azure, from content ingestion through to encoding, packaging, and protection. This helps to reduce the costs that are associated with integrating multiple products and providers.
Step 1 Creating a storage account:
- Log in with your Azure account. If you do not have a storage account, go to Storage panel and click New.
The following window will appear.
https://zebahlodhi.files.wordpress.com/2014/06/1.png
- Enter a subdomain name in the URL. To access an object in storage, you will append the object's location to the endpoint. For example, if the subdomain name is "novels" then the URL for accessing a blob from that account might be http://novels.blob.core.windows.net/mycontainer/myblob.
- Select location and replication.
https://zebahlodhi.files.wordpress.com/2014/06/2.png
You have three options for replicating your storage account:
1. Geo-redundant replication. Geo-redundant replication is enabled for your storage account by default. With geo-redundant replication, your data is replicated to a secondary geographic location to enable failover to that location in case of a major disaster in the primary location.
2. Read access geo-redundant replication. Read access geo-redundant replication replicates your data to a secondary geographic location, and also provides read access to your data in the secondary location. Read-access geo-redundant replication allows you to access your data from either the primary or the secondary location, in the event that one location becomes unavailable.
3. Locally redundant replication. With locally redundant replication, your storage account data is replicated three times within the same data center. Locally redundant replication is offered at discounted rates.
In my case, I chose Geo-Redundant. Now click Check Button. Your storage account might take a little time creating.
Step 2 Creating a media service:
- Go to Media Service panel and click on New.
https://zebahlodhi.files.wordpress.com/2014/06/3.png
Now select App Services > Media Service > Quick Create and enter a name for your service.
https://zebahlodhi.files.wordpress.com/2014/06/4.png
I entered "blogservice".Choose region as you did earlier for the storage account. Select the storage account you made earlier and click the button.The following image shows the media service being created.
https://zebahlodhi.files.wordpress.com/2014/06/5.png
Step 3 Uploading video:
- When the service creation completes, click on your media service name.
https://zebahlodhi.files.wordpress.com/2014/06/6.png
On the next page, go to "Content" section.The following page will appear.
https://zebahlodhi.files.wordpress.com/2014/11/7-1.png
Click "Upload" button located at the bottom tool bar of the page.
https://zebahlodhi.files.wordpress.com/2014/06/8.png
3. A pop up window will appear. Now you can upload video files from your computer's local storage as well as from the videos already present in your azure account storage. You can change the file's name as per your desire. Select the file and click "OK". The file will take some time uploading.
https://zebahlodhi.files.wordpress.com/2014/06/9.png
https://zebahlodhi.files.wordpress.com/2014/06/10.png
Note:
The Azure Management portal restricts uploads to the formats that are supported by the Azure Media Encoder. These import formats include MPEG-1, MPEG-2, MPEG-4, and Windows Media Video encoded video, MP3, WAVE, and Windows Media Audio encoded audio, and BMP, JPEG, and PNG encoded images. The Azure Media Encoder can export data as Windows Media Video, Windows Media Audio, MP4, and Smooth Streaming File Format.
4. Once the video finishes uploading, it will appear in the content list. Select it. A bottom tool bar will appear. Click Encode. A pop up will appear.
https://zebahlodhi.files.wordpress.com/2014/06/11.png
The first option is the Encoding type and we a see a boatload of presets optimized for the types of client you are targeting. I’ve selected 1080p as seen below.
https://zebahlodhi.files.wordpress.com/2014/06/12.png
Note:
Encoding is the process of taking a video and compressing it into a format that can be consumed by your customers. Your customers may be using any number of devices to watch your videos: PC's, Macs, smart phones, tablets, XBox consoles, set-top boxes, or connected TVs. Each of these devices have features that affect the encoding used.
5. Click on the "Check Mark" button to initiate the Job. Encoding is a long running job and it takes some time to complete. Fact is it takes some time to even appear on the Jobs tab.
https://zebahlodhi.files.wordpress.com/2014/06/13.png
You can expand Job in the Jobs tab to see the Progress % of the encoding task.
https://zebahlodhi.files.wordpress.com/2014/06/14.png
- Once the encoding job completes, you can see both the Single Bitrate and Multi Bitrate assets in the Dashboard.
https://zebahlodhi.files.wordpress.com/2014/06/15.png
7. As you can see both assets are unpublished. Select each one and click "Publish" in the bottom tool bar to generate public URLs.
https://zebahlodhi.files.wordpress.com/2014/06/16.png
In the next article "Uploading Video assets via Azure Media Service Part 2", we shall learn how to use these URLs for streaming videos in our applications.