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.29k stars 636 forks source link

stream name stuck Broadcasting status, can't push the stream again #4277

Open obackup opened 2 years ago

obackup commented 2 years ago

Short description

During the process of streaming with dumprtmp library, the network may be unstable and the connection may be broken. The streaming is restarted, but the stream name status of the server is still Broadcasting, even if the power is off or has been here for a long time, the status is still Broadcasting。 Can't push the stream again

Environment

Enterprise Edition 2.4.3 20220418_2241

Logs

image

mekya commented 2 years ago

Thank you for the issue @obackup. I think we know the reason and we can provide some workaround solution.

Let me put to the backlog to schedule. I think one of my colleague will respond you soon

muratugureminoglu commented 2 years ago

Hi,

1. You can update the status field of the Broadcast object.

Here is an example Rest request:

curl -X 'PUT' 'https://test.antmedia.io:5443/WebRTCAppEE/rest/v2/broadcasts/stream1'   -H 'accept: application/json'   -H 'Content-Type: application/json'   -d '{"streamId": "stream1", "status": "finished"}'

2. You can delete the old one and create a new stream with the same Stream ID.

mekya commented 2 years ago

Hi @obackup ,

We also have a permanent solution for this problem. It's available in 2.4.4-SNAPSHOT https://github.com/ant-media/Ant-Media-Server/issues/4172