Skip to main content

Simulcasting to social media channels

This guide will show you how to use Ant Media Server to live stream to social media and other third-party RTMP end points.



How to Publish Live Stream on Facebook

You can publish live streams on your pages/accounts. Just click the Live button in the Create Post tab.

After the click Live Button, you can see Facebook Live Dashboard as in the image shown below:

You just need to copy the Stream URL and Stream Key.

PS: If you want to use a persistent stream key, you just need to enable Use a Persistent Stream key in Setup Option.

Your Facebook RTMP Endpoint URL that you will use in Ant Media Server should be like this: rtmps://rtmps://live-api-s.facebook.com:443/rtmp/Stream-key

For example: rtmps://live-api-s.facebook.com:443/rtmp/677122211923308?s_bl=1&s_psm=1&s_sc=677124129589969&s_sw=0&s_vt=api-s&a=AbxqZXR6X1VaKBzk

Simply add your Facebook RTMP Endpoint URL to the Ant Media Server Edit RTMP Endpoints tab, as shown in the image below.

So, you can start broadcasting now!

How to Publish Live Stream on Youtube

info

YouTube does not accept streams without audio, thus your stream needs to include audio.

You can publish live streams on your YouTube account. Just click the Create button and select Go Live.

Just Click the Go button on the Streaming Software tab.

Then copy the Stream URL and Stream Key.****

Your YouTube RTMP Endpoint URL that you will use in Ant Media Server should be like this: rtmp://a.rtmp.youtube.com/live2/Stream-key

For example: rtmp://a.rtmp.youtube.com/live2/dq1j-waph-e322-waxd-dxzd

Simply add your YouTube RTMP Endpoint URL to the Ant Media Server Edit RTMP Endpoints tab, as shown in the image below.

So, you can start broadcasting now!

How to Publish Live Stream on Periscope

You can publish live streams on your periscope account. Just click the Profile button and select Producer.

Then copy Stream URL and Stream Key.****

Your Periscope RTMP Endpoint URL that you will use in Ant Media Server should be like this: rtmp://de.pscp.tv:80/x/Stream-key

For example: ,rtmp://de.pscp.tv:80/x/baps3a3x7j32

Simply add your Periscope RTMP Endpoint URL to the Ant Media Server Edit RTMP Endpoints tab, as shown in the image below.

So, you can start broadcasting now!

How to Add/Remove RTMP Endpoints?

There are two options for adding/removing RTMP endpoints.

One of them is Add/Remove RTMP Endpoint with Dashboard, as shown in the examples above. It is intended for the general purpose.

Another option is to use the REST API to Add/Remove RTMP Endpoints.

REST API to add/remove RTMP endpoint

This option is for advanced users by making an API request to the rtmp-endpoint.

Add an RTMP endpoint

curl -X 'POST' \
'https://AMS-domain:5443/App-Name/rest/v2/broadcasts/streamId/rtmp-endpoint' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"rtmpUrl": "rtmp://endpoint-URL/StreamKey",
}'

After adding the endpoint, you will receive one random dataId that will be used to remove the added endpoint using the remove rtmp-endpoint Rest API described in next step.

{
"success": true,
"message": null,
"dataId": "customqfjJGd",
"errorId": 0
}

You can get more information in the following REST API.

Remove an RTMP endpoint

Now, that dataId will be used to remove the added RTMP Endpoint.

curl -X 'DELETE' \
'https://AMS-domain:5443/App-Name/rest/v2/broadcasts/streamId/rtmp-endpoint?endpointServiceId=dataId-from-add-endpoint-response' \
-H 'accept: application/json'

You can get more information in the following REST API.

Click for more detail about REST API Guide.

PS: To use the Rest APIs, please add your IP address to the Enable IP Filter for RESTful API option in the application Settings.

Share feedback