Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.
Andreas Blaesius edited this page Apr 3, 2021 · 76 revisions

FAQ - Frequently asked questions

Is my Camera supported?

Some DSLR and Compact Cameras are not supported by this project. Please check for your specific model here.


Is Pi Camera supported?

Yes it is.

Enable camera support using the raspi-config program you will have used when you first set up your Raspberry Pi.

sudo raspi-config

Use the cursor keys to select and open Interfacing Options, and then select Camera and follow the prompt to enable the camera.

Now you need to allow the webserver to use raspistill. You need add the webserver user to video group and reboot once:

sudo gpasswd -a www-data video
reboot

Once done you need to adjust the configuration. Open the admin panel in your browser localhost/admin and make the following changes:

"Take picture command":
raspistill -n -o %s -q 100 -t 1 | echo Done

"Success message for take picture":
Done

Pi Camera works with these config changes (also works together with preview at countdown if enabled). Raspistill does not give any feedback after the picture was taken, workaround for that with "echo". (Thanks to Andreas Maier for that information)

You've the possibility to add more parameters if needed (define ISO, exposure, white balance etc.). Type raspistill -? in your terminal to get information about possible parameters / settings.


I've found a bug, how can I report?

Please take a look at the issue page here , if your bug isn't mentioned already you can create a new issue. Please give informations detailed as possible to reproduce and analyse the problem.


I've a white page after updating to latest Source, how can I solve this?

On v1.9.0 and older: It could be your local config.json file doesn't match latest source. This file is generated if you've used the admin panel to change your config. Remove the file and try again! sudo rm /var/www/html/admin/config.json


How do I change the configuration?

Open http://localhost/admin in your Webbrowser and change the configuration for your personal needs. Changed options are stored inside config/my.config.inc.php to prevent sharing personal data on Github by accident and to make an update of Photobooth easier.


How to change the language?

Open http://localhost/admin in your Webbrowser and change the configuration for your personal needs.


How to change the look of my Photobooth?

Photobooth can be easylie styled for your personal needs via admin panel, open localhost/admin in your browser and take a look at the User Interface options.
To use a private custom index you need to create the following files:

  • resources/css/custom_style.css
    • Optional: src/sass/custom_style.scss (yarn build will create the resources/css/custom_style.css out of it)
  • resources/css/custom_chromakeying.css
    • Optional: src/sass/custom_chromakeying.scss (yarn build will create the resources/css/custom_chromakeying.css out of it)
  • resources/css/custom_live_chromakeying
    • Optional: src/sass/custom_live_chromakeying.scss (yarn build will create the resources/css/custom_live_chromakeying.css out of it)
  • template/custom.template.php

At least one of these custom style files need to exist! If other custom style files are missing a copy of the modern style file will be used.
Once you've created needed files you will be able to use the selection custom from the "Styling" option.

Please note: the custom style and template will not be tracked by git to avoid sharing by accident!

If you have e.g. private backgrounds (maybe files without a usable license) you can create a folder called private inside the root of your Photbooth source. This folder (and subfolders) will not be tracked by git to avoid sharing by accident!


How to keep pictures on my Camera using gphoto2?

Add --keep (or --keep-raw to keep only the raw version on camera) option for gphoto2 via admin panel:

gphoto2 --capture-image-and-download --keep --filename=%s

On some cameras you also need to define the capturetarget because Internal RAM is used to store captured picture. To do this use --set-config capturetarget=X option for gphoto2 (replace "X" with the target of your choice):

gphoto2 --set-config capturetarget=1 --capture-image-and-download --keep --filename=%s

To know which capturetarget needs to be defined you need to run:

gphoto2 --get-config capturetarget

Example:

pi@raspberrypi:~ $ gphoto2 --get-config capturetarget
Label: Capture Target
Readonly: 0
Type: RADIO
Current: Internal RAM
Choice: 0 Internal RAM
Choice: 1 Memory card

Cromakeying is saving without finishing saving

Checking the browser console you'll see a 413 Request Entity Too Large error. To fix that you'll have to update your nginx.conf

Follow the steps mentioned here: How to Fix NGINX 413 Request Entity Too Large Error


Can I use Hardware Button on my Raspberry Pi, to take a Picture ?

Yes, the Hardware Button feature enables to control Photobooth through hardware buttons connected to Raspberry GPIO pins . This works for directly connected screens and as well for WLAN connected screen (i.e. iPad). Configuration takes place in the admin settings - Hardware Button section.

The Hardware Button functionality supports two separate modes of operation (select via admin panel):

  • Button Mode: Distinct hardware buttons can be connected to distinct GPIOs. Each button will trigger a separate functionality (i.e. take photo).
  • Rotary Mode: A rotary encoder connected to GPIOs will drive the input on the screen. This enables to use the rotary to scroll through the Photobooth UI buttons, and click to select actions. Modes can not be combined.

