Open ayufan opened 3 years ago
This would be a fantastic addition.. 👍🏼
I've created telegram bot for this) i'm using opencv for capturing frames from cams ( mjpeg\h264 streams supported). i could try to move my codebase into moonraker as another plugin if someone is interested in it)
Is there any progress in this direction? Is it possible to connect cameras via RTSP? And how are the cameras connected at the moment and which cameras are supported?
@Suhanovd since moonraker does not handle any camera related stuff (beside the timelapse component which is not yet in the master branch). It highly depends on the Os you installed moonraker on. As example MainsailOs uses mjpg_streamer which is the same as octopi uses, compatibility should be the same.
RTSP is a whole other story. Since Webbrowsers have no native support for rtsp which would need a special plugin embedded in the frontend (flash, activex, ....) or transcode the rtsp stream to something the brower accepts without any trickery. Problem with later is that it will introduce delay (big cpu overhead also). If your ipcam supports streaming to a html5
Btw. i would like to see something like a unified camera support controlled by moonraker, but afaik no body is working on it and i have other priorities.
Problem
I'm following for some time the klipper ecosystem and see a few missing features:
live555
,mjpgstreamer
, or anything else that can transform output into desired formToday:
Design
Camera configuration
Camera API
The frontend can request
/server/camera/list
that returns all available cameras with different access patterns as possible, so frontend can pick the most efficient one:h264
is available we should prefer to use mkv/mp4/ts container as this is least amount of data to transfer and can perform stream copymjpg
is available we provide a stream of jpg framesoctoprint_compact
can also benefit from the camera configuration of which a Cura can presentmjpg
streamSnapshot Design
An intent of this feature is to attach to
[history]
and provide a post print capture of a print that can be accessed via[history]
later:Timelapse Design
An intent of this feature is to create a timelapse and attach it to
[history]
. I guess quite similar to https://github.com/FrYakaTKoP/moonraker/blob/dev-timelapse/docs/configuration.md:Impact on History API
Each of the mentioned features extends History API with these informations. The only required change on frontend is to consume a
camera
key and show any of the requested data. Moonraker will happily serve that in a form where either<img>
(for snapshot) or<video>
(for timelapse) can be used.We don't truly need any other configuration for frontend.