Skip to content

Commit 1396053

Browse files
obs encoder quickstart
1 parent ac1348c commit 1396053

28 files changed

+216
-0
lines changed
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
---
2+
title: Create an Azure Media Services live stream with OBS Studio
3+
description: Learn how to create an Azure Media Services live stream by using the portal and OBS Studio
4+
services: media-services
5+
ms.service: media-services
6+
ms.topic: quickstart
7+
ms.author: inhenkel
8+
author: IngridAtMicrosoft
9+
ms.date: 04/16/2020
10+
---
11+
12+
# Create an Azure Media Services live stream with OBS
13+
14+
This quickstart will help you create an Azure Media Services live stream by using the Azure portal and Open Broadcasting Studio (OBS). It assumes that you have an Azure subscription and have created a Media Services account.
15+
16+
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
17+
18+
## Sign in to the Azure portal
19+
20+
Open your web browser, and go to the [Microsoft Azure portal](https://portal.azure.com/). Enter your credentials to sign in to the portal. The default view is your service dashboard.
21+
22+
In this quickstart, we'll cover:
23+
24+
- Setting up an on-premises encoder with a free trial of OBS.
25+
- Setting up a live stream.
26+
- Setting up live stream outputs.
27+
- Running a default streaming endpoint.
28+
- Using Azure Media Player to view the live stream and on-demand output.
29+
30+
## Set up an on-premises encoder by using OBS
31+
32+
1. Download and install OBS for your operating system on the [Open Broadcaster Software website](https://obsproject.com/).
33+
1. Start the application and keep it open.
34+
35+
## Set up an Azure Media Services live stream
36+
37+
1. Go to the Azure Media Services account within the portal, and then select **Live streaming** from the **Media Services** listing.
38+
39+
![Live streaming link](media/live-events-obs-quickstart/select-live-streaming.png)
40+
1. Select **Add live event** to create a new live streaming event.
41+
42+
![Add live event icon](media/live-events-obs-quickstart/add-live-event.png)
43+
1. Enter a name for your new event, such as *TestLiveEvent*, in the **Live event name** box.
44+
45+
![Live event name box](media/live-events-obs-quickstart/live-event-name.png)
46+
1. Enter an optional description of the event in the **Description** box.
47+
1. Select the **Pass-through – no cloud encoding** option.
48+
49+
![Cloud encoding option](media/live-events-obs-quickstart/cloud-encoding.png)
50+
1. Select the **RTMP** option.
51+
1. Make sure that the **No** option is selected for **Start live event**, to avoid being billed for the live event before it's ready. (Billing will begin when the live event is started.)
52+
53+
![Start live event option](media/live-events-obs-quickstart/start-live-event-no.png)
54+
1. Select the **Review + create** button to review the settings.
55+
1. Select the **Create** button to create the live event. You're then returned to the live event listing.
56+
1. Select the link to the live event that you just created. Notice that your event is stopped.
57+
1. Keep this page open in your browser. We'll come back to it later.
58+
59+
## Run the default streaming endpoint
60+
61+
1. Select **Streaming endpoints** in the Media Services listing.
62+
63+
![Streaming endpoints menu item](media/live-events-obs-quickstart/streaming-endpoints.png)
64+
1. If the default streaming endpoint status is stopped, select it. This step takes you to the page for that endpoint.
65+
1. Select **Start**.
66+
67+
![Start button for the streaming endpoint](media/live-events-obs-quickstart/start.png)
68+
69+
## Set up a live stream by using OBS Studio
70+
71+
OBS starts with a default scene but with no inputs selected.
72+
73+
![OBS default screen](media/live-events-obs-quickstart/live-event-obs-default-screen.png)
74+
75+
### Add a video source
76+
77+
1. From the **Sources** panel, click the **add** icon to select a new source device. The **Sources** menu will open.
78+
79+
1. Select **Video Capture Device** from the source device menu. The **Create/Select Source** menu will open.
80+
81+
![OBS sources menu with video device selected](media/live-events-obs-quickstart/live-event-obs-video-device-menu.png)
82+
83+
1. Select the **Add Existing** radio button, then click **OK**. The **Properties for Video Device** menu will open.
84+
85+
![OBS new video source menu with add existing selected](media/live-events-obs-quickstart/live-event-obs-new-video-source.png)
86+
87+
1. From the **Device** dropdown list, select the video input you want to use for your broadcast. Leave the rest of the settings alone for now, and click **OK**. The input source will be added to the **Sources** panel, and the video input view will show up in the **Preview** area.
88+
89+
![OBS camera settings](media/live-events-obs-quickstart/live-event-surface-camera.png)
90+
91+
### Add an audio source
92+
93+
1. From the **Sources** panel, click the **add** icon to select a new source device. The Source Device menu will open.
94+
95+
1. Select **Audio Input Capture** from the source device menu. The **Create/Select Source** menu will open.
96+
97+
![OBS sources menu with audio device selected](media/live-events-obs-quickstart/live-event-obs-audio-device-menu.png)
98+
99+
1. Select the **Add Existing** radio button, then click **OK**. The **Properties for Audio Input Capture** menu will open.
100+
101+
![OBS audio source with add existing selected ](media/live-events-obs-quickstart/live-event-obs-new-audio-source.png)
102+
103+
1. From the **Device** dropdown list, select the audio capture device you want to use for your broadcast. Leave the rest of the settings alone for now, and click OK. This will add the audio capture device to the audio mixer panel.
104+
105+
![OBS audio device selection dropdown list](media/live-events-obs-quickstart/live-event-select-audio-device.png)
106+
107+
### Set up streaming in OBS
108+
109+
In the next procedure, you'll go back to Azure Media Services in your browser to copy the input URL to enter into the output settings:
110+
111+
1. On the Azure Media Services page of the portal, select **Start** to start the live stream event. (Billing starts now.)
112+
113+
![Start icon](media/live-events-obs-quickstart/start.png)
114+
1. Set the **RTMP** toggle to **RTMPS**.
115+
1. In the **Input URL** box, copy the URL to your clipboard.
116+
117+
![Input URL](media/live-events-obs-quickstart/input-url.png)
118+
119+
1. Switch to the OBS application.
120+
121+
1. Click the **Settings** button in the **Controls** panel. The Settings options will open.
122+
123+
![OBS Controls panel with settings selected](media/live-events-obs-quickstart/live-event-obs-settings.png)
124+
125+
1. Select **Stream** from the **Settings** menu.
126+
127+
1. From the **Service** dropdown list, select Show all, then select **Custom...**.
128+
129+
1. In the **Server** field, paste the RTMPS URL you copied to your clipboard.
130+
131+
1. Enter something into the **Stream key** field. It doesn't really matter what it is, but it needs to have a value.
132+
133+
![OBS stream settings](media/live-events-obs-quickstart/live-event-obs-stream-settings.png)
134+
135+
1. Select **Output** from the **Settings** menu.
136+
137+
1. Enter *2* into the **Keyframe interval** field.
138+
139+
1. OPTIONAL: Set the **CPU Usage Preset** to *veryfast* if you are using a computer that is low on processing power.
140+
141+
![OBS output settings](media/live-events-obs-quickstart/live-event-obs-advanced-output-settings.png)
142+
143+
1. Leave the rest of the settings alone and click **OK**.
144+
145+
### Start streaming
146+
147+
1. In the **Controls** panel, click **Start Streaming**.
148+
149+
![OBS start streaming button](media/live-events-obs-quickstart/live-event-obs-start-streaming.png)
150+
151+
2. Switch to the Azure Media Services Live event screen in your browser and click the **Reload Player** link. You should now see your stream in the Preview player.
152+
153+
## Set up outputs
154+
155+
This part will set up your outputs and enable you to save a recording of your live stream.
156+
157+
> [!NOTE]
158+
> For you to stream this output, the streaming endpoint must be running. See the later [Run the default streaming endpoint](#run-the-default-streaming-endpoint) section.
159+
160+
1. Select the **Create outputs** link below the **Outputs** video viewer.
161+
1. If you like, edit the name of the output in the **Name** box to something more user friendly so it's easy to find later.
162+
163+
![Output name box](media/live-events-wirecast-quickstart/output-name.png)
164+
1. Leave all the rest of the boxes alone for now.
165+
1. Select **Next** to add a streaming locator.
166+
1. Change the name of the locator to something more user friendly, if you want.
167+
168+
![Locator name box](media/live-events-wirecast-quickstart/live-event-locator.png)
169+
1. Leave everything else on this screen alone for now.
170+
1. Select **Create**.
171+
172+
## Play the output broadcast by using Azure Media Player
173+
174+
1. Copy the streaming URL under the **Output** video player.
175+
1. In a web browser, open the [Azure Media Player demo](https://ampdemo.azureedge.net/azuremediaplayer.html).
176+
1. Paste the streaming URL into the **URL** box of Azure Media Player.
177+
1. Select the **Update Player** button.
178+
1. Select the **Play** icon on the video to see your live stream.
179+
180+
## Stop the broadcast
181+
182+
When you think you've streamed enough content, stop the broadcast.
183+
184+
1. In OBS, select the **Stop Streaming** button in the **Controls** panel. This step stops the broadcast from OBS.
185+
1. In the portal, select **Stop**. You then get a warning message that the live stream will stop but the output will now become an on-demand asset.
186+
1. Select **Stop** in the warning message. Azure Media Player now shows an error, because the live stream is no longer available.
187+
188+
## Play the on-demand output by using Azure Media Player
189+
190+
The output that you created is now available for on-demand streaming as long as your streaming endpoint is running.
191+
192+
1. Go to the Media Services listing and select **Assets**.
193+
1. Find the event output that you created earlier and select the link to the asset. The asset output page opens.
194+
1. Copy the streaming URL under the video player for the asset.
195+
1. Return to Azure Media Player in the browser and paste the streaming URL into the URL box.
196+
1. Select **Update Player**.
197+
1. Select the **Play** icon on the video to view the on-demand asset.
198+
199+
## Clean up resources
200+
201+
> [!IMPORTANT]
202+
> Stop the services! After you've completed the steps in this quickstart, be sure to stop the live event and the streaming endpoint, or you'll be billed for the time they remain running. To stop the live event, see the [Stop the broadcast](#stop-the-broadcast) procedure, steps 2 and 3.
203+
204+
To stop the streaming endpoint:
205+
206+
1. From the Media Services listing, select **Streaming endpoints**.
207+
2. Select the default streaming endpoint that you started earlier. This step opens the endpoint's page.
208+
3. Select **Stop**.
209+
210+
> [!TIP]
211+
> If you don't want to keep the assets from this event, be sure to delete them so you're not billed for storage.
212+
213+
## Next steps
214+
215+
> [!div class="nextstepaction"]
216+
> [Live events and live outputs in Media Services](./live-events-outputs-concept.md)
2.33 KB
Loading
23.6 KB
Loading
11.4 KB
Loading
1.79 KB
Loading
6.98 KB
Loading
197 KB
Loading
15.5 KB
Loading
34.7 KB
Loading
4.35 KB
Loading

0 commit comments

Comments
 (0)