Connect an RTSP encoder or IP camera to Wowza Streaming Cloud with Ultra Low Latency using the Wowza Streaming Cloud REST API

The Wowza Streaming Cloud™ service with Ultra Low Latency can connect to any H.264 encoder or IP camera that supports the RTSP network protocol. This article describes how to use the Wowza Streaming Cloud REST API to create an ultra low latency stream target and configure an RTSP-based encoder or IP camera as the video source for a Wowza Streaming Cloud ultra low latency stream.

Create an ultra low latency stream target


Start by creating an ultra low latency stream target using the Wowza Streaming Cloud REST API. For detailed information about ultra low latency stream target parameters, see the Get started with ultra low latency streaming using the Wowza Streaming Cloud REST API.

If you want Wowza Streaming Cloud to pull the stream from the RTSP encoder or IP camera, create an ultra low latency stream target for a pull stream.

Refer to documentation for your source encoder or camera to determine the source_url value. The hostname or IP address used in the source_url must be publicly accessible. If authentication information, such as username and password, is included in the source_url, it can only contain alphanumeric, period (.), underscore (_), and hyphen (-) characters.

Example request and response

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 [key], substitute your API key or your access key as appropriate. For more information, see Locating and using API and access keys.
  • For [version], substitute the version number of the API that you're using. For the current version, use v1.2.
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 Pull Target",
	"source_delivery_method": "pull",
	"enable_hls": true,
	"source_url": "rtsp://example.com/video"
    }
}' "https://api.cloud.wowza.com/api/[version]/stream_targets/ull"

The details of the new ultra low latency stream target are provided in the response, which should look something like this:

{
    "ull_stream_target": {
        "id": "vpxfks4v",
        "name": "My Ultra Low Latency Pull Target",
        "enabled": true,
        "state": "stopped",
        "source_delivery_method": "pull",
        "source_url": "rtsp://example.com/video",
        "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"
            ]
        },
        "enable_hls": true,
        "created_at": "2018-10-19T18:47:35.000Z",
        "updated_at": "2018-10-19T18:47:35.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


Make sure you have the latest firmware for a hardware encoder installed. See the encoder's user guide for details about how to update firmware as well as how to operate the device or software and how to specify settings such as resolution, bitrate, and frame rate.

For an RTSP pull connection, such as an IP camera, you configure the source by determining and providing the source_url value when creating the ultra low latency stream target. The source_url for your camera must include a publicly accessible hostname or IP address.

Start streaming


When someone requests the stream by accessing the playback URL, the ultra low latency target will ingest the stream and it will start playing. After about a minute of no requests, Wowza Streaming Cloud stops ingesting the stream.

More Resources