In any mode, Photobooth will watch GPIOs for a PIN_DOWN event - so the hardware button needs to pull the GPIO to ground, for to trigger. This requires the GPIOs to be configured in PULLUP mode - always.

Troubleshooting / Debugging:

  • Important: For WLAN connected screens you must make sure to set the IP address of the Photobooth web server in the admin settings - section "General". The loopback IP (127.0.0.1) does not work, it has to be the exact IP address of the Photobooth web server, to which the remote display connects to.
  • Switch Photobooth to DEV mode. (admin screen -> expert view -> general section)
  • Reload the Photobooth homepage
  • Check the browser developer console for error logs
  • Check the server logs for errors (file data/tmp/remotebuzzer_server.log).
  • If there is no errors logged but hardware buttons still do not trigger
  • GPIO interrupts might be disabled. Check file /boot/config.txt and remove / disable the following overlay dtoverlay=gpio-no-irq to enable interrupts for GPIOs.
  • GPIOs may not be configured as PULLUP. The configuration for this is done in fie /boot/config.txt by adding the GPIO numbers in use as follows - you must reboot the Raspberry Pi in order to activate changes in this setting.
         gpio=16,20,21,26=pu
  • For the Shutdown button to work, www-data needs to have the necessary sudo permissions. This is done by the install-raspian.sh script or can be manually added as
     cat >> /etc/sudoers.d/020_www-data-shutdown << EOF
     www-data ALL=(ALL) NOPASSWD: /sbin/shutdown
     EOF

As of Photobooth v3, hardware button support is fully integrated into Photobooth. Therefore the button.py script has been removed from the distribution. In case you are using this script and for continued backward compatibility please do not activate the Remote Buzzer Hardware Button feature in the admin GUI. Please note that continued backward compatibility is not guaranteed and in case of issues please switch to the integrated functionality.


Button Mode


The server supports up to three connected hardware buttons for the following functionalities:

  1. Picture Button
  • Defaults to GPIO21
  • Short button press (default <= 2 sec) will trigger a single picture in Photobooth
  • Long button press (default > 2 sec) will trigger a collage in Photobooth

Note:

  • If collage is configured with interruption, next button presses will trigger the next collage pictures.
  • If collage is disabled in the admin settings, long button press also triggers a single picture
  • If the collage button is activated (see next), the picture button will never trigger a collage, regardless
  1. Collage Button
  • Defaults to GPIO20
  • Button press will trigger a collage in Photobooth.

Note:

  • If collage is configured with interruption, next button presses will trigger the next collage pictures.
  • If collage is disabled in the admin settings (Collage section), this button will do nothing.
  1. Shutdown Button
  • Defaults to GPIO16
  • This button will initate a safe system shutdown and halt (shutdown -h now).

Note:

  • Hold the button for a defined time to initiate the shut down (defaults to 5 seconds). This can be adjusted in the admin settings.
  • The shutdown button will only trigger if there is currently no action in progress in Photobooth (picture, collage).

After any button is triggered, all hardware button remain disabled until the action (picture / collage) completed. Once completed, the hardware buttons re-arms / are active again.


Rotary Mode


In rotary mode a rotary encoder (i.e. KY-040) is connected to the GPIOs. Turning the rotary left / right will navigate through the currently visible set of buttons on the screen. Button press on the rotary will activate the currently highlighted button in Photobooth.

The wiring layout is

Button                          Rotary Encoder
Mode           Raspberry        Mode

Picture  ---   GPIO 21    ---   DT
Collage  ---   GPIO 20    ---   CLK
Shutdown ---   GPIO 16    ---   SW
                3V3       ---   +
                GND       ---   GND

Known limitations:

  • Delete Picture: in order to be able to access the Delete button through rotary control, please activate admin setting General -> "Delete images without confirm request"

The following elements are currently not supported and not accessible through rotary control navigation

  • Full Screen Mode button: Looks like modern browser only allow to change to full screen mode upon user gesture. It seems not possible to change to full-screen using Javascript.
  • Photoswipe download button: Not needed for Rotary Control. (well, if you can come up with a decent use-case, let us know).

Other Remote Trigger (experimental)


The trigger server controls and coordinates sending commands via socket.io to the photobooth client. Next to a hardware button, any socket.io client can connect to the trigger server over the network, and send a trigger command. This gives full flexibility to integrate other backend systems for trigger signals.

  • Channel: photobooth-socket
  • Commands: start-picture, start-collage
  • Response: completed will be emitted to the client, once photobooth finished the task

