Get started with ultra low latency streaming using the Wowza Streaming Cloud REST API

Learn how to use the Wowza Streaming Cloud™ service's REST API to send an encoded live stream to an ultra low latency stream target for browser-based playback with Wowza Player or playback through a mobile app.

Note: Ultra low latency streaming is available through Wowza Streaming Cloud with Ultra Low Latency. For additional information see How to use Wowza Streaming Cloud for ultra low latency streaming. To get started with ultra low latency streaming using the Wowza Streaming Cloud web manager instead of the REST API, see Get started with Wowza Streaming Cloud ultra low latency streaming.

Video tutorial: Ultra low latency quick start guide


Tip: See our Wowza ultra low latency playlist on YouTube for more video tutorials about ultra low latency streaming.

Locate your API key and access key


For security, all requests to the Wowza Streaming Cloud REST API must include an API key and an access key, which authenticate your requests to the Wowza Streaming Cloud service.

Both the API key and the access key can be found in the Wowza Streaming Cloud web manager.

  1. In the menu bar, click your user name and choose API Access.

Your API key appears in the middle of the Wowza Streaming Cloud REST API page.
Access keys are listed in the Access Keys panel on the left side of the page.

  1. To generate a new access key, click Add Access Key.
  2. Leave Enabled selected so that the key is immediately available, and provide an optional Description. Then, click Add.

Wowza Streaming Cloud generates the key.

You can disable and re-enable the access key at any time, and edit the description.

Important: In example requests shown in our example articles—and in your own code—for [key], substitute your API key or your access key, as appropriate.

Create an ultra low latency stream target


If you are new to the Wowza Streaming Cloud REST API, start with How to use the Wowza Streaming Cloud REST API.

If you are familiar with the REST API, start by creating an ultra low latency stream target. Example commands are presented in curl, but you can also use a GUI REST client for API testing such as Postman or Paw.

Notes:
  • Ultra low latency stream targets are not available in the sandbox environment, so be sure to use https://api.cloud.wowza.com not https://api-sandbox.cloud.wowza.com in your API request.
  • For [version], substitute the version number of the API that you're using. For the current version, use v1.2.

Ultra low latency stream target parameters

Parameter Data Type Description
enable_hls Boolean If true, creates an Apple HLS playback URL that can be used to view the stream on mobile devices or to provide redundancy in the event that WebSocket connection attempts fail. The default is false.
enabled Boolean If true (the default), allows the source stream to be ingested by the target's origin server.
ingest_ip_whitelist string Optional, if the source delivery method is push. A list of IP addresses for the stream's source. Only whitelisted IP addresses can connect to the target's origin server. Wildcard (*) characters are supported.
name string The name of the stream target. Enter a descriptive alphanumeric string that is under 200 characters.
region_override string Optional, for ultra low latency stream targets whose source_delivery_method is pull. The location of the ultra low latency stream target's origin server. If unspecified, Wowza Streaming Cloud determines the optimal region for the origin server.
source_delivery_method string The method being used to deliver the source stream to the origin server. Valid values are pull, which instructs the stream target to pull the stream from the source, or push, which instructs the source to push the stream to the target.
source_url string Required when the source delivery method is pull. The URL of a source IP camera or encoder. Consult the camera or encoder documentation for the URL syntax.

Example requests and responses

Create an ultra low latency stream target for a push stream. Use this request when streaming from the GoCoder mobile app or any source encoder that can send an RTMP or RTSP stream in H.264. Configuring a push stream indicates that your video source will push the stream to Wowza Streaming Cloud. 

curl -H "wsc-api-key: [key]" -H "wsc-access-key: [key]" -H "Content-Type: application/json" -X POST -d '{
    "ull_stream_target": {
	"name": "My Ultra Low Latency Push Target",
	"source_delivery_method": "push",
	"enable_hls": true
    }
}' "https://api.cloud.wowza.com/api/[version]/stream_targets/ull"

The command creates an ultra low latency stream target with an id parameter, ingest connection details, and playback details, including a hash of playback URLs. You will need details from this response to configure your source encoder. The response should look something like this:

{
    "ull_stream_target": {
        "id": "cetkpl5i",
        "name": "My Ultra Low Latency Push Target",
        "enabled": true,
        "state": "stopped",
        "stream_name": "0I0q1NXZhMnvjUVWWHaW3SM8LfhN5d03",
        "primary_url": "rtmp://origin.cdn.wowza.com:1935/live/0I0q1NXZhMnvjUVWWHaW3SM8LfhN5d03",
        "source_delivery_method": "push",
        "playback_urls": {
           "ws": [
               "ws://edge.cdn.wowza.com/live/_definst_/0P0q1bjZhRzJxaE80b3lremtKSnZ6160/stream.ws",
               "wss://edge.cdn.wowza.com/live/_definst_/0P0q1bjZhRzJxaE80b3lremtKSnZ6160/stream.ws"
            ],
            "wowz": [
               "wowz://edge.cdn.wowza.com/live/_definst_/0P0q1bjZhRzJxaE80b3lremtKSnZ6160",
               "wowzs://edge.cdn.wowza.com/live/_definst_/0P0q1bjZhRzJxaE80b3lremtKSnZ6160"
            ],
            "hls": [
               "https://[wowzasubdomain].akamaihd.net/hls/live/687321/0P0q1bjZhRzJxaE80b3lremtKSnZ6160/playlist.m3u8"
            ]
        },
        "connection_code": "295903",
        "connection_code_expires_at": "2017-10-26T20:46:20.000Z",
        "enable_hls": true,
        "created_at": "2017-10-25T20:46:20.000Z",
        "updated_at": "2017-10-25T20:46:20.000Z"
    }
}

