crowsnest icon indicating copy to clipboard operation
crowsnest copied to clipboard

Camera Streamer UDP Ghost Stream

Open Xaver106 opened this issue 2 years ago • 4 comments

What happened

Camera Streamer currently has an isse, where a stream keeps running after it has been closed. This can overwhelm older Hardware quite quickly. In my case even causing me to no longer be able to reach my mainsail instance. https://github.com/ayufan/camera-streamer/issues/55

What did you expect to happen

A mention about this on the Documentation.

How to reproduce

Explainewd in the Linked Bug Report: https://github.com/ayufan/camera-streamer/issues/55

Additional information

It is probably best to either not reccomend the camera Streamer as default or add a warning.

Xaver106 avatar Jun 29 '23 10:06 Xaver106

Ustreamer seems to still depend on the legacy camera support. Not using the WebRTC Stream option and sticking to the MJPEG-streamer seems to not trigger the Ghost Stream

Xaver106 avatar Jun 29 '23 11:06 Xaver106

Ghost streams are caused by lack of proper shutdown of the stream by the clients. Chrome, Edge, Safari, etc do not properly signal closing the peer connection and instead just stop receiving communication. For mobile devices this happens quite frequently due to locking/unlocking a phone. I have a fix that adds a keep-alive type mechanism to camera-streamer but it will also require updates to Mainsail as it has its own front-end code displaying the stream.

I haven't looking into the rtsp implementation used within Mainsail/camera-streamer but that might be another viable workaround.

jpiccari avatar Jul 27 '23 05:07 jpiccari

@jpiccari Mainsail doesn't have a rtsp stream client right now, but feel free to contact me, if you need help to implement the keep-alive mechanism in the webrtc client in Mainsail.

meteyou avatar Jul 29 '23 08:07 meteyou

I can submit a PR with the changes I have in my local mainsail. It will be dependent on camera-streamer being updated (also need to submit a PR over there) and frankly, camera-streamer is just not very reliable (webrtc or otherwise) in my experience running on a Raspberry Pi 3B+ so even with the fix I think it is probably better for users to look to ustreamer + janus-gateway for webrtc streaming (although I haven't been able to set that up yet, anyone point me to some docs?).

jpiccari avatar Aug 05 '23 00:08 jpiccari