How to send a stream from Wowza Streaming Engine to a Wowza Streaming Cloud HLS target

You can use the Stream Targets feature of Wowza Streaming Engine™ live streaming software to send a single stream or a group of transcoded renditions of a live stream directly to a Wowza Streaming Cloud™ CDN target. This allows you to bypass transcoding in the Wowza Streaming Cloud service and just use the Wowza Streaming Cloud edge network to deliver the stream to viewers.

This article explains how to send a stream or, optionally, a group of transcoded stream renditions from Wowza Streaming Engine 4.5 to 4.6 to a Wowza CDN HLS stream target in Wowza Streaming Cloud over HTTP. It includes options for transmitting the stream securely between Wowza Streaming Engine and the target, and securely between the target and your viewers.

Notes:
  • The easiest and most common way to use Wowza CDN is to send a single-bitrate or transcoded multi-bitrate live stream from Wowza Streaming Engine 4.7 or later to a Wowza CDN endpoint over HLS following the instructions in How to stream to Wowza CDN.
  • If you can't update to Wowza Streaming Engine 4.7 or later, you can use earlier versions of Wowza Streaming Engine (4.5 to 4.6) to send streams to a Wowza Streaming Cloud CDN HLS target over HTTP(S). Support for relative playlists requires Wowza Streaming Engine 4.6 or later. All options require a Wowza Streaming Cloud or Wowza CDN subscription.

Contents


Create an Apple HLS target in Wowza Streaming Cloud
Create an application in Wowza Streaming Engine to ingest the live source video
Create a stream target in Wowza Streaming Engine
Enable Apple HLS properties
(Optional) Adjust the workflow for adaptive bitrate streaming from Wowza Streaming Engine
Enable Stream Targets
Test the connection
More resources

Create an Apple HLS target in Wowza Streaming Cloud


First, create a Wowza CDN stream target in Wowza Streaming Cloud that receives and delivers an Apple HLS stream.

  1. Click the Advanced menu, and then click Stream Targets.
     
  2. Click Add Target, choose Wowza CDN - HLS, and then click Add.
     
  3. On the Add a Wowza CDN - HLS target page, enter a descriptive Target Name.
     
  4. (Optional) For Secure Ingest, select Yes, ingest the stream securely if you want to secure the connection between Wowza Streaming Engine and the stream target with a secret key. If you select yes, you'll need to add a query parameters property to your Wowza Streaming Engine live application. Instructions are below, in Enable Apple HLS properties.
  5. (Optional) Select Yes, enable CORS if you want to allow cross-origin resource sharing.
     
  6. Click Add.

Wowza Streaming Cloud creates the target and displays its detail page. Keep the page open or make note of the Setup details. You'll need them in Wowza Streaming Engine.

Note: When you send a stream directly to a Wowza CDN target, you can't record the stream in Wowza Streaming Cloud.

Create an application in Wowza Streaming Engine to ingest the live source video


Next, create the live application in Wowza Streaming Engine that will receive the live stream from an H.264 encoder or camera.

  1. Sign in to Wowza Streaming Engine Manager, click the Applications tab at the top of the page, and then click live in the contents panel.
     
    Note: This article uses the live application that installs with Wowza Streaming Engine. If you want to use a different live application, select it instead from the contents panel.
  2. In the contents panel, click Sources (Live).
     
  3. Select the camera or encoder that you want to use as your video source, and complete the process of connecting the source to Wowza Streaming Engine. For more information, see How to connect a live source to Wowza Streaming Engine.
Note: Wowza Streaming Engine requires RTMP and RTSP sources to provide a user name and password to connect to a live application. For information on how to turn off authentication, see Managing live source authentication settings.

Create a stream target in Wowza Streaming Engine


After the live application is created, configure it to send the stream to the Wowza CDN - HLS target in Wowza Streaming Cloud.

  1. In the contents panel, click Stream Targets and then click Add Stream Target.
  2. On the Add Stream Target page under Third-Party Target Destinations, click Akamai.
  3. On the Akamai Configuration page, provide the following information:
