Jump to content
  • 0

API Publish broadcasts


julie Prodhomme
 Share

Question

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0

Hello,

You can send an rtmp stream by adding an rtmp endpoint for a stream that is broadcasting on your server. Or, you can publish rtmp directly to your server with software like OBS. Here is a guide for OBS https://github.com/ant-media/Ant-Media-Server/wiki/Open-Broadcaster-Software-Publishing

If you just want to send an rtmp stream you can add an RTMP endpoint with Rest API. If you have an existing stream on your server, you can use this command to add an RTMP endpoint to that existing stream.

This is generated by Postman Application. You can just import the below code and try it on your end if you have Postman.

curl --request POST \
  --header 'accept: Application/json' \
  --header 'content-type: application/json' \
  --data '{"rtmpUrl":"rtmp://SERVER2/LiveApp/testtest"}'

Notice that I have a stream with streamid=stream1, broadcasting on SERVER1. Then I add an RTMP endpoint to it to redirect it to another server which is SERVER2. The data you should be providing is just this line

 {"rtmpUrl":"rtmp://SERVER2/LiveApp/testtest"}

This redirects stream1 to SERVER2 with the stream name=testtest

Regards

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...