This article explains how to send a single live stream from Wowza Streaming Engine to YouTube for distributed delivery and adaptive bitrate playback.
Create a live stream in YouTube Studio
To use Wowza Streaming Engine as a video source for YouTube, you first need to set up a live stream in YouTube Studio. For more information about YouTube Studio, see the YouTube help article Intro to YouTube Studio.
- Go to the YouTube Studio Live Streaming page and sign in with your Google credentials.
- On the Stream tab, if given the option to choose between copying an existing stream or creating a new stream, click New Stream.
- On the New stream dialog box, enter a title, privacy level, description, category, and other details for the live stream, and then click Create Stream.
- Note the Stream URL and the Stream name/key that YouTube generates. You'll use those values when configuring the stream target for your application.
Create an application in Wowza Streaming Engine
Next, create a live application in Wowza Streaming Engine to receive the live stream from an H.264 encoder or camera.
- In Wowza Streaming Engine Manager, click the Applications tab at the top of the page, and then click the name of your live application in the contents panel.
- In the contents panel, click Sources (Live).
- Select the camera or encoder that you want to use as your video source, and complete the steps to connect it to Wowza Streaming Engine. For more information, see Connect a live source to Wowza Streaming Engine.
- Your video stream must include audio. If you encoder doesn't have audio capability, you can add audio to your video-only stream by following the instructions in How to add an audio track to a video-only stream (ModuleAddAudioTrack).
- By default, 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 to send the stream to YouTube
After the live application is created in Wowza Streaming Engine, it must be configured to send the stream to YouTube.
- In the contents panel, click Stream Targets, and then click Add Stream Target.
- On the Add Stream Target page under Third-Party Target Destinations, click YouTube Live. YouTube receives the stream over RTMP.
- On the YouTube Live Configuration page, provide the following information:
- Stream Target Name - A descriptive name for this target setup in Wowza Streaming Engine. The stream target 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 source stream, specified when you connected the source stream to Wowza Streaming Engine, that will be sent to YouTube.
- Destination Application Name - The name of the YouTube application in the Stream URL field. This is located on the YouTube Live Control Room page for your event under the Stream Settings tab. The application name appears after the host name. In the following example, the application name is live2.
- Destination Application Instance - Leave this field blank. A Destination Application Instance isn't required for YouTube stream targets.
- Destination Host - The address of the YouTube server in the Stream URL field located on the Stream Settings tab of the YouTube Live Control Room page for your event. In the following example, the destination host is abc.rtmp.youtube.com.
- Destination Port - The port number for your connection. RTMP connections use port 1935 by default.
- Destination Stream Name - The name of the stream in the Stream name/key field located on the YouTube Live Control Room page for your event under the Stream Settings tab.
Note: The Destination Stream Name is a 20-digit alpha-numeric code, not the Title of the stream you created in YouTube. See Create a live stream in YouTube Studio for more information.
- User Name and Password - Your YouTube username and password for authentication.
- Click Add this target.
Note: YouTube automatically creates lower-bitrate renditions of the stream for adaptive bitrate playback. No additional configuration is required.
Enable Stream Targets
Before you stream, you must enable the Stream Targets feature for the Wowza Streaming Engine application and the stream target you created.
If you don't see a checkmark 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 the Stream Targets feature is enabled, the target status on the Stream Targets page displays one of the following statuses:
- Waiting – The target is enabled but isn't yet pushing the stream to the YouTube destination, either because the target's configured source stream isn't connected to Wowza Streaming Engine or Wowza Streaming Engine hasn't completed initializing the connection to the YouTube destination.
- Active – Wowza Streaming Engine successfully connected to the YouTube target and is actively pushing the stream.
- Error – Wowza Streaming Engine was unable to connect to the YouTube destination. Make sure the target's configured source stream is connected to the Wowza Streaming Engine input. Errors might be due to an invalid target configuration or issue with the destination server.
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
Configure your encoder and then test the live stream.
- 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 YouTube.
- In Wowza Streaming Engine Manager, verify that the stream is working by clicking Incoming Streams in the contents panel, and then click 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 live stream.
- To verify that YouTube is receiving the stream, go to the YouTube Live Control Room page for your event. If YouTube is successfully receiving the stream, a preview of the stream is automatically displayed on the page.
- Stop the stream in the H.264 camera or encoder to end your test connection.