8000 GitHub - scottallan/photoboothweb: A simple customizable photo booth with a web interface using droidcam on android
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

scottallan/photoboothweb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Simple Photo Booth Web App

A simple, customizable web-based photo booth application built with Flask and OpenCV. Perfect for parties, events, weddings, or any occasion where you want to capture fun memories!

Features

  • Multi-Photo Sessions: Takes 3 photos per session with a clear countdown
  • DroidCam Integration: Uses Android phone as wireless camera via DroidCam
  • Email Integration: Automatically emails photos to users
  • Photo Gallery: Browse all captured photos in a slideshow format
  • Fullscreen Slideshow: Auto-playing slideshow with keyboard controls
  • Easy Customization: Simple configuration file for personalizing text, colors, and images
  • Photo Archiving: All photos are automatically organized by session
  • Responsive Design: Works on desktop, tablet, and mobile devices

Quick Start

  1. Install Dependencies:

    pip install -r requirements.txt
  2. Set up Gmail for email features (optional):

    export GMAIL_USER="your_email@gmail.com"
    export GMAIL_PASS="your_app_password"

    Get an app password from: https://myaccount.google.com/apppasswords

  3. Run the Application:

    python app.py
  4. Open in Browser: Navigate to http://localhost:5000

Camera Setup (DroidCam Required)

This photo booth application requires an Android phone with DroidCam to function as the camera source.

Prerequisites

  • Android phone with the DroidCam app installed
  • Computer with DroidCam client application installed and running
  • Both devices connected to the same network (Wi-Fi) or via USB

Setup Steps

  1. Install DroidCam on Android:

    • Download "DroidCam" from Google Play Store
    • Open the app and note the IP address and port shown
  2. Install DroidCam Client on Computer:

    • Windows/Mac: Download from DroidCam website
    • Linux: Install via package manager or download from website
    # Ubuntu/Debian example
    sudo apt install droidcam
  3. Connect DroidCam:

    • Open DroidCam client on your computer
    • Enter the IP address and port from your Android phone
    • Click "Connect" - you should see the phone's camera feed
    • Important: Keep DroidCam client running while using the photo booth
  4. Verify Camera Access:

    • The photo booth will automatically detect the DroidCam virtual camera
    • If you have multiple cameras, it will use the first available one
    • Position your Android phone to get the best angle for photos

Troubleshooting Camera Issues

  • Ensure both devices are on the same Wi-Fi network
  • Check that DroidCam client is connected and showing video feed
  • Restart DroidCam client if the connection is lost
  • Make sure no other applications are using the camera

Customization Guide

Basic Customization (config.json)

The easiest way to customize your photo booth is by editing the config.json file:

{
  "event": {
    "title": "Photo Booth",
    "subtitle": "Capture Your Memories!",
    "welcome_message": "Take some fun photos to remember this special moment!",
    "button_text": "Take Photos! πŸ“Έ",
    "slideshow_text": "View Photo Gallery 🎬",
    "email_subject": "Your Photo Booth Pictures!",
    "email_message": "Thanks for using our photo booth! Here are your awesome pictures to remember this special moment! πŸ“Έβœ¨"
  },
  "styling": {
    "primary_color": "#2196F3",
    "background_color": "#f5f5f5",
    "confetti_emojis": "πŸ“Έ πŸŽ‰ ✨ 🎊 🎈 πŸ“·"
  },
  "images": {
    "main_image": "default_photo_booth.jpg",
    "main_image_alt": "Photo Booth"
  }
}

Customization Options

Text Customization

  • title: Main heading shown on the home page
  • subtitle: Secondary text under the title
  • welcome_message: Instructions/welcome text for users
  • button_text: Text on the main action button
  • email_subject: Subject line for emailed photos
  • email_message: Message body for emailed photos

Visual Customization

  • primary_color: Main theme color (hex code)
  • background_color: Page background color (hex code)
  • confetti_emojis: Decorative emojis displayed on pages

Image Customization

  • main_image: Filename of the main display image (must be in static/images/)
  • main_image_alt: Alt text for the main image

Advanced Customization

Adding Your Own Images

  1. Main Display Image:

    • Add your custom image to static/images/
    • Update config.json to reference your image:
      "images": {
        "main_image": "your_custom_image.jpg",
        "main_image_alt": "Your Custom Description"
      }
  2. Creating Custom Images:

    • Recommended size: 400x300 pixels
    • Supported formats: JPG, PNG, GIF
    • Use the provided create_default_image.py as a template for generating placeholder images

