Skip to content

miaucl/photobooth

Repository files navigation

photobooth

Disclaimer:

The original README.md with credits to @reuterbal for the original development of this software and to @andyboeh, @tammtimmer, @t0mmo for additional features. As of 2022-07-31, there has not been any changes since 3 years and I therefore regard it as abandoned.

A flexible Photobooth software.

It supports many different camera models, the appearance can be adapted to your likings, and it runs on many different hardware setups.

Description

This is a Python application to build your own photobooth.

Features

  • Capture a single or multiple pictures and assemble them in an m-by-n grid layout
  • Live preview during countdown
  • Slideshow during idle time
  • Store assembled pictures (and optionally the individual shots)
  • Printing of captured pictures (via Qt printing module or pycups)
  • Gallery to print pictures again
  • Highly customizable via settings menu inside the graphical user interface
  • Custom background, foreground and watermark for assembled pictures
  • Flask web server to access the gallery from external devices
  • Ability to skip single pictures in the m-by-n grid (e.g., to include a logo in the background image)
  • Support for external buttons and lamps via GPIO interface
  • Rudimentary WebDAV upload functionality (saves pictures to WebDAV storage) and mailer feature (mails pictures to a fixed email address)
  • Theming support using Qt stylesheets

Fancy Templates

Credits to @tammtimmer.

The templates are defined in XML. The XML file describes size&color of the background. On top each XML tag adds an element on top of the others:

  • Image can be PNG (incl transparency if required) or JPG etc and should be the same size like defined in the background. Can be used for a picture background or final overlay on top of photos.
  • Photo refers to a shot taken by the camera. Positioning, resizing, rotation are supported currently. Make sure shots are numbered correctly!

Currently, three examples are provided:

  • standard_2x2.xml mimics the current behaviour of composing 2x2 photos on a white back. Example for standard 2x2 template
  • example.xml is a showcase for current capabilities (sorry for my limited design skills). Curious to see what others come up with! Example for example template
  • photostrips.xml is another showcase for what's possible Example for photostrips template

To test & develop further templates the templating can be called directly from the CLI:

python -m photobooth.template.FancyTemplate -t .\supplementals\templates\example.xml

-h provides a short help

Slideshow

Credits to @tammtimmer.

The slideshow presents images already taken in a random order after a set idle time.

Technical specifications

Installation and usage

A selection of working builds are documented in this repo. Use the one closest to your setting and start from there. The rest is up to you ;)

Hardware requirements

  • Some computer/SoC that is able to run Python 3.5+ as well as any of the supported camera libraries
  • Camera supported by gPhoto 2 (see compatibility list), OpenCV (e.g., most standard webcams), or a Raspberry Pi Camera Module (1,2,3,HD).
  • Optional: External buttons and lamps (in combination with gpiozero-compatible hardware)

Configuration and modifications

Default settings are stored in photobooth/defaults.cfg and can either be changed in the graphical user interface or by creating a file ./photobooth.cfg in the top folder and overwriting your settings there.

The software design is very modular. Feel free to add new postprocessing components, a GUI based on some other library, etc.

Translations

Have a look at LOCALE.

Feedback and bugs

I appreciate any feedback or bug reports. Please submit them via the Issue tracker and always include your photobooth.log file (is created automatically in the top folder) and a description of your hardware and software setup.

I am also happy to hear any success stories! Feel free to submit them here.

License

I provide this code under AGPL v3. See LICENSE.