This functionality is experimental and largely untested. Not sure if there is a use-case but if you have one, happy to learn about it. Currently this does not support rotary encoder use but could be if needed.


How do I enable Kiosk Mode to automatically start Photobooth in full screen?

Edit the LXDE Autostart Script:

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

and add the following lines:

@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --incognito --kiosk http://localhost/

NOTE: If you're using QR-Code replace http://localhost/ with your local IP-Adress (e.g. http://192.168.4.1), else QR-Code does not work.


Enable touch events

If touch is not working on your Raspberry Pi edit the LXDE Autostart Script again

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

and add --touch-events=enabled for Chromium:

@chromium-browser --incognito --kiosk http://localhost/ --touch-events=enabled

How to hide the Mouse Cursor?

There are two options to hide the cursor. The first approach allows you to show the cursor for a short period of time (helpful if you use a mouse and just want to hide the cursor of some time of inactivity), or to hide it permanently.

Solution A To hide the Mouse Cursor we'll use "unclutter":

sudo apt-get install unclutter

Edit the LXDE Autostart Script again:

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

and add the following line (0 describes the time after which the cursor should be hidden):

@unclutter -idle 0

Solution B If you are using LightDM as display manager, you can edit /etc/lightdm/lightdm.conf to hide the cursor permanently. Just add xserver-command=X -nocursor to the end of the file.


How to disable the blank screen on Raspberry Pi (Raspbian)?

You can follow the instructions here to disable the blank screen.


How to use a live stream as background at countdown?

