chriswiggins / rtsp-streaming-server

Lightweight RTSP/RTP streaming media server written in Javascript
GNU General Public License v3.0
107 stars 21 forks source link

Doesn't unmount when disconnection interrupts #27

Open RobotnickIsrael opened 3 years ago

RobotnickIsrael commented 3 years ago

When ffmpeg sends announce to rtsp-streaming-server for the first time everything works fine. But if the network dies because of whatever reason, it seems like rtsp-streaming-server doesn't unmount - So when connection is restored it doesn't allow to mount it again saying it already taken. I think it also causes the server to crash since ffmpeg writes:

method ANNOUNCE failed: 503 Service Unavailable

I'll try to collect more data about this issue

hnguyen48206 commented 1 year ago

I have noticed the kind of similar case too. It happens when you force close ffmpeg and then when you try to init the stream again with that same path, it won't work until you declare a new path. Basically, the rtsp server do not close the connection on the input interuption. By the way, do you guys know if this project is still in active development?

chriswiggins commented 1 year ago

Hi @hnguyen48206 - I haven't been keeping up the maintenance of this as we now use another project at work. I'm happy to take any PRs or anyone who's keen to keep up maintenance on this

hnguyen48206 commented 1 year ago

Still much appriciate your work sir. For now, I just make a simple adjustment at the url_check part, if it has been initilized before, than instead of returning error, I do the unmount first and then let the addmount works as a new stream. By the way, I'm looking for a way to know when the input stream has stopped working so I can do some clean up works (I'm testing this server with live555 together) but have not found any luck. I do see that the socket from 'rtsp-server' logs out onConnectionError at that time but do not know which one is the one for that specific input. Do you have any suggestion sir?