Color Themes

Here are some pre-made color combinations you can use:

Wedding Theme:

"primary_color": "#d4af37",
"background_color": "#fefefe",
"confetti_emojis": "πŸ’’ πŸ’ πŸ’ ✨ πŸŽ‰ πŸ’•"

Birthday Theme:

"primary_color": "#ff6b6b",
"background_color": "#fff0f5",
"confetti_emojis": "πŸŽ‚ 🎈 πŸŽ‰ 🎁 🎊 πŸ₯³"

Corporate Event:

"primary_color": "#2c3e50",
"background_color": "#ecf0f1",
"confetti_emojis": "πŸ“Έ ✨ 🎯 πŸ“Š πŸŽͺ 🎭"

Template Customization

For more advanced customization, you can edit the HTML templates in the templates/ directory:

  • index.html: Home page layout
  • show_photos.html: Photo display page
  • slideshow.html: Gallery view
  • fullscreen_slideshow.html: Fullscreen slideshow

CSS Styling

The main stylesheet is static/party.css. You can add custom CSS rules here or modify existing ones.

Directory Structure

photo-booth/
β”œβ”€β”€ app.py                 # Main Flask application
β”œβ”€β”€ config.json           # Configuration file
β”œβ”€β”€ requirements.txt      # Python dependencies
β”œβ”€β”€ README.md            # This file
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ images/          # Display images
β”‚   β”œβ”€β”€ photos/          # Current session photos
β”‚   β”œβ”€β”€ party_archive/   # Archived photos by session
β”‚   └── party.css        # Stylesheet
└── templates/           # HTML templates
    β”œβ”€β”€ index.html
    β”œβ”€β”€ show_photos.html
    β”œβ”€β”€ slideshow.html
    └── fullscreen_slideshow.html

Configuration Examples

Wedding Photo Booth

{
  "event": {
    "title": "Sarah & Mike's Wedding",
    "subtitle": "Capture Our Special Day!",
    "welcome_message": "Help us celebrate by taking some fun wedding photos!",
    "button_text": "Take Wedding Photos! πŸ’’",
    "slideshow_text": "View Wedding Gallery πŸ’•",
    "email_subject": "Photos from Sarah & Mike's Wedding!",
    "email_message": "Thank you for celebrating with us! Here are your wonderful photos from our special day! πŸ’’πŸ’•"
  },
  "styling": {
    "primary_color": "#d4af37",
    "background_color": "#fefefe",
    "confetti_emojis": "πŸ’’ πŸ’ πŸ’ ✨ πŸŽ‰ πŸ’•"
  }
}

Corporate Event

{
  "event": {
    "title": "Company Annual Meeting",
    "subtitle": "Capture the Moment!",
    "welcome_message": "Take professional photos to remember this event!",
    "button_text": "Take Photos! πŸ“Έ",
    "slideshow_text": "View Event Gallery 🎬",
    "email_subject": "Your Photos from the Company Event",
    "email_message": "Thanks for attending our company event! Here are your photos from today."
  },
  "styling": {
    "primary_color": "#2c3e50",
    "background_color": "#ecf0f1",
    "confetti_emojis": "πŸ“Έ ✨ 🎯 πŸ“Š πŸŽͺ 🎭"
  }
}

Troubleshooting

Camera Issues

  • Ensure your camera is connected and not being used by other applications
  • Try different camera indices in the code (0, 1, 2) if the default doesn't work
  • On Linux, you may need to add your user to the video group

Email Issues

  • Make sure you're using an "App Password" from Google, not your regular password
  • Enable 2-factor authentication on your Google account first
  • Check that the environment variables are set correctly

Performance Issues

  • The slideshow limits to 200 photos maximum for performance
  • Large images are automatically resized during capture
  • Consider clearing old archived photos periodically

Technical Requirements

  • Python 3.7+
  • Android phone with DroidCam app installed
  • Computer with DroidCam client application
  • Modern web browser
  • Linux/Mac/Windows support

Dependencies

  • Flask: Web framework
  • OpenCV: Camera and image processing
  • NumPy: Image array operations
  • PyAutoGUI: Screen interaction (for preview window)
  • DroidCam: Android app + computer client for camera functionality

License

This project is open source. Feel free to modify and distribute according to your needs.

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.

About

A simple customizable photo booth with a web interface using droidcam on android

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0