rtsp2mjpg icon indicating copy to clipboard operation
rtsp2mjpg copied to clipboard

Use less resources while idle?

Open epheterson opened this issue 2 years ago • 1 comments

Is it possible for this docker container to react to the need for a stream instead of always being available, and maintain it for a period of time after the last request then stop again? It's my only docker container that has a constant relatively-high CPU usage of 7-9%.

I do like how responsive the stream is and how little latency is added due to the conversion, so I wouldn't want it to come at the cost of losing those benefits, but perhaps it could ramp up when needed, maintain for 30m or so after the last request, then shut down until a new request comes in. Not sure how complicated that would be to implement but would save a lot of resources.

For context, I'm using this with OctoPrint, so I want it responsive while a print is going on (which is pretty rare) and idle otherwise.

epheterson avatar May 26 '22 18:05 epheterson

This project implements streaming only when requested, can yours do the same? Yours is much simpler to implement.

https://github.com/Roverr/rtsp-stream

epheterson avatar Jun 03 '22 08:06 epheterson