eastein / lidless

A great Eye, lidless, wreathed in webcams.
Other
19 stars 4 forks source link

!snapshot #35

Open eric-zenfire opened 12 years ago

eric-zenfire commented 12 years ago

Purpose

Take and temporarily store snapshot images of camera feeds. Return a URL that works for n minutes, prefixed with url from config (to work with frontend external proxies, etc). It must be an optional feature disabled by default. Snapshots previously taken should still be cleaned up if the feature is disabled... and serving images not just taking them must obey the current config.

Perhaps, configuration must enable and disable this feature per-camera? Also, per-irc? Not sure. Should there be a throttle for max snapshots per time period, and if so should it be independent per camera?

Storage

Not sure. Perhaps a directory in the config to store images in temporarily. In memory, perhaps - wouldn't survive restarts, though.

Usage

!snapshot <cameraname>

If cameraname is not supplied and there is only one camera, use that camera. If cameraname is not supplied and there is more than one camera enabled for the feature, offer a list of available cameras. If camera does not exist, return relevant error. If camera exists but does not permit snapshots, return relevant error.

eastein commented 12 years ago

Partial work in f53fa7e.

eastein commented 12 years ago

Needs ZMQ url on web. Needs ZMQ url maybe on cameras? Needs a better way to configure the base url.

codersquid commented 10 years ago

GET /api/cameraname/snapshot/ could show the most recent picture. (maybe /apiv1/)

codersquid commented 10 years ago

storage - local files since the demand is probably very small and then rotate files every now and then -- either wipe them out or archive them somwhere? s3 or something like that for long term and it would be cool to have all the stills because someone could have fun making things out of them.