Skip to content

Platform for generating and controlling live streaming overlays for the AeroDesign competition. Vibe-coded, take care.

Notifications You must be signed in to change notification settings

rafaellehmkuhl/AeroDesign-Live-Streaming-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AeroDesign - Live Transmission Overlay System

A complete live broadcast overlay system designed for the brazilian AeroDesign competitions, allowing you to display dynamic information over your video stream in OBS.

๐ŸŽฏ Features

  • Real-time Overlays: Display team information, aircraft photos, flight results and more
  • Web-based Control Panel: Easy-to-use interface to control what appears on the stream
  • OBS Integration: Works seamlessly with OBS Browser Sources
  • Mock API: Pre-loaded with sample data for testing
  • Customizable: Show/hide different elements, add custom messages, etc
  • Responsive Design: Professional-looking overlays with smooth animations
  • Web Components: Modular, reusable components for easy team development

๐Ÿ“‹ What Gets Displayed

The overlay can show:

  • Team Information: Team name, university, aircraft photo
  • Current Battery: Which round (battery) the team is currently flying
  • Flight Results: Results from previous batteries with validation status and scores
  • Custom Messages: Display important announcements or messages

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Control Panel  โ”‚ โ† You control the overlay here
โ”‚  (Web Browser)  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Python Backend โ”‚ โ† FastAPI server with REST API
โ”‚   (Port 8000)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Overlay Page   โ”‚ โ† Add this as Browser Source in OBS
โ”‚  (Polls API)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Web Components Architecture

The project is built with native Web Components for better team collaboration:

  • Backend Developer: Works on backend/main.py (Python/FastAPI)
  • UI/UX Developer: Works on component styles and animations
  • Frontend Logic Developer: Works on component behavior and state management

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.11 or higher
  • UV package manager (or pip)
  • OBS Studio (for broadcasting)
  • A modern web browser

Installation

  1. Clone the repository:
git clone git@github.com:rafaellehmkuhl/AeroDesign-Live-Streaming-System.git
  1. Install dependencies:
./dev.sh install

Notice you need uv installed on your system, as it is used for package management on this repository.

Running the Application

  1. Start the backend server:
./dev.sh start

The server will start on http://localhost:8000

  1. Open the Control Panel:

Open your web browser and go to:

http://localhost:8000/control-panel/index.html

There you can show and hide the overlays, decide which team will appear in the screen, etc.

  1. Test the overlay in browser:

Before adding to OBS, you can see the overlay in any browser at:

http://localhost:8000/overlay/index.html

๐ŸŽฅ Setting Up in OBS

  1. Open OBS Studio

  2. Add a Browser Source:

    • Click the + button in the Sources panel
    • Select "Browser"
    • Name it "Aero Design Overlay"
  3. Configure the Browser Source:

    • URL: http://localhost:8000/overlay/index.html
    • Width: 1920
    • Height: 1080
    • โœ… Check "Shutdown source when not visible"
    • โœ… Check "Refresh browser when scene becomes active"
  4. Position the overlay:

    • The overlay is designed for 1920x1080 (Full HD)
    • It should cover your entire video canvas
    • Elements are positioned to not obstruct the center of the video
  5. Layer it over your camera:

    • Make sure the Browser Source is above your camera/video source in the layers

๐ŸŽฎ Using the Control Panel

Quick Controls

  • Show Overlay: Make the overlay visible on stream
  • Hide Overlay: Hide all overlay elements
  • Toggle Overlay: Switch visibility on/off

Selecting a Team

Click on any team card to:

  • Select that team
  • Automatically show their information on the overlay
  • Display their current battery and flight results

Overlay Settings

  • Show Team Info: Toggle the team information card
  • Show Flight Results: Toggle the flight results panel
  • Show Current Battery: Toggle the current battery badge
  • Custom Message: Add a custom message that appears at the top

Click "Apply Settings" after making changes.

๐Ÿ“ก API Endpoints

The backend provides a REST API that you can use programmatically:

Overlay Control

  • GET /api/overlay/state - Get current overlay state (polled by OBS)
  • PUT /api/overlay/state - Update overlay state
  • POST /api/overlay/show?team_id=<id> - Show overlay for specific team
  • POST /api/overlay/hide - Hide overlay
  • POST /api/overlay/toggle - Toggle overlay visibility

