Skip to content

abhiwasabi/AI-AD-Vid-Generator

Repository files navigation

Marketing Video Generator Setup Guide

🚀 Quick Start

This is an AI-powered marketing video generator optimized for creating compelling Instagram and TikTok reels that actually sell products.

Prerequisites

  1. Python 3.8+ installed on your system
  2. Google API Key with access to Veo 3 (Gemini API)

Installation

  1. Clone or download this project

    cd /Users/yug/Desktop/hackathon4
  2. Install dependencies

    pip install -r requirements.txt
  3. Set up your Google API Key

    export GOOGLE_API_KEY="your_api_key_here"

    Or create a .env file:

    GOOGLE_API_KEY=your_api_key_here
    

Usage

Option 1: Web Interface (Recommended)

  1. Start the web server

    python app.py
  2. Open your browser Navigate to http://localhost:5000

  3. Generate videos

    • Fill in your product details
    • Choose your target platform (Instagram, TikTok, YouTube Shorts)
    • Select product category
    • Add custom hooks and benefits (optional)
    • Click "Generate Video" or "Generate for All Platforms"

Option 2: Command Line

  1. Single video generation

    python multi_tool_agent/marketing_video_agent.py \
      --product "Premium Wireless Headphones" \
      --category "tech" \
      --platform "instagram" \
      --audience "young adults"
  2. Multiple platforms

    python multi_tool_agent/marketing_video_agent.py \
      --product "Premium Wireless Headphones" \
      --category "tech" \
      --multiple
  3. Get recommendations

    python multi_tool_agent/marketing_video_agent.py \
      --product "Premium Wireless Headphones" \
      --category "tech" \
      --recommendations

Features

🎯 Marketing-Focused

  • Sales-optimized prompts designed to convert viewers into customers
  • Platform-specific optimizations for Instagram, TikTok, and YouTube Shorts
  • Product category templates for fashion, beauty, fitness, food, tech, and more
  • Psychological triggers like urgency, social proof, and FOMO

📱 Platform Optimizations

  • Instagram Reels: 9:16 aspect ratio, 30-second optimal duration
  • TikTok: 9:16 aspect ratio, 15-second optimal duration
  • YouTube Shorts: 9:16 aspect ratio, 30-second optimal duration

🎨 Advanced Features

  • Batch processing for multiple platforms
  • Custom hooks and benefits for personalized messaging
  • Real-time progress tracking via web interface
  • Job management with download links
  • Platform recommendations with marketing tips

🧠 AI-Powered Prompts

Each video follows a proven marketing structure:

  1. Hook (0-3 seconds): Attention-grabbing opening
  2. Problem (3-8 seconds): Identify pain points
  3. Solution (8-15 seconds): Present your product
  4. Benefits (15-25 seconds): Show key advantages
  5. Call to Action (25-30 seconds): Drive conversions
  6. Urgency (final 3 seconds): Create FOMO

Product Categories

  • Fashion: Clothing, accessories, style products
  • Beauty: Cosmetics, skincare, hair products
  • Fitness: Workout gear, supplements, health products
  • Food: Restaurants, food products, beverages
  • Tech: Electronics, gadgets, software
  • Home: Furniture, decor, home improvement
  • Travel: Destinations, hotels, travel gear
  • Automotive: Cars, parts, accessories
  • Pets: Pet supplies, food, toys
  • General: Any other product category

API Endpoints

The web interface provides these REST API endpoints:

  • POST /api/generate - Generate single video
  • POST /api/generate-multiple - Generate for all platforms
  • GET /api/status/<job_id> - Check generation status
  • GET /api/download/<job_id> - Download completed video
  • GET /api/jobs - List all jobs
  • GET /api/categories - Get product categories
  • GET /api/platforms - Get available platforms
  • GET /api/recommendations/<product>/<category> - Get platform tips

Tips for Better Results

🎬 Video Content

  • Be specific about your product name and features
  • Use emotional triggers in custom hooks
  • Include social proof in benefits
  • Create urgency with limited-time offers

📊 Platform Strategy

  • Instagram: Focus on lifestyle and aesthetics
  • TikTok: Emphasize trends and entertainment
  • YouTube Shorts: Educational and informative content

🎯 Target Audience

  • Be specific: "fitness enthusiasts" vs "people who exercise"
  • Consider demographics: age, interests, pain points
  • Use relevant language: match your audience's vocabulary

Troubleshooting

Common Issues

  1. "Missing GOOGLE_API_KEY"

    • Make sure you've set the environment variable
    • Check that your API key is valid and has Veo 3 access
  2. "Video generation failed"

    • Check your internet connection
    • Verify your API key has sufficient quota
    • Try with a simpler prompt
  3. "Job not found"

    • Jobs are stored in memory and reset when the server restarts
    • Generate a new video if the server was restarted

Performance Tips

  • Batch processing is more efficient than individual requests
  • Use specific prompts for better results
  • Monitor your API quota to avoid rate limits

File Structure

hackathon4/
├── app.py                          # Flask web application
├── requirements.txt                # Python dependencies
├── README.md                       # This file
├── multi_tool_agent/
│   ├── marketing_video_agent.py    # Core video generation logic
│   ├── video_agent.py             # Original basic implementation
│   ├── agent.py                   # Weather/time agent (unused)
│   └── __init__.py
├── templates/
│   └── index.html                 # Web interface
├── generated_videos/              # Output directory (created automatically)
└── .env                          # Environment variables (create this)

Support

For issues or questions:

  1. Check the troubleshooting section above
  2. Verify your API key and permissions
  3. Check the console logs for detailed error messages

License

This project is for educational and commercial use. Make sure to comply with Google's API terms of service and platform guidelines for social media content.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors