Stream to Wowza CDN on Fastly with the Wowza Streaming Cloud REST API

Learn how to use the Wowza Streaming Cloud™ REST API to configure a transcoder to deliver streams over Wowza CDN on Fastly. This configuration provides an alternative integrated CDN option for reliable delivery in regions around the world.

Notes: 
  • The Wowza Streaming Cloud integration with Fastly is an alpha feature that's available in private preview. Participation is by invitation only and is subject to the terms of the Wowza Preview End User License Agreement. To be considered for preview participation, contact cloud-preview@wowza.com.
  • Wowza CDN on Fastly stream targets are available in Wowza Streaming Cloud REST API version 1.4.

About streaming over Wowza CDN on Fastly


We recommend using Wowza CDN on Fastly stream targets for new stream configurations only, not for updating existing live streams or transcoders. Because Wowza CDN on Fastly is integrated directly with Wowza Streaming Cloud, you don't need a separate CDN provider subscription. 

Usage-based billing for streaming to Wowza CDN on Fastly from Wowza Streaming Cloud is not currently available. We invite preview participants to provide feedback on the feature functionality while testing this configuration free from egress and CDN usage charges.

The following limitations also apply:

  • Security features such as token authorization and geo-blocking aren't currently available
  • You can't currently track stream target bandwidth usage and stream target viewer data
  • Ultra low latency streams aren't compatible with Wowza CDN on Fastly

Create a transcoder


  1. Using the Wowza Streaming Cloud REST API, create a transcoder and add output renditions. For instructions, see:
  2. Make note of the ID of the transcoder and the ID of each output rendition. You'll need them to assign a Wowza CDN on Fastly stream target to the output renditions of the transcoder.

Create a Wowza CDN on Fastly stream target for the outputs


Next, you'll create a Wowza CDN on Fastly stream target, which is a destination that uses Wowza CDN to deliver the stream to players via Fastly.

Wowza CDN on Fastly stream target parameter

Parameter Data Type Description
name string A descriptive name for the stream target. Maximum 255 characters.

Example request and response

Notes:

Create a Wowza CDN on Fastly stream target:

curl -X POST \
-H "Content-Type: application/json" \
-H "wsc-api-key: ${WSC_API_KEY}" \
-H "wsc-access-key: ${WSC_ACCESS_KEY}" \
-d '{
   "stream_target_fastly": {
     "name": "My first Wowza CDN on Fastly target"
   } 
}' "${WSC_HOST}/api/${WSC_VERSION}/stream_targets/fastly"

The details of the configured target are listed in the response, which should look something like this:

{
    "stream_target_fastly": {
        "id": "lwzgrj9r",
        "name": "My first Wowza CDN on Fastly target",
        "state": "activated",
        "stream_name": "ZmYxSXRrTERrUlk9",
        "playback_url": "https://[subdomain]/TWhoL3BiZnJXMFhmNzZVN3JrZDAwUT09/hls/live/ZmYxSXRrTERrUlk9/playlist.m3u8",
        "created_at": "2019-05-20T16:38:21.000Z",
        "updated_at": "2019-05-20T16:38:21.000Z"
    }
}

Add the stream target to each output


After creating the Wowza CDN on Fastly stream target, associate it with each output rendition for your transcoder by creating an output stream target object.

Ouput stream target parameters

Parameter Data Type Description
output_id string The unique alphanumeric string that identifies the output rendition. You can find the ID in the details of each of the outputs you just created.
stream_target_id string The unique alphanumeric string that identifies the stream target that will deliver the stream to viewers. You can find the ID in the details of the custom stream target you just created.
transcoder_id string The unique alphanumeric string that identifies the transcoder that will generate the output renditions. You can find the ID in the details of the transcoder you just created.

Example request and response

Assign a stream target to an output:
 
curl -X POST \
-H "Content-Type: application/json" \
-H "wsc-api-key: ${WSC_API_KEY}" \
-H "wsc-access-key: ${WSC_ACCESS_KEY}" \
-d '{
   "output_stream_target": {
     "stream_target_id": "lwzgrj9r"
   } 
}' "${WSC_HOST}/api/${WSC_VERSION}/transcoders/[transcoder_id]/outputs/[output_id]/output_stream_targets"

The details of the assigned target are listed in the response, which should look something like this:
 
{
   "output_stream_target": {
    "stream_target_id": "lwzgrj9r"
   }
}

Start and stop the transcoder


Now you can connect the configured transcoder to the source encoder or camera and test the setup. For more information on setting up a video source for Wowza Streaming Cloud, see Connect a source.

Use the PUT method to start and stop the transcoder. Wowza Streaming Cloud will ingest the stream from the source, create the passthrough output and the lower-quality transcoded output renditions, and send all of the outputs to Wowza CDN via Fastly.

Example requests

Start the transcoder:
 
curl -X PUT \
-H "wsc-api-key: ${WSC_API_KEY}" \
-H "wsc-access-key: ${WSC_ACCESS_KEY}" \
"${WSC_HOST}/api/${WSC_VERSION}/transcoders/[transcoder_id]/start"

Stop the transcoder:
 
curl -X PUT \
-H "wsc-api-key: ${WSC_API_KEY}" \
-H "wsc-access-key: ${WSC_ACCESS_KEY}" \
"${WSC_HOST}/api/${WSC_VERSION}/transcoders/[transcoder_id]/stop"

Apply advanced properties


Wowza CDN on Fastly stream targets support a subset of advanced properties available for Wowza CDN HLS stream targets and for custom stream targets whose provider is akamai_cupertino. You can use the chunkSize, convertAMFData, and playlistSeconds properties with Wowza CDN on Fastly stream targets. By default, these protocol properties are enabled and configured to use their default values. You can, however, change or customize them. For information, see Set advanced properties with the Wowza Streaming Cloud REST API.

About playback


Use the playback_url available in the Wowza CDN on Fastly stream target details to configure and play a test stream using an HLS-compatible player such as Wowza™ Player.