Related API requests

View all ultra low latency stream targets:

curl -X GET -H "wsc-api-key: [key]" -H "wsc-access-key: [key]" "https://api.cloud.wowza.com/api/[version]/stream_targets/ull"

View the details of an ultra low latency stream target:

curl -X GET -H "wsc-api-key: [key]" -H "wsc-access-key: [key]" "https://api.cloud.wowza.com/api/[version]/stream_targets/ull/[ull_stream_target_id]"

Update an ultra low latency stream target's configuration:

Note: The enable_hls and source_delivery_method parameters can't be updated.

curl -H "wsc-api-key: [key]" -H "wsc-access-key: [key]" -H "Content-Type: application/json" -X PATCH -d '{
	"ull_stream_target": {
		"name": "My Awesome Ultra Low Latency Pull Stream Target",
	}
}' "https://api.cloud.wowza.com/api/[version]/stream_targets/ull/[ull_stream_target_id]"

Delete an ultra low latency stream target:

curl -X DELETE -H "wsc-api-key: [key]" -H " wsc-access-key: [key]" "https://api.cloud.wowza.com/api/[version]/stream_targets/ull/[ull_stream_target_id]"

Configure the source


Use the details of the ultra low latency stream target you created in the Wowza Streaming Cloud REST API to configure the Wowza GoCoder™ mobile app.

First, download the free Wowza GoCoder app for iOS from the Apple Store or for Android from Google Play.

Connect the GoCoder app using a connection code

The easiest connection method is using the connection code value returned when you created the ultra low latency stream target.

For GoCoder for iOS 2.0.5 or later

If you're using the current version of the GoCoder app for iOS, enter the target's connection code in the app to use the app as the source for your live stream.

  1. Tap the Connect icon (the Wowza gear).
  2. In the Connect To menu, tap Wowza Streaming Cloud.

  1. For Connection Code, enter the Wowza Streaming Cloud ultra low latency stream target's connection code, for example, 24cedc.

  1. Tap Done.

Connect the GoCoder app manually

If you're using an older version of the GoCoder app for iOS or the Android version of the app, parse the connection details from the ultra low latency stream target's primary URL into the host domain, port, application name, and stream name.

This connection method is also useful for troubleshooting a connection with a connection code that isn't working as expected.

  1. Tap the Connect icon (the Wowza gear).
  2. In the Connect To menu, tap Wowza Streaming Engine.

  1. Tap Host.
  • For Server, enter the target's host domain, which is origin.cdn.wowza.com.
  • For Port, enter 1935.
  1. Tap Back and then tap Application.
  • For Application enter live.
  • For Stream Name enter the alphanumeric stream name from the ultra low latency target, for example, 0I1q1UHJEN1q84NA2gvuuywllGwn5f4e.
  1. Tap Back and then tap Source Authentication.
  2. Make sure Source Username and Source Password are empty.
  3. Tap Done.

Note: You can send an ultra low latency stream to Wowza Streaming Cloud using a number of different sources. See these articles for more information:

Configure playback


To quickly test playback functionality, use Wowza Player Builder for Ultra Low Latency to preview the stream. Wowza Player for Ultra Low Latency works with the latest version of most modern web browsers such as Google Chrome, Firefox, Safari, and Microsoft Edge.

Note:  Wowza Player for Ultra Low Latency currently supports HLS fallback streams only for browser-based playback on iOS devices. HLS fallback streams have higher latency than ultra low latency streams. For ultra low latency stream playback on iOS devices, see How to play an ultra low latency stream with Wowza GoCoder SDK for iOS.

Navigate to the Wowza Player Builder for Ultra Low Latency from within the Wowza Streaming Cloud web manager.

  1. In Wowza Streaming Cloud, click Advanced on the menu bar, and then click Stream Targets.
  2. Select your ultra low latency target on the Stream Targets page.
  3. Click Test player for Wowza ultra low latency targets to launch Wowza Player for Ultra Low Latency with prepopulated fields for License Key, Stream Source, and (if you enabled HLS) Backup Stream Source.
  4. Optionally enter a Title and Description that will appear on the player, and adjust the player Size options if desired.
  5. Click Player Options, and then select or edit any of the Playback Options and add a video poster image if desired.
  6. Click Update Preview.

For more configuration options and instructions on how to embed Wowza Player for Ultra Low Latency into a web page, see Configure Wowza Player for ultra low latency streams.

Note: You can also use the GoCoder SDK to develop an app with ultra low latency playback functionality. For more information, see these articles:

Start streaming


  1. In the Wowza GoCoder mobile app, start sending video.
  2. In Wowza Player Builder, click the Play button in the player preview to see your test stream.

If you have trouble sending a stream through the GoCoder app, check the settings in the Connect the GoCoder app manually section. You also may need to regenerate a connection code. You can do this in the stream target details page in the Wowza Streaming Cloud web manager or through the following API request:

curl -X PUT -H "wsc-api-key: [key]" -H " wsc-access-key: [key]" "https://api.cloud.wowza.com/api/[version]/stream_targets/[ull_stream_target_id]/regenerate_connection_code"

More resources