Skip to content

Bhargavi-hash/LUMOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LUMOS

Latency-optimized Universal Multimodal Output Studio

🎬 AI-Powered Viral Video Clip Generator for Content Creators

Overview

LUMOS is an intelligent video processing application that helps content creators automatically identify and extract viral-worthy moments from long-form videos. Using Google's Gemini AI, it analyzes videos and generates optimized clips for different social media platforms (YouTube Shorts, Instagram Reels, and TikTok) along with platform-specific captions.

Features

  • πŸ€– AI-Powered Analysis: Uses Gemini AI to analyze videos and identify viral moments
  • πŸ“± Multi-Platform Support: Generates clips optimized for YouTube Shorts, Instagram Reels, and TikTok
  • βœ‚οΈ Automated Clipping: Automatically cuts video segments based on AI recommendations
  • πŸ“ Caption Generation: Creates engaging, platform-specific captions using AI
  • 🎯 Audience Targeting: Considers platform-specific audience preferences
  • 🌐 Web Interface: User-friendly web application for easy video upload and clip preview

Installation

Prerequisites

  • Python 3.8 or higher
  • FFmpeg (for video processing)
  • Google Gemini API key

Install FFmpeg

Ubuntu/Debian:

sudo apt-get update
sudo apt-get install ffmpeg

macOS:

brew install ffmpeg

Windows: Download from ffmpeg.org and add to PATH

Setup

  1. Clone the repository:
git clone https://github.com/Bhargavi-hash/LUMOS.git
cd LUMOS
  1. Install Python dependencies:
pip install -r backend/requirements.txt
  1. Create environment file:
cp .env.example .env
  1. Add your Gemini API key to .env:
GEMINI_API_KEY=your_actual_gemini_api_key_here
FLASK_SECRET_KEY=your_secret_key_here

Usage

  1. Start the application (Option 1 - using launcher script):
python run.py

Or (Option 2 - run directly):

python backend/app.py
  1. Open your browser and navigate to:
http://localhost:5000
  1. Upload a video file (MP4, AVI, MOV, MKV, or WebM)

  2. Wait for AI analysis and clip generation

  3. View generated clips with captions for each platform

How It Works

  1. Video Upload: User uploads a long-form video through the web interface

  2. AI Analysis: Gemini AI analyzes the video content to identify:

    • Engaging moments with strong hooks
    • Platform-specific viral potential
    • Optimal clip timing (15-60 seconds)
  3. Clip Generation: The system automatically cuts video segments using MoviePy

  4. Caption Creation: Gemini AI generates platform-optimized captions:

    • YouTube Shorts: Educational, SEO-friendly with hashtags
    • Instagram Reels: Engaging, emoji-rich with call-to-action
    • TikTok: Trend-focused, conversational style
  5. Preview & Download: Users can preview all clips and their captions in the web interface

Project Structure

LUMOS/
β”œβ”€β”€ backend/                # Backend application
β”‚   β”œβ”€β”€ app.py             # Flask application
β”‚   β”œβ”€β”€ video_analyzer.py  # Gemini AI integration for video analysis
β”‚   β”œβ”€β”€ video_clipper.py   # Video cutting and clip generation
β”‚   β”œβ”€β”€ requirements.txt   # Python dependencies
β”‚   β”œβ”€β”€ utils/             # Utility modules (for future extensions)
β”‚   β”œβ”€β”€ uploads/           # Uploaded videos (git-ignored)
β”‚   └── outputs/           # Generated clips (git-ignored)
β”œβ”€β”€ frontend/              # Frontend application
β”‚   β”œβ”€β”€ templates/         # HTML templates
β”‚   β”‚   └── index.html    # Web interface
β”‚   └── static/           # Static assets
β”‚       β”œβ”€β”€ css/
β”‚       β”‚   └── style.css # Styling
β”‚       └── js/
β”‚           └── app.js    # Frontend logic
β”œβ”€β”€ run.py                # Application launcher script
β”œβ”€β”€ .env.example          # Environment variables template
β”œβ”€β”€ .gitignore           # Git ignore rules
β”œβ”€β”€ LICENSE              # License file
└── README.md            # This file

API Endpoints

  • GET / - Main web interface
  • POST /upload - Upload and process video
  • GET /clips/<filename> - Serve generated video clips
  • GET /health - Health check and API status

Configuration

Environment Variables

  • GEMINI_API_KEY: Your Google Gemini API key (required for AI features)
  • FLASK_SECRET_KEY: Secret key for Flask sessions

Upload Settings

  • Maximum file size: 500MB
  • Supported formats: MP4, AVI, MOV, MKV, WebM

Platform-Specific Optimization

YouTube Shorts

  • Focus: Educational content, tutorials, quick tips
  • Duration: 15-60 seconds
  • Captions: SEO-friendly with 3-5 hashtags

Instagram Reels

  • Focus: Aesthetic content, lifestyle, trending audio
  • Duration: 15-60 seconds
  • Captions: Emoji-rich with 5-10 hashtags and call-to-action

TikTok

  • Focus: Trending content, high energy, humor
  • Duration: 15-60 seconds
  • Captions: Conversational with 3-5 hashtags

Development

Running in Development Mode

python run.py

Or:

python backend/app.py

The application will run on http://localhost:5000 with debug mode enabled.

Mock Mode

If the Gemini API key is not configured, the application will run in mock mode with sample data, allowing you to test the interface and clip generation without API access.

Technologies Used

  • Backend: Flask (Python web framework)
  • AI: Google Gemini API (video analysis and caption generation)
  • Video Processing: MoviePy (video cutting and manipulation)
  • Frontend: HTML, CSS, JavaScript (vanilla)
  • Storage: Local filesystem for uploads and outputs

License

See LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues and questions, please open an issue on GitHub.

About

Latency-optimized Universal Multimodal Output Studio - Google Gemin3 Hackathon - Using Google's Gemini AI, it analyzes videos and generates optimized clips for different social media platforms (YouTube Shorts, Instagram Reels, and TikTok) along with platform-specific captions.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors