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. Supported browsers include the latest versions of Chrome and Safari, as well as Edge version 79 and later.

For WebRTC streams created through the live stream workflow, Wowza Streaming Cloud provides a hosted publish page that automatically applies your live stream settings and allows you to start streaming right away.

Note: Closed Captions and Source Security aren't available for WebRTC.

Video tutorial: Connect a WebRTC stream to Wowza Streaming Cloud


Live stream workflow


Wowza Streaming Cloud provides a hosted publish page for WebRTC streams created through the live stream workflow. The page automatically applies your live stream settings and allows you to start streaming right away without additional configuration.

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.

Create a live stream

  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 Web Browser (WebRTC) as the video source you want to use to connect to Wowza Streaming Cloud.

  1. For Live Stream Type, select Adaptive bitrate.
  2. To create a recording of the stream, select Yes, record this live stream.
     
    Note: Recordings capture the incoming source stream, by default. For WebRTC, source audio is automatically transcoded. If you choose to record a specific output rendition, make sure that the audio is transcoded. If the audio isn’t transcoded, it won’t be included in the recording. For more information, see Record live streams and transcoders in Wowza Streaming Cloud.
  3. For Closed Captions, use the default setting, None. Closed Captions aren't available for WebRTC.
  4. Specify the other video source settings, and then click Next.
  5. Complete the steps to finish creating the live stream.
Notes:
  • Wowza Streaming Cloud allows you to create a hosted page with an embedded video player which your viewers can use to watch the live stream. You can customize the page on the Hosted Page Settings page. For more information, see Create and manage live streams in Wowza Streaming Cloud.
  • 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. Next, use the Wowza Streaming Cloud hosted publish page to start broadcasting.

Start the live stream

  1. In Wowza Streaming Cloud, start the live stream 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.
  2. On the Overview tab, under WebRTC Publish Page, click Open.
     
    Note: The WebRTC publish page isn’t supported on Firefox.

    The publish page opens in a new tab. Be sure to grant access to your camera and microphone when prompted.

    • Settings – Wowza Streaming Cloud automatically applies your live stream settings. Click Settings to view or edit the settings, if desired.
    • Microphone – Mute/unmute your microphone. Click the arrow next to the microphone icon to choose which microphone to use.
    • Video camera – Enable/disable your camera. Click the arrow next to the video camera icon to choose which camera to use.
    • Live Streaming URL – The address of the hosted video player page, if you created one. You can give the URL to your viewers so they can watch the live stream.
  3. Click Publish to start the broadcast.
     
    Note: After the broadcast is over, remember to stop the live stream in Wowza Streaming Cloud.

Live stream example (advanced)

The Wowza Streaming Cloud documentation includes a downloadable example that shows how to publish a WebRTC stream to Wowza Streaming Cloud. If you plan on using your own implementation of WebRTC, you can use the example to test the connection 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.

Create a transcoder

  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.
  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.
     
    Note: Passthrough audio isn't supported in recordings for WebRTC. To include audio, you must record an output rendition that has transcoded audio. For more information, see Record live streams and transcoders in Wowza Streaming Cloud.
  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.

Transcoder example (advanced)


The Wowza Streaming Cloud documentation includes a downloadable example that shows how to publish a WebRTC stream to Wowza Streaming Cloud. If you plan on using your own implementation of WebRTC, you can use the example to test the connection 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