monkeymademe / picamera2-WebUI

This is a WebUI for the Picamera2 Library for the Raspberry Pi
MIT License
141 stars 18 forks source link

Picamera2 WebUI

Overview

Picamera2 WebUI is a lightweight web interface for the Raspberry Pi camera module, built on the Picamera2 Python library and using Flask. This project provides a user interface to configure camera settings, capture photos, and manage images in a basic gallery.

Demo

Watch the Demo here

Features

Is this a finished project

I don't think there will be ever a point I could call this finished but at the moment there are features still in testing and missing so, no this is not a finished product.

What is Picamera2 Library

This project utilizes the Picamera2 Python library. Picamera2 is the libcamera-based replacement for Picamera which was a Python interface to the Raspberry Pi's legacy camera stack. For more information about Picamera2, visit Picamera2 GitHub Repository.

Author

Getting Started

Note: Please also see Compatibility below

Preinstalls / Dependencies

As of September 2024 the Bookworm version of Raspberry Pi OS (Desktop) has the required dependencies preinstalled, so you can skip to Installation below. If you are using the Lite version you will need to install the following:

Installation

  1. Update Raspberry Pi OS:
    sudo apt update && sudo apt upgrade -y
  2. Clone the repository to your Raspberry Pi:
    git clone https://github.com/monkeymademe/picamera2-WebUI.git
  3. Enter the directory:
    cd picamera2-WebUI
  4. Run the application and access the web interface through your browser.
    python app.py
  5. From your broswer, on a device connected to the same network, goto the following address: 'http://**Your IP**:8080/'

Running as a service

[Unit]
Description=Picamera2 WebUI Server
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/python /home/pi/picamera2-WebUI/app.py
Restart=always
[Install]
WantedBy=multi-user.target

Compatibilty

Please be aware that due to dependencies on newer versions of Picamera2 (see below) and Libcamera this project only works on Raspberry Pi OS Bookworm (or newer). Issues have been reported with older versions (e.g. Bullseye) not functioning due to libcamera no longer being updated on older versions of the Raspberry Pi OS. The recommendation, even on older Pi's, is to use Bookworm (or newer).

Please check Picamera installation Requirements. Your operating system may not be compatible with Picamera2.

There has been some reported issues with the PiCamera2 on older Raspberry Pi's: OSError: [Errno 12] Cannot allocate memory https://github.com/raspberrypi/picamera2/issues/972#issuecomment-1980573868

Tested on Raspberry Pi Camera Module v3 which has focus settings. v1 is untested but if you see any bugs please post an issue. v2 and HQ has been tested settings like Auto focus that are unique to Camera Module v3 are filtered and removed when an older camera is used.

Raspberry Pi Compatibilty:

Features currently in BETA

Known issues

Copyright and license

Code and documentation copyright 2024 the Picamera2 WebUI Authors. Code released under the MIT License. Docs released under Creative Commons.