Try Live Demo

Social media is a very important part of our lives. The easiest and fastest way to reach the masses is again social media platforms.

Ant Media Server can publish live streams to 3. party endpoints. In other words, live streams can be published to Social Media such as Youtube, Facebook, Periscope, and other generic RTMP endpoints simultaneously through Ant Media Server.

In this blog post, we are going to show how a developer can use this functionality on Ant Media Server.

Let’s do it step by step.

How to Publish Live Stream on Facebook?

Facebook is still one of the most used social media platforms. Facebook is a popular platform, especially for live streams. You can publish live streams on your pages/accounts. Just click the Live button in the Create Post tab.

ant-media-publish-stream-facebook-fan-page-go-live

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

ant-media-facebook-fan-page-go-live-panel

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: <StreamURL><StreamKey>

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

ant-media-dashboard-edit-RTMP-endpoints

You just need to Add your Facebook RTMP Endpoint URL to the Ant Media Server stream RTMP Endpoint tab as the following image.

ant-media-dashboard-add-facebook-rtmp-endpoint

So, you can start broadcasting now!

How to Publish Live Stream on Youtube?

One of the questions we hear the most is how to stream on YouTube. You can publish live streams on your YouTube account. Just click the Create button and select Go Live.

ant-media-publish-stream-youtube-go-live

Just Click the Go button on the Streaming Software tab.

ant-media-youtube-live-select-software

Then copy the Stream URL and Stream Key.

ant-media-youtube-live-dashboard

Your Youtube RTMP Endpoint URL that you will use in Ant Media Server should be like this: <StreamURL>/<StreamKey>

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

ant-media-dashboard-edit-RTMP-endpoints

You just need to add your Youtube RTMP Endpoint URL to the Ant Media Server stream RTMP Endpoint tab as the following image.

ant-media-dashboard-add-youtube-rtmp-endpoint

So, you can start broadcasting now!

How to Publish Live Stream on Periscope?

It is very easy to stream live on periscope, which is one of the most preferred platforms by live broadcasters. You can publish live streams on your periscope account. Just click the Profile button and select Producer.

ant-media-publish-stream-periscope-producer-tab

Then copy Stream URL and Stream Key.

ant-media-periscope-producer-dashboard

Your Periscope RTMP Endpoint URL that you will use in Ant Media Server should be like this: <StreamURL>/<StreamKey>

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

ant-media-dashboard-edit-RTMP-endpoints

You just need to add your Periscope RTMP Endpoint URL to the Ant Media Server stream RTMP Endpoint tab as the following image.

ant-media-dashboard-add-periscope-rtmp-endpoint

So, you can start broadcasting now!

How to Add/Remove RTMP Endpoint with Ant Media Stream?

You can Add/Remove RTMP Endpoint with 2 options.

One of them is Add/Remove RTMP Endpoint with Dashboard. It’s for the general users.

Another option is to Add/Remove RTMP Endpoint with REST API. This option is for advanced users. You can Add/Remove RTMP Endpoint programmatically. REST API Usage is so basic.

1- Add/Remove RTMP Endpoint with Dashboard

This option is for general users. You just need to click the broadcast properties tab and click Edit RTMP Endpoint as the below image.

ant-media-dashboard-edit-RTMP-endpoints

2- Add/Remove RTMP Endpoint with REST API

This option is for advanced users. You just need to request rtmp-endpoint REST API.

Here is Add RTMP Endpoint Javascript XHR example:

You can get more info in the REST API.

Here is Remove RTMP Endpoint Javascript XHR example:

You can get more info in REST API.

Click for more detail about REST API Guide.

PS: Please be sure to add your IP Address to the Use IP Filtering for RESTful API option on Application Settings.

Conclusion

After adding RTMP Endpoint, you need to publish a live stream. Here is our guide for publishing live stream. Finally check the social media account to see the live stream.

Please let us know if you have any question by sending an e-mail to contact@antmedia.io


Selim Emre Toy

Highly motivated full-stack developer with 6 years of experience especially in Java and Angular. Constantly learning, passionate about solving complex problems. Proficient in various programming languages and technologies. Enjoys finding creative solutions to challenges.

chatsimple