Note: For more information on target configuration settings, see the contextual Help panel on the right side of the Wowza Streaming Engine Manager page.
  • Destination Protocol – Select Apple HLS.
  • Stream Target Name – A descriptive name for the target. It's good practice to include the destination, protocol, and rendition in the name, for example, myCloudTarget-HLS-720p. The name must be unique and can't contain less-than (<), greater-than (>), colon ( : ), quotation (' and "), forward slash (/), backslash (), pipe (|), question mark (?), asterisk (*), double-dot (..), or tilde (~) characters.
  • Source Stream Name – The name of the incoming stream that you specified in Wowza Streaming Engine when you set up the video source (the Stream Name from the Sources (Live) setup). If you accept the default incoming stream name, which we recommend, it's myStream.
  • Destination Stream Name – The eight-digit alphanumeric Stream Name from the Wowza CDN stream target in Wowza Streaming Cloud, which you can find on the Setup tab of the stream target's detail page.

  • Akamai Stream ID – The stream ID from the Primary URL of the Wowza CDN stream target, which you can also find on the Setup tab of the stream target's detail page in Wowza Streaming Cloud. The stream ID is the six-digit numeric string that follows .net/. For example, in the primary URL

    http://post.wowzaprod110-i.akamaihd.net/254473/0a4c6850

    the Akamai Stream ID is 254473.
     
  • Akamai Host ID – The host ID from the Primary URL of the Wowza CDN stream target in Wowza Streaming Cloud. The host ID is the subdomain that follows http://post. and precedes .akamaihd.net/. For example, in the primary URL

    http://post.wowzaprod110-i.akamaihd.net/254473/0a4c6850

    the Akamai Host ID is wowzaprod110-i.
  • Playlist Count – The number of time-based chunks to maintain in the destination stream's playlist. Use the default value, 0, to allow the application's live stream packetizer (the cupertinoPlaylistChunkCount property) to specify the value.
  • Akamai Event Name – Leave blank.
  • Adaptive Groups – The adaptive group ID from the Apple HLS playback URL of the Wowza CDN stream target in Wowza Streaming Cloud. The adaptive group ID is the eight-digit alphanumeric string that precedes /playlist.m3u8. For example, in the playback URL

    https://wowzaprod110-i.akamaihd.net/hls/live/254473/0a4c6850/playlist.m3u8

    the adaptive group ID is 0a4c6850 (the same as the Stream Name in this example).
  • Destination Server – Choose primary.
  • Apple HLS Stream Renditions – Choose Audio and video.
  1. Click Add this target.

Enable Apple HLS properties


Wowza Streaming Engine offers a handful of properties that you can use to control the secure transmission and playback of the live stream. Before streaming, configure these custom properties for the desired secure workflow.
 
  1. Click the Custom tab for the Wowza Streaming Engine stream target, and then click Edit. Access to the Custom tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
     
  2. Click Add Custom Property.
     
  3. Specify any of the following properties or a combination of these properties.
     
    Name Type Value
    queryParams String Delivers the HLS stream from Wowza Streaming Engine to the Wowza CDN target with a hashed key. For queryParams to work, you must have selected Yes, ingest the stream securely when you created the HLS target in Wowza Streaming Cloud. Enter the Secure Ingest Parameters from the detail page of the Wowza Streaming Cloud HLS target as the queryParams property's Value. queryParams can be used alone or in conjunction with sendSSL.
    sendSSL Boolean Enter true to send the Apple HLS stream from Wowza Streaming Engine to the Wowza CDN - HLS target over HTTPS. sendSSL can be used alone or in conjunction with queryParams.
     
    Note: Alternatively, you can specify send SSL in the Properties tab of the Wowza Streaming Cloud HLS target's detail page.
    playbackSSL Boolean Enter true to send the Apple HLS stream from the Wowza CDN - HLS target to players over HTTPS. If you set http.relativePlaylists and playbackSSL to true, playbackSSL overrides http.relativePlaylists.
    http.relativePlaylists Boolean Requires Wowza Streaming Engine 4.6 or later. Enter true to allow viewers to watch the stream over either HTTP or HTTPS, however their browser requests the stream. Enter false to require all viewers to watch the stream only over HTTP or only over HTTPS, whichever way the target is configured to deliver it. If you set http.relativePlaylists and playbackSSL to true, playbackSSL overrides http.relativePlaylists.
     
    Note: Alternatively, you can specify relative playlists in the Properties tab of the Wowza Streaming Cloud HLS target's detail page.
  4. Click Add after each property you create and click Save when you're done. 
Note: After saving multiple properties, the sendSSL property may disappear from the Custom tab of the stream target page, but it is written to pushpublishmap.xml.

(Optional) Adjust the workflow for adaptive bitrate streaming from Wowza Streaming Engine


If you want use the Wowza Transcoder with Wowza Streaming Engine, you'll need to perform some additional tasks. First, you need to enable the Transcoder, and then you need to create and configure a stream target for each transcoded rendition you're going to deliver to the Wowza CDN - HLS target.
 
  1. Click Transcoder in the contents panel for the live application and if Transcoder is disabled, click Enable Transcoder.
     
  2. Click Edit and for Fallback Template choose Transcode (Default).

    The rest of this example assumes you're using the default encoding presets in the Transcode (Default) template. For more information on transcoding, see How to set up and run Wowza Transcoder for live streaming.

    After the Transcoder is enabled, prepare the additional stream targets.
     
  3. In the contents panel, click Stream Targets and then click the Copy icon for the myCloudTarget-HLS-720p target.
     
  4. In the Enter a name for the copied stream target field, provide a name for the next-largest encoding preset in the Transcode (Default) Transcoder template. For example, myCloudTarget-HLS-360p.
     
    Important: You must create the stream targets in the order they should appear in the adaptive bitrate playlist (typically descending bitrates) to ensure proper playback. Note that the stream targets are sorted by name in Wowza Streaming Engine Manager and might not reflect the order in which they were added unless they are named in a way that would order them lexicographically.
  5. Click OK.

    Each stream target's Source Stream Name must include the corresponding encoding preset's name.

    Each stream target's Destination Stream Name must include the corresponding encoding preset's angle and video bitrate.

    Now, edit the myCloudTarget-HLS-360p stream target's Source Stream Name and Destination Stream Name so that they reflect the 360p encoding preset.
     
  6. Click Edit.
     
  7. Using an underscore, append the encoding preset name (360p) the Source Stream Name. If you used the default incoming stream name (myStream) as the Source Stream Name as recommended, the new Source Stream Name will be myStream_360p.
     
  8. Append _1_ and the encoding preset's video bitrate (850 Kbps) to the Destination Stream Name. If the Destination Stream Name is 1a2b3c4d, for example, change it to 1a2b3c4d_1_850.
     
  9. Repeat Steps 3 - 8 until you have a properly configured target for each rendition that you're sending to the Wowza Streaming Cloud CDN target. If you're using all of the renditions in the Transcode (Default) template and adhering to the naming conventions we've described, the targets will have the names in the following table.
     
    Note: You'll have to go back and edit the 720p stream target.
    Stream Target Name Source Stream Name Destination Stream Name
    myCloudTarget-HLS-720p myStream_720p [eight-digit-alphanumeric-string]_1_1300
    myCloudTarget-HLS-360p myStream_360p [eight-digit-alphanumeric-string]_1_850
    myCloudTarget-HLS-240p myStream_240p [eight-digit-alphanumeric-string]_1_350
    myCloudTarget-HLS-160p myStream_160p [eight-digit-alphanumeric-string]_1_200
    myCloudTarget-HLS-h263 myStream_h263 [eight-digit-alphanumeric-string]_1_150

That's it. The adaptive group ID binds the renditions into a group as they go to the target, similar to a name group or SMIL file.

Enable Stream Targets


When you're ready stream, enable the Stream Targets feature for the Wowza Streaming Engine application and Wowza Streaming Cloud stream target you created.

If you don't see a check mark next to Stream Targets in the contents panel of the application, click Stream Targets in the contents panel and then click Enable Stream Targets. When prompted, click Restart Now so your change takes effect. When Stream Targets is enabled, a checkmark appears next to Stream Targets in the contents panel and the Stream Targets page shows Status is Enabled.



If the Status of an individual stream target is Disabled, click the Enable icon for the stream in the Actions column.



When a stream target is enabled, its status on the Stream Targets page is one of the following:
 
  • Waiting. The target is enabled but either the original source stream isn't connected to Wowza Streaming Engine, or Wowza Streaming Engine hasn't finished initializing the connection to the Wowza Streaming Cloud CDN target.
     
  • Active. Wowza Streaming Engine is successfully sending the stream or transcoded renditions to the Wowza Streaming Cloud CDN target.
     
  • Error. Wowza Streaming Engine unsuccessfully tried to retrieve the stream target configuration and initiate streaming to the Wowza Streaming Cloud CDN target. Errors may be due to an issue with the Wowza Streaming Cloud service, a general connectivity issue, or an invalid target configuration.
The status of each stream target updates automatically if your Wowza Streaming Engine application has fewer than 100 stream targets. If your application has more than 100 stream targets, you can click Refresh to update the status.

Test the connection


Streams sent directly to Wowza Streaming Cloud CDN targets for distributed delivery must be started and managed in the Wowza Streaming Engine Manager. Video snapshots and real-time data aren't available in Wowza Streaming Cloud, but you can test the stream using the direct playback URLs.
 
  1. Start the stream in the H.264 camera or encoder that's sending the stream to the live application in Wowza Streaming Engine.

    The live application ingests the live stream and sends it to Wowza Streaming Cloud.
     
  2. In Wowza Streaming Engine Manager, verify that the stream is published by clicking Incoming Streams for the live application, and then clicking the stream name.

    The stream detail page displays the Status of the stream (Active) as well as details about connections, uptime, and throughput for the published stream.
     
  3. In the Wowza Streaming Cloud web manager, confirm that the live stream is playing by copying the Apple HLS direct playback URL from the stream target detail page and pasting it into a test player such as the Wowza Test Players.
     
    Note: You can see bandwidth usage and viewer data for the stream in Wowza Streaming Cloud by clicking the Usage icon under the stream target.
  4. Stop the stream in the source camera or encoder to end your test connection.

More resources



If you're having problems or want to discuss this article, post in our forum.