Team Management

  • GET /api/teams - Get all teams
  • GET /api/teams/{team_id} - Get specific team
  • POST /api/teams - Create new team
  • PUT /api/teams/{team_id} - Update team
  • DELETE /api/teams/{team_id} - Delete team

Flight Results

  • POST /api/teams/{team_id}/results - Add flight result
  • PUT /api/teams/{team_id}/battery - Update current battery

Example API Usage

# Show overlay with team
curl -X POST "http://localhost:8000/api/overlay/show?team_id=team001"

# Hide overlay
curl -X POST "http://localhost:8000/api/overlay/hide"

# Get all teams
curl "http://localhost:8000/api/teams"

# Add flight result
curl -X POST "http://localhost:8000/api/teams/team001/results" \
  -H "Content-Type: application/json" \
  -d '{"battery_number": 4, "status": "validated", "score": 9.5, "notes": "Excellent performance"}'

๐Ÿงช Mock Data

The system comes pre-loaded with some teams that participated in the 2025 competition. Each team has sample (fake) flight results you can use for testing.

๐Ÿ”ง Configuration

Changing the Poll Interval

In overlay/index.html, modify the POLL_INTERVAL constant:

const POLL_INTERVAL = 500; // milliseconds (default: 500ms)

Lower values = more responsive, higher CPU usage Higher values = less responsive, lower CPU usage

Changing the Port

In backend/main.py, modify the port in the if __name__ == "__main__": block:

uvicorn.run(app, host="0.0.0.0", port=8000)  # Change 8000 to your port

๐Ÿ“ Project Structure

aero-tv-transmission-overlayer/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ main.py              # FastAPI backend server
โ”‚   โ””โ”€โ”€ mock_data.json       # Team data
โ”œโ”€โ”€ shared/
โ”‚   โ””โ”€โ”€ components/
โ”‚       โ”œโ”€โ”€ base-component.js    # Base class for all components
โ”‚       โ””โ”€โ”€ api-service.js       # Centralized API communication
โ”œโ”€โ”€ overlay/
โ”‚   โ”œโ”€โ”€ index.html               # OBS browser source overlay
โ”‚   โ””โ”€โ”€ components/
โ”‚       โ”œโ”€โ”€ team-info-card.js    # Team info display component
โ”‚       โ”œโ”€โ”€ flight-results.js    # Flight results component
โ”‚       โ””โ”€โ”€ custom-message.js    # Custom message component
โ”œโ”€โ”€ control-panel/
โ”‚   โ”œโ”€โ”€ index.html               # Control panel interface
โ”‚   โ””โ”€โ”€ components/
โ”‚       โ”œโ”€โ”€ status-indicator.js  # Status display component
โ”‚       โ”œโ”€โ”€ team-card.js         # Team selection card component
โ”‚       โ”œโ”€โ”€ control-buttons.js   # Quick action buttons
โ”‚       โ””โ”€โ”€ notification-toast.js # Notification system
โ”œโ”€โ”€ pyproject.toml               # Python dependencies (UV)
โ””โ”€โ”€ README.md

๐Ÿ› Troubleshooting

Overlay not updating in OBS

  1. Make sure the backend is running
  2. Check the OBS browser source URL is correct
  3. Try refreshing the browser source (right-click โ†’ Properties โ†’ Refresh cache of current page)

CORS Errors

The backend has CORS enabled for all origins in development. If you need to restrict it, modify the CORSMiddleware configuration in backend/main.py.

Port Already in Use

If port 8000 is already in use:

  1. Change the port in backend/main.py
  2. Update the API_URL in overlay/index.html
  3. Update the API_BASE in control-panel/index.html

๐Ÿค Contributing

Feel free to customize and extend this system for your competition needs!

๐Ÿ“„ License

This project is open source and available for use in your competitions.

๐ŸŽ“ Credits

Built for the Aero Design competition with โค๏ธ


Need help? Check the API documentation at http://localhost:8000/docs (FastAPI automatic docs)

About

Platform for generating and controlling live streaming overlays for the AeroDesign competition. Vibe-coded, take care.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published