{"id":15707043,"url":"https://github.com/healeycodes/raspberry-pi-live-cam","last_synced_at":"2025-10-30T06:13:55.264Z","repository":{"id":53662335,"uuid":"176102631","full_name":"healeycodes/Raspberry-Pi-Live-Cam","owner":"healeycodes","description":"Build a live cam 📷 with your Raspberry Pi and Pi Camera! Powered by Flask ⚗️. Robust through laziness.","archived":false,"fork":false,"pushed_at":"2021-03-20T00:43:24.000Z","size":441,"stargazers_count":5,"open_issues_count":2,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-12T19:13:53.676Z","etag":null,"topics":["flask","python","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/healeycodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-17T13:08:45.000Z","updated_at":"2024-04-17T22:38:11.000Z","dependencies_parsed_at":"2022-09-14T00:00:48.759Z","dependency_job_id":null,"html_url":"https://github.com/healeycodes/Raspberry-Pi-Live-Cam","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/healeycodes%2FRaspberry-Pi-Live-Cam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2FRaspberry-Pi-Live-Cam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2FRaspberry-Pi-Live-Cam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2FRaspberry-Pi-Live-Cam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/healeycodes","download_url":"https://codeload.github.com/healeycodes/Raspberry-Pi-Live-Cam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253805843,"owners_count":21967053,"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":["flask","python","raspberry-pi"],"created_at":"2024-10-03T20:33:07.013Z","updated_at":"2025-10-30T06:13:55.171Z","avatar_url":"https://github.com/healeycodes.png","language":"Python","readme":"## Raspberry Pi Live Cam\n\n![My Pi!](https://github.com/healeycodes/Raspberry-Pi-Live-Cam/blob/master/my-pi-320.png)\n\nThis repository hosts all the files for my coding [tutorial](https://healeycodes.com/python/raspberrypi/beginners/webdev/2019/03/18/raspberry-pi-live-cam.html) on building a live cam with your Raspberry Pi.\n\n- Flask Web App: `app.py`\n- Raspberry Pi Script: `camera.py`\n\n\u003cbr\u003e\n\nThere's also a camera benching script `benchcamera.py` that was used during testing.\n\n- 7.5fps at 720p - JPEG 100 quality.\n\n\u003cbr\u003e\n\n#### Web App\n\nInstall dependencies `pip install -r requirements.txt`. Set the password for the image upload route `PASSWORD='123'`.\n\nTest the app locally with `FLASK_APP=app.py flask run`. See the Flask [docs](http://flask.pocoo.org/) for hosting on a web server.\n\n\u003cbr\u003e\n\n#### Raspberry Pi\n\nNo `requirements.txt` as it may depend on your distro - although, this should be bulletproof. Install dependencies `pip install picamera requests`. Edit the `url` variable in `camera.py` to your Flask app's address/port.\n\nThere are also some commented variables for adjusting resolution and capture rate (use `time.sleep` for highest accuracy).\n\nThe Raspberry Pi side of things works fine in testing with Python 2.7 but was written for Python 3.\n\nRun with `python camera.py`. \n\n\u003cbr\u003e\n\n#### Possible Improvements\n\nSome thoughts to improve the project but make it a worse tutorial.\n\n- Upload images via WebSocket (save bandwidth and latency).\n- Use a safe compare function for password checking to avoid timing attacks.\n- Serve images to clients over WebSocket as they arrive (same as above).\n- Use Flask for uploading images, serve images as a static file via HTTP server (scales infinitely).\n- When receiving images, scale them to different resolutions (e.g., `/live800x600.jpeg`).\n\n\u003cbr\u003e\n\n📷\n\n\u003cbr\u003e\n\n#### License\n\nStandard MIT.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhealeycodes%2Fraspberry-pi-live-cam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhealeycodes%2Fraspberry-pi-live-cam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhealeycodes%2Fraspberry-pi-live-cam/lists"}