📜 ⬆️ ⬇️

Broadcast video from a mobile device to YouTube

image Continuing the series of articles about the capabilities of the Intel® INDE Media Pack, this time I will talk about how using our library you can add to your application the ability to stream live video from a mobile device camera to YouTube. It's not about the code, but about how to properly configure all the necessary components. You can find the required code in the examples shipped with the Intel INDE Media Pack .


We will need:




Installing the Wowza Streaming Engine:



')

Configuring Wowza Streaming Engine:


1. At the top of the Streaming Engine Manager start page, click the Applications tab.
2. On the Applications panel, click Live .
3. Next, select Incoming Security and click the Edit button.
4. Set the following options, click Save

image

5. Restart the application.

Setting up a YouTube live event


1. Sign in to the YouTube Video Manager Live Events page
2. Click Enable live streaming , follow the instructions to verify your account.

image

3. Click Create live event .
4. On the Create a new event page, on the Basic info tab, enter the necessary information about your broadcast (name, description, date and time, location, etc.).
5. For type, select Custom (more encoding options) .

image

6. Click the Advanced settings tab to manage additional options (comments, recording, etc.).
7. Click the Create event button.
8. On the Ingestion Settings tab, under Choose maximum sustained bitrate of your encoder, select the option that best suits your network and device.
9. Under Select your encoder, select Other Encoders . You will see information about the name of the stream and server addresses.

image

Save this information. We will need it later.
10. Click the Save changes button.

Install Push Publishing AddOn


Starting with the Wowza Streaming Engine 4, no additional steps are required. Push Publishing AddOn is now built into the Wowza Streaming Engine .

Configure and validate Push Publishing AddOn


1. To access the Modules tab, you will need administrator privileges:

image

2. Then in the Wowza Streaming Engine Manager, select the necessary live application.
3. Click the Modules tab in the application settings.

image

4. On the Modules tab, do the following:
a. Click Edit .
b. Add a module by entering the following data:

Name: ModulePushPublish
Description: ModulePushPublish
Fully Qualified Class Name: com.wowza.wms.pushpublish.module.ModulePushPublish


image

c. Click Add, then Save and Restart when prompted:

image

ModulePushPublish module listens to incoming streams that will be published on the server. Push Publishing AddOn needs the following information, formatted in a special way and stored in the file [install-dir] /conf/PushPublishMap.txt . Currently, editing this file directly from the Streaming Engine Manager is not possible. Here is all the information we need:

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


5. Using a text editor, edit the [install-dir] /conf/PushPublishMap.txt file . If necessary, go back to the Ingestion Settings page in the YouTube Video Manager to find the options you want. The updated PushPublishMap.txt file should look like this:

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”}


For compatibility with the JSON specification, the PushPublishMap.txt file now supports quotes ("). Old files without quotes will continue to work for a while.
6. Save the file [install-dir] /conf/PushPublishMap.txt .
7. Restart the Wowza Streaming Engine .

image

Check everything in action


1. Run the “Camera Streaming” sample included with the Intel INDE Media Pack . Pay attention to the settings

image

2. Check the Test Players settings of the live application

image

3. Go to the YouTube Live Control Room page of your event and click the Preview button. When the status becomes GOOD , find the preview below on the page and click Play . If you see video from your device, then everything works correctly.
4. When you are ready to publish your stream, go to the YouTube Live Control Room page of your event and click the Start Streaming button. If you see your stream in the Public View test player, you have succeeded!

Source: https://habr.com/ru/post/227237/


All Articles