ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.23k stars 618 forks source link

HLS recording control #5425

Open radosdaniel opened 1 year ago

radosdaniel commented 1 year ago

Is your feature request related to a problem? Please describe. Our product allows our streamers to create streams using WebRTC, SRT and RTMP. If they choose to create a stream using SRT or RTMP (e.g. with OBS or other streaming devices), we want to let them test their streams without having to start streaming publicly. In our current flow, the streamer first creates a stream with all the details set (title, category, etc), which creates a stream using the Ant Media API. If the streamer chooses to stream using SRT or RTMP, we return the url they need to set in their device (with the created Ant Media stream id in it). Once they have this url and have started publishing, we want to load the HLS url into a player so they can test their settings. If everything looks good, they need to click on a "Start stream" button, which will start the mp4 recording on the Ant side, and set some statuses on our side so that the stream is accessible to users (viewers). After the stream has stopped, we delete the stream and create a video entity from the recorded HLS, which is uploaded to S3.

The problem is that we have no control over the HLS upload/recording, so the uploaded HLS will contain the part where the streamer tests the streaming setup.

Describe the solution you'd like We would like to be able to control when the HLS recording starts, or from when it needs to be uploaded to S3. (The same way that mp4 recording works at the moment)

mekya commented 1 year ago

Hi @radosdaniel,

Thank you for the feature request.

Some refactors we've made on the server side, let us support adding/removing muxers on the fly. I think we can add this feature. I'm adding this to the backlog.

Cheers

enkhchuluun commented 1 year ago

Cool to hear you going to implement this feature. My situation is exactly the same @radosdaniel 's situation.

End users should see only dedicated HLS recording.

Cheers