{"id":17918492,"url":"https://github.com/natm/cctv-gif-buffer","last_synced_at":"2025-03-23T23:31:11.257Z","repository":{"id":53534623,"uuid":"79911271","full_name":"natm/cctv-gif-buffer","owner":"natm","description":"HTTP endpoint to create animated GIFs from CCTV IP cameras on demand","archived":false,"fork":false,"pushed_at":"2024-05-20T20:30:05.000Z","size":11881,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-17T04:07:41.573Z","etag":null,"topics":["cctv","home-automation","ipcamera","mqtt","rtsp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/natm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-24T12:52:41.000Z","updated_at":"2021-11-09T04:53:44.000Z","dependencies_parsed_at":"2022-08-20T13:20:16.444Z","dependency_job_id":null,"html_url":"https://github.com/natm/cctv-gif-buffer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natm%2Fcctv-gif-buffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natm%2Fcctv-gif-buffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natm%2Fcctv-gif-buffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natm%2Fcctv-gif-buffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natm","download_url":"https://codeload.github.com/natm/cctv-gif-buffer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245186610,"owners_count":20574551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cctv","home-automation","ipcamera","mqtt","rtsp"],"created_at":"2024-10-28T20:11:26.373Z","updated_at":"2025-03-23T23:31:10.318Z","avatar_url":"https://github.com/natm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CCTV GIF Buffer\n\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/natm/cctv-gif-buffer/master/LICENSE)\n[![Build Status](https://travis-ci.org/natm/cctv-gif-buffer.svg?branch=master)](https://travis-ci.org/natm/cctv-gif-buffer)\n[![Coverage Status](https://coveralls.io/repos/github/natm/cctv-gif-buffer/badge.svg?branch=master)](https://coveralls.io/github/natm/cctv-gif-buffer?branch=master)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/natm/cctv-gif-buffer/badges/quality-score.png)](https://scrutinizer-ci.com/g/natm/cctv-gif-buffer/)\n[![Docker build](https://img.shields.io/docker/automated/natmorris/cctv-gif-buffer.svg)](https://hub.docker.com/r/natmorris/cctv-gif-buffer/)\n\nPolls IP CCTV cameras every couple of seconds (configurable), stores the last 1 minute in an in-memory ring buffer per camera. Provides a simple HTTP endpoint to retrieve a GIF. This service is designed to be easily integrated with home automation systems.\n\nExample uses:\n\n* Send you a private message containing the last 20 seconds of motion when the door opens\n* Post a GIF to a private slack channel when the door bell is rang\n\n`GET /gif?camera=frontdoor\u0026duration=60\u0026interval=0.25`\n\n![Screenshot](https://raw.github.com/natm/cctv-gif-buffer/master/docs/demo1.gif)\n\n## Configuration\n\nCameras are listed in YAML configuration file. The poll interval is specified per camera, optionally HTTP basic authentication can be used.\n\n```yaml\ncameras:\n  frontdoor:\n    url: http://192.168.0.9/ISAPI/Streaming/channels/101/picture\n    interval: 2\n  backdoor:\n    url: http://192.168.0.10/jpg/1/image.jpg\n    interval: 2\n    auth: basic\n    username: admin\n    password: letmein\nserver:\n  web:\n    port: 8080\n    listen: 0.0.0.0\n```\n\nPer camera fields:\n\n  * `url`: URL to retrieve a JPEG from the camera from. (required)\n  * `interval`: Time in seconds between polls (required)\n  * `auth`: HTTP authentication type, only `basic` is supported (optional)\n  * `username`: HTTP basic authentication username\n  * `password`: HTTP basic authentication password\n\n## Usage\n\n`./buffer.py -c home.yaml`\n\n## Deployment\n\n### Quick and easy - Docker!\n\n```\ndocker pull natmorris/cctv-gif-buffer:latest\ndocker run -d --name cctvgifbuffer --rm -v /etc/cctvgifbuffer:/config -p 8080:8080 -t natmorris/cctv-gif-buffer\n```\n\n### Dependencies\n\nlibjpeg, install on Mac `brew install libjpeg`\n\n### Installation\n\n```\ngit@github.com:natm/cctv-gif-buffer.git\ncd cctv-gif-buffer\nvirtualenv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\n## License and Copyright\n\nCopyright 2017 Nat Morris nat@nuqe.net\n\nLicensed under the MIT License.\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatm%2Fcctv-gif-buffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatm%2Fcctv-gif-buffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatm%2Fcctv-gif-buffer/lists"}