This tutorial explains how to use Intel® INDE Media Pack for Android for streaming from your device to YouTube.
Prerequisites:
- Camera Streaming sample from Intel® INDE Media Pack for Android:
- Wowza* Streaming Engine.
Installing Wowza Streaming Engine:
You can use Wowza on any platform (Microsoft Windows, Mac OS X and Linux/Unix). Please check the official installation guide.
Configuring Wowza Streaming Engine:
- In the Streaming Engine Manager Welcome page, click the Applications tab at the top of the:
- In the Applications contents pane, click live.
- In the contents pane, click Incoming Security, and then click Edit.
- The Incoming Security page is displayed. Configure the following options, and then click Save:
- Restart the application.
Setting up the YouTube live event:
- Sign in to the YouTube Video Manager Live Events webpage (http://www.youtube.com/my_live_events).
- Click Enable live streaming and verify your account.
- Click Create live event.
- In the Create a new event page, under Basic info, enter the relevant information about the stream (title, description, date/time, location, and so on) into the fields.
- Under Type, select Custom (more encoding options).
- Click Advanced settings to configure additional options such as enabling comments and recording the stream.
- Click the Go live now button.
- On the Ingestion Settings page, under Choose maximum sustained bitrate of your encoder, select the options that best represent your network and encoding capabilities.
- Under Select your encoder, select Other Encoders. You’ll then see stream name and server URL information similar to this:
Copy this information into a text document, for reference.
- Click the Save changes button.
Installing Push Publishing AddOn:
Starting with Wowza Streaming Engine 4, no additional installation steps are necessary. The Push Publishing AddOn has been updated and is now built in to Wowza Streaming Engine.
Configuring and testing Push Publishing AddOn:
- Access to the Modules tab is limited to administrators with advanced permissions:
- In Wowza Streaming Engine Manager, click the desired live application in the contents pane.
- On the live application page, click the Modules tab.
- On the Modules tab, do the following:Publishing the live stream:
1.Click Edit.
2. Click Add Module, and then add the following entry:
[sourcecode language=”java” collapse=”false”]
Name: ModulePushPublish
Description: ModulePushPublish
Fully Qualified Class Name: com.wowza.wms.pushpublish.module.ModulePushPublish</pre>
[/sourcecode]
3. Click Add, and then Save, and then click the application Restart when prompted to do so.
The ModulePushPublish module listens for incoming live streams to be published to the server (source streams). Push Publishing AddOn requires the following information to be formatted in a specific syntax in the [install-dir]/conf/PushPublishMap.txt file. At this time, editing the PushPublishMap.txt file isn’t supported by the Streaming Engine Manager UI. Using the above example information as a reference, the following unique stream elements are required when configuring the Push Publishing map file:
[sourcecode language=”java” collapse=”false”]
Profile: rtmp
Host(1): rtmp://a.rtmp.youtube.com
Host(2): rtmp://b.rtmp.youtube.com
Application(1): live2
Application(2): live2?backup=1
StreamName: ilya.aleshkov.hpw0-zadr-d849-4pbj
[/sourcecode]
- Using a text editor, edit the [install-dir]/conf/PushPublishMap.txt file and create a publish stream for both the primary and backup servers. Refer back to the stream name and server URL information that’s displayed on the YouTube Video Manager Ingestion Settings page. Using the above example information as a reference, the updated PushPublishMap.txt file would look like this:[sourcecode language=”java” collapse=”false”]
test={profile:”rtmp”, streamName:”ilya.aleshkov.hpw0-zadr-d849-4pbj”, host:”a.rtmp.youtube.com”, application:”live2”}
test={profile:”rtmp”, streamName:”ilya.aleshkov.hpw0-zadr-d849-4pbj”, host:”b.rtmp.youtube.com”, application:”live2?backup=1”}
[/sourcecode]The PushPublishMap.txt file now supports quotation (“) marks around the keys and value strings, in compliance with the JSON specification. Older files without quotation marks will continue to work for a limited time. Update your files as you edit them to retain compatibility with future versions of Push Publishing. - Save the [install-dir]/conf/PushPublishMap.txt file.
- Restart Wowza Streaming Engine.
Publishing the live stream:
- Launch Camera Streaming sample. Make sure you have proper stream settings:
- Check your stream inside live application Test Players:
- Go to the YouTube Live Control Room page for your event and click the Preview button to enable the YouTube CDN (Content Delivery Network) to process the incoming stream. When the Stream Status is GOOD, scroll down the page to find the Preview test video player and click Play. If you see your live video start to play, your Push Publishing workflow is correct and you’re ready to stream live.
- When you’re ready to release your live stream for public viewing, go to the YouTube Live Control Room page for your event and click the Start Streaming button. This will release the stream that’s pushed from Wowza Media Server for public viewing. When you see the live stream in the Public View test video player in the Live Control Room page, you’re successfully push publishing live to YouTube.
Source: Intel Developer Zone (by Ilya Aleshkov, Auriga’s Engineer)