Static URL for the live streamed video and recorded video

217 views
Skip to first unread message

Reeti Garg

unread,
May 6, 2020, 2:21:46 AM5/6/20
to Ant Media Server
Hi,
When a live stream's embedded URL is copied, it plays on the embedded player but when the live stream is stopped, the same URL doesn't work, it says that video will be played automatically when it's live streamed. Console gives error and the same stream isn't available anymore. Can we have a static URL for a live stream as well as the same video that is recorded after live stream has stopped? 
I want a case where I can embed a URL to a video player, and if the video is being live streamed, the live streamed video is fetched and it has finished being live streamed, It can play the recorded video and not say 'The video will automatically play when it's live', something like youtube.

mahmut asım Onat

unread,
May 6, 2020, 9:50:05 AM5/6/20
to Ant Media Server
Hi Reeti,

If you inspect the guide below, it says that using the link here lets you play the recording of the stream afterward.

http://<SERVER_NAME>:5080/LiveApp/play.html?name=<STREAM_ID>


And if you are using the enterprise edition, in that case, the link will have the bitrate at the end like this:
http://<SERVER_NAME>:5080/LiveApp/streams/<STREAM_ID>_480p.mp4

Please check the guide and let me know if this solves your problem.

https://github.com/ant-media/Ant-Media-Server/wiki/Play-Live-and-VoD-Streams-and-Previews

Best,
Asim

Reeti Garg

unread,
May 6, 2020, 12:44:12 PM5/6/20
to Ant Media Server
Hi, the link http://<SERVER_NAME>:5080/LiveApp/streams/<STREAM_ID>_480p.mp4 will only be valid if the publishing has finished and the VoD streams are formed but what about during publishing i.e. the live-stream is taking place?
Message has been deleted

Reeti Garg

unread,
May 6, 2020, 12:49:11 PM5/6/20
to Ant Media Server
What do I need to do if I want to switch resolution during live streaming (like in youtube)? Do I have to load manifest files for different resolutions?


On Wednesday, May 6, 2020 at 7:20:05 PM UTC+5:30, mahmut asım Onat wrote:

mahmut asım Onat

unread,
May 6, 2020, 2:15:13 PM5/6/20
to Ant Media Server
Hi,

For switching bitrates, you can use the links with the resolutions like this: stream1_480p.m3u8. For your previous problem, we don't have a custom solution for that. You need to check if broadcast exists
by sending a get request to 
/LiveApp/rest/v2/broadcasts/{streamId}

Best,
Asim

Reeti Garg

unread,
May 7, 2020, 2:55:48 AM5/7/20
to Ant Media Server
Hi, what will the VoD link in case of recorded video. How will I form one?  
For instance, in the streams folder of my AMS server, I get a recorded mp4 stream '249877558331292383582750-2020-05-07_05-50_480p.mp4'. It's streamId+current date in yy-mm-dd format..but what after that? 480p is the bitrate. If the URL can't be formed or can change, what can I do to fetch all the recorded bitatres for a streamId?

Reeti Garg

unread,
May 8, 2020, 9:30:00 AM5/8/20
to Ant Media Server
Hi, where are the webrtc streams stored? How can I embed the webrtc streams in my player?
Reply all
Reply to author
Forward
0 new messages