Photobooth app written in Python supporting DSLR, picamera2, webcameras
Project description
Photobooth App
The photobooth app is written in Python 🐍 and coming along with a modern Vue frontend.
Features - Supported Cameras - Installation - Documentation
😍 Features
- 📹 camera live preview with shortest delay as possible, permanent video live view in background
- ⚡️ optimized for speed, live stream hardware accelerated on rpi, cpu load < 20%
- 🫶 several camera backends supported for high quality stills and livestream
- 💡 WLED support signaling photo countdown and feedback to the user when the photo is actually taken
- 🤝 Linux 🐧, Raspberry Pi 🍓 and Windows 🪟 platforms supported
📷 Supported Cameras
The photobooth app's Python backend allows to use different camera types on Linux and Windows platforms:
- Raspberry Pi Camera Module 1/2/3 (with or without autofocus)
- Arducam cameras (with or without autofocus)
- DSLR camera via
- gphoto2, Linux
- digicamcontrol, Windows (not yet implemented)
- webcams (via opencv2 or v4l)
The app controls camera's autofocus, handles led signaling when a photo is taken and streams live video to photobooth.
The booth is made from 3d printed parts, see the documentation ✍ over here. The camera support is mostly ready to use, the frontend is not production ready yet. Use photobooth project as frontend.
💅 Screenshots
🔧 Installation
Prerequisites
- Python 3.9 or later
- Camera, can be one or two (first camera for stills, second camera for live view)
- DSLR: gphoto2 on linx
- Picamera2: installed and working (test with
libcamera-hello
) - Webcamera: no additional prerequisites, ensure camera is working using native system apps
- Raspberry Pi Bullseye for Picamera2 or any other linux/windows system
- Turbojpeg (via apt on linux, manually install on windows)
- works probably best with 3d printed photobooth and parts listed in the BOM
The photobooth app can be used standalone but is not feature complete yet. Anyway, it integrates well with the fully blown photobooth project, see description below how to achieve integration.
Install via pip
On a fresh Raspberry Pi OS 64bit, run following commands:
sudo apt-get update
sudo apt-get upgrade # system should be up to date
# install some system dependencies
sudo apt-get -y install libturbojpeg0 python3-pip libgl1 python3-picamera2
# add user to input group for keyboard events
usermod --append --groups tty,input {USERNAME}
# install app
pip install photobooth-app
Start the app and browse to http://localhost:8000.
photobooth # photobooth should be available globally. if file is not found check PATH
Integrate Photobooth-Project and this Photobooth-App
Following commands have to be set in photobooth project to use this app as streamingserver. Replace http://photobooth by the actual hostname or localhost if on same server.
take_picture_cmd: curl -o "%s" localhost:8000/aquisition/still | echo Done
take_picture_msg: Done
pre_photo_cmd: curl http://photobooth:8000/aquisition/mode/capture
post_photo_cmd: curl http://photobooth:8000/aquisition/mode/preview
preview_url: url("http://photobooth:8000/aquisition/stream.mjpg")
background_defaults: url("http://photobooth:8000/aquisition/stream.mjpg")
📣 Changelog
see separate file: https://github.com/mgrl/photobooth-app/blob/main/LICENSE.md
©️ License
The software is licensed under the MIT license.
🎉 Donation
If you like my work and like to keep me motivated you can buy me a coconut water:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for photobooth_app-0.1.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d8761844e347d2df6cde84c4a10f6a2cc05d9990990d2c6966a5a7bec3730c3 |
|
MD5 | 152e4d3a163e11be26dcdf2f49eaf6f3 |
|
BLAKE2b-256 | 92e7dd38df7a4002424eedbc17bfead28f63a4a6f748c721f70bb8fdb8564a2e |