Quickstart: Upload, encode, and stream content with portal
Looking for Media Services v2 documentation?
This quickstart shows you how to use the Azure portal to upload, encode, and stream content with Azure Media Services.
To start managing, encrypting, encoding, analyzing, and streaming media content in Azure, you need to create a Media Services account and upload your high-quality digital media file into an asset.
If your video was previously uploaded into the Media Services account using Media Services v3 API or the content was generated based on a live output, you will not see the Encode, Analyze, or Encrypt buttons in the Azure portal. Use the Media Services v3 APIs to perform these tasks.
Review the following:
Once you upload your high-quality digital media file into an asset (an input asset), you can process it (encode or analyze). The processed content goes into another asset (output asset).
Encode your uploaded file into formats that can be played on a wide variety of browsers and devices.
Analyze your uploaded file.
Currently, when using the Azure portal, you can do the following: generate a TTML and WebVTT closed caption files. Files in these formats can be used to make audio and video files accessible to people with hearing disability. You can also extract keywords from your content.
For a rich experience that enables you to extract insights from your video and audio files, use Media Services v3 presets (as described in Tutorial: Analyze videos with Media Services v3).
If you want more detailed insights, use Video Analyzer for Media directly.
Once your content is processed, you can deliver media content to client players. To make videos in the output asset available to clients for playback, you have to create a streaming locator. When creating the streaming locator, you need to specify a streaming policy. Streaming policies enable you to define streaming protocols and encryption options (if any) for your streaming locators.
You can protect your content by encrypting it with Advanced Encryption Standard (AES-128) or/and any of the three major DRM systems: Microsoft PlayReady, Google Widevine, and Apple FairPlay. The Encrypt content with the Azure portal quickstart shows how to configure content protection.
- Sign in at the Azure portal.
- Locate and click on your Media Services account.
- Select Assets (new).
- Press Upload in the top of the window.
- Drag and drop or browse to a file that you want to upload.
If you navigate to your assets window, you will see that a new asset was added to the list:
Select Assets (new).
Select your new asset (added in the last step).
Click Encode at the top of the window.
Pressing this button starts the encoding job. When it completes successfully generates an output asset that contains the encoded content.
If you navigate to your assets window, you will see that the output asset was added to the list:
Monitor the job progress
To view job status, navigate to Jobs. The job usually goes through the following states: Scheduled, Queued, Processing, Finished (the final state). If the job has encountered an error, you get the Error state.
Publish and stream
To publish an asset, you now need to add a streaming locator to your asset.
In the Streaming locator section, press + Add a streaming locator. This publishes the asset and generates the streaming URLs.
If you want for your stream to be encrypted, you need to create a content key policy and set it on the streaming locator. For details, see Encrypt content with the Azure portal.
In the Add streaming locator window, you choose one of the predefined streaming policies. For detailed information, see streaming policies
Once the asset has been published, you can stream it right in the portal.
Or, copy the streaming URL and use it in your client player.
Make sure the streaming endpoint is running. When you first create a Media Service account, the default streaming endpoint is created and it is in a stopped state, so you need to start it before you can stream your content.
You're only billed when your streaming endpoint is in the running state.
If you intend to try the other quickstarts, you should hold on to the resources created. Otherwise, go to the Azure portal, browse to your resource groups, select the resource group under which you ran this quickstart, and delete all the resources.