Connect a WebRTC stream to Wowza Streaming Cloud

Web Real-Time Communication (WebRTC) is an open-source project that enables real-time communication of audio, video, and data in web browsers and apps. The Wowza Streaming Cloud™ service supports ingest and transcoding of WebRTC streams through the live stream or transcoder workflow.

Notes:
  • Wowza Streaming Cloud only supports Adaptive bitrate live streams and transcoders for WebRTC.
  • Closed Captions and Source Security aren't available for WebRTC.

Video tutorial: Connect a WebRTC stream to Wowza Streaming Cloud


Live stream workflow


To create a WebRTC stream through the live stream workflow, do the following:

Note: The Live Stream Type and Billing Mode can't be changed after the live stream is created.
  1. Sign in to Wowza Streaming Cloud.
  2. Click the Live Streams menu, and then click Add Live Stream.

  1. On the Live Stream Setup page, enter a Live Stream Name, choose a Broadcast Location, and then click Next.
  2. On the Video Source and Transcoder Settings page, select Other WebRTC as the video source you want to use to connect to Wowza Streaming Cloud.

  1. For Live Stream Type, select Adaptive bitrate. Passthrough streams aren't available for WebRTC.
  2. For Closed Captions, use the default setting, None. Closed Captions aren't available for WebRTC.
  3. Specify the other video source settings, and then click Next.
  4. Complete the steps to finish creating the live stream.
Note: For more information about live stream settings, see the Help panel on the right side of each page.

Wowza Streaming Cloud creates the live stream and displays the Overview tab of the live stream detail page.

Test the live stream connection


The Wowza Streaming Cloud documentation includes a downloadable example that shows how to publish a WebRTC stream to Wowza Streaming Cloud.

Note: The WebRTC example must be hosted on a web server (for example, Apache HTTP Server) that uses SSL encryption.
  1. Download the WebRTC HTML example from Github.
  2. In your file system, navigate to the example files and copy the contents of the html folder to your web server.
  3. Open index.html in a web browser. Be sure to grant access to your camera and microphone when prompted.
  4. Use the Source Connection Information on the Overview tab to configure the stream settings:
     
    • Host Server – Replace wss://[wowza_subdomain].entrypoint.cloud.wowza.com/webrtc-session.json with the SDP URL.
    • Application Name – Replace webrtc with the Application Name.
    • Stream Name – Replace myStream with the Stream Name.
  5. Start the live stream in Wowza Streaming Cloud by doing one of the following:
     
    • Click Start Live Stream at the top of the live stream detail page.
    • Click Start your live stream now in the Video Thumbnail on the Overview tab.

    Wowza Streaming Cloud asks you to confirm that you want to start the live stream and then starts it and connects with your source.

  6. On the index.html page, click Publish.
  7. Confirm that the stream is playing by looking at the Video Thumbnail in the Overview tab of the live stream detail page.

    The Video Thumbnail displays a frame from the live stream every five seconds. If the live stream has started but Wowza Streaming Cloud isn't receiving any source video, the message "No video detected" appears in place of the video frame.

Transcoder workflow


The transcoder workflow is an advanced mode that allows you to customize transcoding processes. For more information, see Create and manage transcoders in Wowza Streaming Cloud.

To create a WebRTC stream through the transcoder workflow, do the following:

Note: The Transcoder Type and Billing Mode can't be changed after the transcoder is created.
  1. Sign in to Wowza Streaming Cloud.
  2. Click Advanced on the menu bar, click Transcoders, and then click Add Transcoder.

  1. On the Transcoder Setup page, enter a descriptive Transcoder Name.
  2. For Transcoder Type, select Adaptive bitrate. Passthrough streams aren't available for WebRTC.
  3. Select a Broadcast Location that's as close as possible to where your stream will originate, and select whether or not you want to record the stream as it passes through the transcoder.
  4. For Closed Captions, use the default setting, None. Closed Captions aren't available for WebRTC.
  5. For Source Protocol, select WebRTC.
  6. For Source Delivery Method, select Push to Wowza Streaming Cloud to send the stream to the transcoder at its Broadcast Location.
  7. Specify the other transcoder settings.
     
    Note: For more information about transcoder settings, see the Help panel on the right side of the page.
  8. Click Add.

    Wowza Streaming Cloud creates the transcoder and displays the Outputs & Targets tab of the transcoder detail page.
  9. Complete the transcoder by adding output renditions and stream targets. For more information, see Create a custom transcoder with many outputs and targets in Wowza Streaming Cloud.
     
    Note: Passthrough video and passthrough audio output renditions aren't available for WebRTC.

Test the transcoder connection


The Wowza Streaming Cloud documentation includes a downloadable example that shows how to publish a WebRTC stream to Wowza Streaming Cloud.

Notes:
  • The WebRTC example must be hosted on a web server (for example, Apache HTTP Server) that uses SSL encryption.
  • In order for the example to work properly, the transcoder Source Stream Extension must be set to .json.
  1. Download the WebRTC HTML example from Github.
  2. In your file system, navigate to the example files and copy the contents of the html folder to your web server.
  3. Open index.html in a web browser. Be sure to grant access to your camera and microphone when prompted.
  4. Use the transcoder information on the Transcoder Setup tab to configure the stream settings:
     
    • Host Server – Replace [wowza_subdomain].entrypoint.cloud.wowza.com with the Host Server address.
    • Application Name – Replace webrtc with the Application Name.
    • Stream Name – Replace myStream with the Stream Name.
  5. Start the transcoder in Wowza Streaming Cloud by doing one of the following:
     
    • Click Start Transcoder at the top of the transcoder detail page.
    • Click Start your transcoder now in the Video Thumbnail on the Overview tab.

    Wowza Streaming Cloud asks you to confirm that you want to start the transcoder and then starts it and connects with your source.

  6. On the index.html page, click Publish.
  7. Confirm that the stream is playing by looking at the Video Thumbnail in the Overview tab of the transcoder detail page.

    The Video Thumbnail displays a frame from the live stream every five seconds. If the transcoder has started but Wowza Streaming Cloud isn't receiving any source video, the message "No video detected" appears in place of the video frame.

More resources