There's different ways depending on your needs and personal setup:

  1. If you access Photobooth on your Raspberry Pi you could use a Raspberry Pi Camera. Raspberry Pi Camera will be detected as "device cam".

    • Admin panel config "Preview mode": from device cam

    Note:

  2. If you like to have the same preview independent of the device you access Photobooth from:
    Make sure to have a stream available you can use (e.g. from your Webcam, Smartphone Camera or Raspberry Pi Camera)

    • Admin panel config "Preview mode": from URL
    • Admin panel config "Preview-URL" example (add needed IP address instead): url(http://127.0.0.1:8081)

    Note

    • Do NOT enable "Device cam takes picture" in admin panel config!
    • Capture pictures via raspistill won't work if motion is installed!
    • Requires Photobooth v2.2.1 or later!
  3. A preview can also be done using the video mode of your DSLR (Linux only), but only works if you access Photobooth via http://localhost or http://127.0.0.1:

    • install all dependencies sudo apt install ffmpeg v4l2loopback-dkms -y
    • create a virtual webcam modprobe v4l2loopback exclusive_caps=1 card_label="GPhoto2 Webcam"
      • /dev/video0 is used by default, you can use v4l2-ctl --list-devices to check which /dev/* is the correct one:
        If it doesn't match the default setup you need to adjust the Command to generate a live preview inside the admin panel!
    • Give permissions to /dev/video* sudo gpasswd -a www-data video (this was done automatically if you used the installation script) and reboot once
    • Admin panel config "Preview mode": from gphoto2

    Note

    • Requires Photobooth v2.11.0 or later!
    • You need to access Photobooth directly via http://localhost or http://127.0.0.1
    • There's a delay of about 3 seconds until the preview starts, to avoid that disable the Battery saving mode on gphoto2 live preview option to generate a preview in background. This results in a high battery usage and also a general slowdown.
    • Sometimes Chromium doesn't detect the V4l2 camera launch from php: you need to run sudo gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0 from terminal first and load Chromium a first time with a webpage asking for the camera.
    • Chromium sometimes has trouble, if there is another webcam like bcm2835-isp, it will take it by default instead. Disable other webcams, e.g. rmmod bcm2835-isp.
    • To ensure that the configuration works after reboot add the following lines to /etc/rc.local (You have to add these lines bevor exit 0):
      • modprobe v4l2loopback exclusive_caps=1 card_label="GPhoto2 Webcam"
      • rmmod bcm2835-isp
    • Make sure the countdown is long enough to start the preview and free gphoto2 at the end of the countdown to be able to take a picture (2 seconds before the countdown ends).
      • For best user experience the countdown should be set at least to 8 seconds.

Can I use a live stream as background?

Yes you can. There's different ways depending on your needs and personal setup:

  1. On Photobooth v2.4.0 and newer you can use the option "Use stream from device cam as background" inside admin panel.

    • If enabled, a stream from your device cam is used as background on start screen. It's still possible to use preview from your device cam as background on countdown and also still possible to take pictures via device cam or using raspistill for Pi Camera.
  2. You need to change the background URL path via config or admin panel. Replace url(../img/bg.jpg) with your IP-Adress and port (if needed) as URL. Example:

    -   url(../img/bg.jpg)
    +   url(http://127.0.0.1:8081)
    

    To use a Raspberry Pi Camera module Motion is required, but you won't be able to use the Raspberry Pi Camera for preview at countdown!

    sudo apt-get install -y motion
    

    /etc/motion/motion.conf needs to be changed to your needs (e.g. starting on boot, using videoX, resolution etc.). If you're accessing Photobooth from an external device (e.g. Tablet or Mobile Phone) replace 127.0.0.1 with your IP-Adress.

    For reference: https://github.com/andreknieriem/photobooth/pull/20


I've trouble setting up E-Mail config. How do I solve my problem?

If connection fails some help can be found here, especially gmail needs some special config.

  • Should be obvious but the photobooth must be connected to WIFI/internet to send photos live.

    Otherwise, tell them to check the box to send them the photo later and it will add everyone's email to a list for you.

  • For gmail you need to generate an app password if you have 2-factor authentication on.

Tested working setup:

  • gmail.com

    • Email host adress: smtp.gmail.com
    • Username: *****@gmail.com
    • Port: 587
    • Security: TLS
  • gmx.de

    • Email host adress: mail.gmx.net
    • Username: *****@gmx.de
    • Port: 587
    • Security: TLS
  • web.de

    • Email host adress: smtp.web.de
    • Username: ***** (@web.de is not needed in your username)
    • Port: 587
    • Security: TLS

How to only open the gallery to avoid people taking pictures?

Open http://localhost/gallery.php in your browser (you can replace localhost with your IP adress).


Chromakeying isn't working if I access the Photobooth page on my Raspberry Pi, but it works if I access Photobooth from an external device (e.g. mobile phone or tablet). How can I solve the problem?

Open chrome://flags in your browser. Look for "Accelerated 2D canvas" and change it to "disabled". Now restart your Chromium browser.


How to update or add translations?

On v2.3.0 and newer:
Photobooth joined Crowdin as localization manager, join here to translate Photobooth.
Crowdin gives a nice webinterface to make translating easy as possible. If there's different translations for a string, translator can use the vote function on suggested translations.
With Crowdin and your help translating we're able to get high-quality translations for all supported languages. Also it's easy to support a wider range of languages!
Your language is missing? Don't worry, create a localization request here and we'll add it to the project.

On v2.2.0 and older:
Edit the language file inside resources/lang/ with your favorite text editor.
Once you're done upload your changes and create a pull request.


How to ajust the php.ini file?

Open http://localhost/phpinfo.php in your browser. Take a look for "Loaded Configuration File", you need sudo rights to edit the file. Page will look like this:

CLICK ME

Turn Photobooth into a WIFI hotspot

If you would like to allow your guests to download their images without connecting to your private WIFI or when there is no other WIFI around, you can turn your Raspberry Pi into setup an access point and WiFi client/station network on the single WiFi chip of the Raspberry Pi.

The default setting is to call your wifi hotspot Photobooth as this is built into the Photobooth prompt for guests to download images via QR code.

First head over to the hotspot directory to run the installer:

cd /var/www/html/vendor/rpihotspot

There are a couple of flags you need to change from the example command below:

  • change password to your desired password, make it easy enough for guests to remember.
  • change country code from CA to your own localization.
  • keep or change the ip address 10.10.10.10. Remember what you change it to.
sudo ./setup-network.sh --install-upgrade --ap-ssid="Photobooth" --ap-password="password" --ap-password-encrypt
--ap-country-code="CA" --ap-ip-address="10.10.10.10" --wifi-interface="wlan0"

If you run into any errors setting up your hotspot we can remove all the settings and try it again. The first time I ran this I ran into an error, I reset it using the command below, then reinstalled it. It went smoothly the second time:

sudo ./setup-network.sh --clean

Automatic picture syncing to USB stick

This feature will automatically and in regular intervals copy (sync) new pictures to a plugged-in USB stick. Currently works on Raspberry PI OS only.

Use the install-raspbian.sh script to get the operating system setup in place. The target USB device is selected through the admin panel

A USB drive / stick can be identified either by the USB stick label (e.g. photobooth), the operating system specific USB device name (e.g. /dev/sda1) or the USB device system subsystem name (e.g. sda). The preferred method would be the USB stick label (for use of a single USB stick) or the very specific USB device name, for different USB stick use. The default config will look for a drive with the label photobooth. The script only supports one single USB stick connected at a time

Pictures will be synced to the USB stick matched by the pattern, as long as it is mounted (aka USB stick is plugged in)

Debugging: switch on dev settings for server logs to be written to the data/tmp directory of the photobooth installation (i.e. data/tmp/synctodrive_server.log).

Clone this wiki locally