Get your first live stream running in under 10 minutes. This guide walks through the complete workflow for creating, starting, and delivering a live streaming event.
If you prefer to manage live events through the RMS Console rather than the API, see RMS Console: Manage Live Events. The Console handles live output, asset, and streaming locator creation automatically, so you can skip most of the steps in this guide.
In this article:
1. Create a live event
2. Create an asset
3. Create a live output
4. Start the live event
5. Check live event status
6. Connect your on-premises encoder
7. Create a streaming locator
8. List locator paths
9. Retrieve endpoint hostname
10. Verify live stream availability
11. Stop the live event
12. Optional: Delete live event
Before you begin:
-
Before making API calls, gather the following from your RMS instance:
subscriptionId– Your Azure subscription ID.resourceGroupName– The resource group containing your RMS account.accountName– Your RMS account name.apiEndpoint– Your RMS API endpoint URL (for example,https://api.rms.example.com/).apiKey– Your RMS API key.
Find these credentials: RMS API authentication.
Get an encoder (OBS, Wirecast, FFmpeg, etc.) ready to send a live stream.
Confirm your streaming endpoint is configured and active. By default, RMS uses the Front Door endpoint visible in the RMS Console. No additional configuration is required for your first live event.
Several operations in this workflow are asynchronous - creating a live event, creating a live output, and stopping a live event may take time while RMS provisions or releases resources. Starting a live event completes only once the event reaches Running state. Check resource status before moving to next steps.
1. Create a live event
Define your streaming configuration and create the live event.
API request
PUT https://{{api-endpoint}}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}?api-version={api-version}URI parameters:
{apiEndpoint}- Your RMS API base URL.{subscriptionId}- Your Azure subscription ID.{resourceGroupName}- Resource group containing your RMS account.{accountName}- Your RMS account name.{liveEventName}- can contain only lowercase letters, numbers, hyphens, and underscores. The value must be unique within your RMS account and have a length of at most 32.{api-version}- required for compatibility; any value accepted.
Request body
{
"location": "West Europe",
"properties": {
"description": "",
"input": {
"streamingProtocol": "RTMP",
"keyFrameIntervalDuration": "PT2S",
"accessControl": {
"ip": {
"allow": [
{
"name": "AllowAll",
"address": "0.0.0.0",
"subnetPrefixLength": 0
}
]
}
}
},
"encoding": {
"encodingType": "PassthroughStandard"
},
"streamOptions": [
"Default"
]
}
}Required parameters:
streamingProtocol:RTMP- standard protocol for live streaming;SRT- built-in encryption and packet recovery;RTSPPush- encoder connects and sends stream;RTSPPull- input pulled from the RTSP source endpoint.encodingType:PassthroughStandard(no transcoding) orStandard/Premium1080P(ABR with 720p/1080p output). See Live streaming: event types and compatibility for in-depth details.streamOptions: useDefaultfor stable playback with DVR orLowLatency(passthrough HLS only, no DVR, CMAF format), learn more.accessControlandkeyFrameIntervalDuration: required for API compatibility but not enforced by RMS.
API reference with full parameter details: Live events - Create.
What you get back in a response
The API returns the created live event in Stopped state with:
Generated ingest URLs (in
properties.input.endpoints).Stream key (in
properties.input.accessToken).Event resource details.
2. Create an asset
RMS writes the incoming stream to this asset during the live event, enabling DVR functionality and creating a live archive for on-demand playback after the event ends.
API request
PUT https://{{apiEndpoint}}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}?api-version={api-version}Request body:
{
"properties": {
"storageAccountName": "your-storage-account"
}
}storageAccountName - The Azure storage account where RMS will write the recording. This is an account-level resource. Use the default storage or configure your external storage.
API reference with full parameter details: Asset - Create or Update.
What happens next
RMS returns the asset resource details. You'll reference this asset name when creating the live output in the next step.
3. Create a live output
Create a live output linked to a target asset. RMS writes the incoming stream to that asset for live playback and later on-demand access.
Without a live output, the live event will ingest the stream but won't make it available for playback or recording.
API request
PUT https://{{api-endpoint}}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/liveOutputs/{liveOutputName}?api-version={api-version}Request body
{
"properties": {
"assetName": "Video",
"archiveWindowLength": "PT5M"
}
}API reference with full parameter details: Live Outputs - Create.
What you get back in a response
The API returns the created live output with:
Live output attached to the running live event.
Live output utilizes the asset created in Step 2.
Archive window (
archiveWindowLength) configured for live rewind functionality.
4. Start the live event
Api request
POST https://{{api-endpoint}}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/start?api-version={api-version}Most events reach Running in 30-60 seconds. Cold starts (when services haven't been active recently) may take a few extra minutes.
API reference with full parameter details: Live events - Start.
What happens next
RMS provides input URLs required by the encoder.
5. Check live event status
Verify the event has reached Running state and is ready to accept your encoder connection.
API request
POST https://{{api-endpoint}}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStatus?api-version={api-version}API reference with full parameter details: Live events - Get status.
Live event state has the following lifecycle: Stopped → Starting → Running → Stopping → Stopped.
Stopped: event created, not consuming resources.
Starting: allocating resources and preparing ingest endpoints.
Running: event is live, ready to accept encoder connection.
Stopping: deallocating resources, finalizing recording.
What you get back in a response
The API returns the current operational status, including:
Current state (you're waiting for Running).
Stream health information.
Once the event reaches Running state, proceed to configure your encoder with the ingest URLs.
6. Connect your on-premises encoder
Start sending your contribution feed. Playback URLs typically become available within about a minute, and the event should not remain idle for more than ~10 minutes, or ingest may become unstable.
Configure your encoder:
Ingest URL (
endpoints.urlfrom Step 1 response).
Stream Key (
accessTokenfrom Step 1 response).
For the URL structure specific to your protocol, see Live ingest protocols. For encoder settings (bitrate, GOP, keyframe interval, and more), see Live streaming: encoder configuration.
Once the encoder connects, RMS begins receiving and validating the stream. RMS automatically packages the stream into HLS and MPEG-DASH formats for delivery.
What happens next
RMS receives and validates your stream.
Passthrough: RMS forwards the single-bitrate stream directly to HLS/DASH packaging.
ABR: RMS transcodes into multiple bitrates (up to 4 renditions for 720p, up to 5 for 1080p based on input specifications).
7. Create a streaming locator
Make the stream accessible for playback.
API request
PUT https://{{api-endpoint}}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}?api-version={api-version}
Request body
{
"properties": {
"streamingPolicyName": "Predefined_ClearStreamingOnly",
"assetName": "Video"
}
}Required parameters:
streamingPolicyName: defines how the content is delivered. RMS provides predefined policies for common scenarios. For live streaming, usePredefined_ClearStreamingOnly, learn more.assetName: The asset name from Step 2 (where your live output is recording).
API reference with full parameter details: Streaming locator - Create.
What happens next
The streaming locator makes your stream accessible via HLS and DASH manifests.
Same locator works for both live playback and VOD after the event ends.
8. List locator paths
Retrieve the manifest paths associated with the locator. Obtain relative manifest paths for HLS and DASH formats. These paths define how the asset linked to the live event’s live output is exposed for delivery and playback.
API request
POST https://{{api-endpoint}}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}/listPaths?api-version={api-version}
API reference with full parameter details: Streaming locator - List paths.
What you get back in a response
The API returns relative manifest paths for HLS and DASH formats.
Example:
"streamingProtocol": "Hls", "paths": [ "/262a87b6-b538-4657-bac1-b6897924471d/manifest.ism/manifest(format=m3u8-cmaf)" "streamingProtocol": "Dash", "paths": [ "/262a87b6-b538-4657-bac1-b6897924471d/manifest.ism/manifest(format=mpd-time-cmaf)"
9. Retrieve endpoint hostname
The streaming endpoint is an account-level resource shared across all live events. This means you retrieve it once via API.
API request
GET https://{{apiEndpoint}}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}?api-version={api-version}
streamingEndpointName - RMS accounts include a streaming endpoint named default. You can use this value for the API call.
If you've configured a custom hostname in RMS Console, the API will return that custom value as properties.hostName. Use the hostName value from the response to build your playback URLs:
https://{hostname}/{locator-path}Example:
https://playback.ravnur.net/262a87b6-b538-4657-bac1-b6897924471d/manifest.ism/manifest(format=m3u8-cmaf)
What you get back in a response
Retrieved
hostNamevalue.Your playback URLs are ready for player initialization.
The same URLs work for both live streaming and VOD playback after the event ends.
10. Verify live stream availability
Once the encoder connects, validate that the stream is being delivered to viewers. Manifests become available after RMS receives enough media fragments from the encoder to initialize packaging.
RMS does not have a separate preview stage. Once a live event is running, and the above steps are completed, the stream is available for delivery to viewers.
Confirm the stream is live:
Open the playback URL in a player. The manifest should load, and timestamps should move forward (not frozen).
If there is no playback, call the Get Status endpoint (repeat step 5) to verify that ingest is active and healthy.
Only one or two ABR qualities may appear at first. Additional qualities appear within a minute. This is expected.
Browser caching may show stale manifests. Use hard refresh (Ctrl+F5 / Cmd+Shift+R) to validate newly started streams.
What happens next
Recording continues to your asset for VOD playback after the event ends.
11. Stop the live event
When streaming ends, stop the live event to finalize the recording and release resources.
API request
POST https://{{api-endpoint}}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/stop?api-version={api-version}
API reference with full parameter details: Live events - Stop.
Important: Remember to stop live events once they’re no longer needed.
By default, events auto-shutdown after 12 hours, but the admin can configure this length in the Live Streaming tab of RMS Console.
What happens next
The live output is automatically deleted.
The asset remains available with the finalized recording for VOD playback.
Resource consumption stops once the event is fully stopped.
12. Optional: Delete live event
If you no longer need the live event resource, you can delete it entirely.
DELETE https://{{api-endpoint}}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}?api-version={api-version}
Deleting a live output does not remove its linked asset or the content stored in it.
What happens next
The live event resource is removed.
All associated live outputs are automatically deleted (unless they weren’t before the event stopped).
Your recording remains in the asset available for on-demand playback or processing.
Next steps:
Locate and process your live recording as VOD.
Live streaming low latency best practices - reduce stream latency for real-time interactions.