Live Streaming with Microsoft Azure Media Services

We’ve seen how to setup OBS for live streaming, and how to send it to YouTube. This article is about how can set up your own live streaming using Microsoft Azure Media Services.

Prerequisites

You will need:

  1. OBS installed and running. You can use a single machine that is running OBS to work through this example, or you can use a web browser from any other machine to setup streaming in Azure.

What we will do

1. Login to the Azure Portal

Open a web browser and go to http://portal.azure.com and login with your Azure account. If you don’t have one, this is your opportunity to create one. You will see a screen like this.

Microsoft Azure Portal

2. Create Azure Media Service

The portal is pretty user-friendly and will prompt you to create whatever it needs as you go through it. We could go through and create the resource group and storage account on our own, but instead we’ll do so via the Azure Media Service creation workflow. In the search box, type “media” and you will see “Media services” highlighted under Services.

Search for “media” to find Azure Media Services.
Use the blue button to start the media service creation workflow.
Enter required information for your media service.
Click the > symbol to create a storage account.
Choose a unique name for the storage account.
Click Create to deploy the media service.
Popups provide notification of activity.
The Notifications page shows the notification history, and lets you immediately go to resources that have just been created.
Main media service overview screen.

3. Create the Channel

Under Media Services in the right column, click “Live streaming”. This enables you to create a channel.

Create live streaming channel.
Channel creation workflow.
Filling out the basic channel settings.
Channel ingest settings.
Channel preview settings.
Channel encoding settings.
Channel starting up.

4. Create the Live Event

We’ve created the media service and the channel. Now we need to create the live event. Click the channel that you just created listed under “Channel Name” to bring up the channel page.

Channel page.
Live event called “default” created.

5. Create Streaming Endpoint

Now you have a live event running in the channel that you created within the Azure Media Service. You can get video in, but you can’t get video out until you create one or more locators. Click on the live event under “Live events” that you just created to show more information about it.

Live event page.
Locator details page.
Streaming endpoint details.
Confirmation to start streaming endpoint.

6. Start Input Stream

While the streaming endpoint is being started, now is a good time to go into OBS and setup the input stream.

Ingest URL on media service screen.

7. Configure OBS

Now go into the Settings menu of OBS and navigate to Stream. Paste the URL that you just copied into the URL field and type “default” in the “Stream key” field, then press OK.

Stream settings in OBS.
View of live stream in OBS.

8. Test the Live Stream

Now go back into your browser, and scroll to the right until you get to the Locator details page.

List of available stream formats.
Testing on a single machine: OBS, Azure Media Services configuration, dash.js player, IINA player app (from lower right going clockwise.)

9. Shutting it Down

Don’t forget to shut things off or delete them when you are done. Keeping channels running incurs costs. You can either delete the resource group, which will destroy all of the resources, or if you’re going to do more streaming, you can simply stop anything that is running. You can use the Dashboard view to see what resources are present in your account.

Resource group view.

Builder of media technology services and a videography, cinematography, photography, gadget, IoT, AI, auto and aviation geek.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store