Jump to content
  • 0

live streaming Zoom, how to play only newest stream


Brent
 Share

Question

I've installed Ant Media Server Community 2.0.0, added a LiveStream under LiveApp, and am able to stream Zoom to it. For example, let's say my Publish URL is "rtmp://ant-server/LiveApp/084999195417856270459936". When Zoom starts streaming, the ant server creates "084999195417856270459936.mp4". If I then view the stream via "http://ant-server:5080/LiveApp/play.html?name=084999195417856270459936" it works fine.

Later on, I start a new Zoom meeting and stream it using  the same Publish URL. The ant server then creates "084999195417856270459936_1.mp4". If I then play the stream using the URL above, it still plays the original stream, not the new one. If I change the name to 084999195417856270459936_1 it plays the new stream, but obviously that solution won't work if the URL is embedded in a static page.

So my question is, is there a way that when using a static embedded URL, the ant server will play the newest stream rather than the first stream?
Link to comment
Share on other sites

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0
Hi Brent,

To my knowledge, there isn't a specific function that does this but you can write a small script that does this. You can get a list of the videos on the server with 
LiveApp/rest/v2/vods/list/{offset}/{size}
Then check the streamId field of the returned objects and get the latest created one. If you also want to show the broadcast if it exists, you can simply check it by sending a get request to
/LiveApp/rest/v2/broadcasts/{streamId}
If you get a 404, then there is no such stream and if you get the JSON, then you can show it instead.

 I hope this solves your problem.

Best,
Asim


On Wednesday, May 6, 2020 at 5:43:01 PM UTC+3, Brent wrote:
I've installed Ant Media Server Community 2.0.0, added a LiveStream under LiveApp, and am able to stream Zoom to it. For example, let's say my Publish URL is "rtmp://ant-server/LiveApp/084999195417856270459936". When Zoom starts streaming, the ant server creates "084999195417856270459936.mp4". If I then view the stream via "http://ant-server:5080/LiveApp/play.html?name=084999195417856270459936" it works fine.

Later on, I start a new Zoom meeting and stream it using  the same Publish URL. The ant server then creates "084999195417856270459936_1.mp4". If I then play the stream using the URL above, it still plays the original stream, not the new one. If I change the name to 084999195417856270459936_1 it plays the new stream, but obviously that solution won't work if the URL is embedded in a static page.

So my question is, is there a way that when using a static embedded URL, the ant server will play the newest stream rather than the first stream?
Link to comment
Share on other sites

 Share


×
×
  • Create New...