This is an AI-powered marketing video generator optimized for creating compelling Instagram and TikTok reels that actually sell products.
- Python 3.8+ installed on your system
- Google API Key with access to Veo 3 (Gemini API)
-
Clone or download this project
cd /Users/yug/Desktop/hackathon4 -
Install dependencies
pip install -r requirements.txt
-
Set up your Google API Key
export GOOGLE_API_KEY="your_api_key_here"
Or create a
.envfile:GOOGLE_API_KEY=your_api_key_here
-
Start the web server
python app.py
-
Open your browser Navigate to
http://localhost:5000 -
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"
-
Single video generation
python multi_tool_agent/marketing_video_agent.py \ --product "Premium Wireless Headphones" \ --category "tech" \ --platform "instagram" \ --audience "young adults"
-
Multiple platforms
python multi_tool_agent/marketing_video_agent.py \ --product "Premium Wireless Headphones" \ --category "tech" \ --multiple
-
Get recommendations
python multi_tool_agent/marketing_video_agent.py \ --product "Premium Wireless Headphones" \ --category "tech" \ --recommendations
- 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
- 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
- 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
Each video follows a proven marketing structure:
- Hook (0-3 seconds): Attention-grabbing opening
- Problem (3-8 seconds): Identify pain points
- Solution (8-15 seconds): Present your product
- Benefits (15-25 seconds): Show key advantages
- Call to Action (25-30 seconds): Drive conversions
- Urgency (final 3 seconds): Create FOMO
- 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
The web interface provides these REST API endpoints:
POST /api/generate- Generate single videoPOST /api/generate-multiple- Generate for all platformsGET /api/status/<job_id>- Check generation statusGET /api/download/<job_id>- Download completed videoGET /api/jobs- List all jobsGET /api/categories- Get product categoriesGET /api/platforms- Get available platformsGET /api/recommendations/<product>/<category>- Get platform tips
- 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
- Instagram: Focus on lifestyle and aesthetics
- TikTok: Emphasize trends and entertainment
- YouTube Shorts: Educational and informative content
- Be specific: "fitness enthusiasts" vs "people who exercise"
- Consider demographics: age, interests, pain points
- Use relevant language: match your audience's vocabulary
-
"Missing GOOGLE_API_KEY"
- Make sure you've set the environment variable
- Check that your API key is valid and has Veo 3 access
-
"Video generation failed"
- Check your internet connection
- Verify your API key has sufficient quota
- Try with a simpler prompt
-
"Job not found"
- Jobs are stored in memory and reset when the server restarts
- Generate a new video if the server was restarted
- Batch processing is more efficient than individual requests
- Use specific prompts for better results
- Monitor your API quota to avoid rate limits
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)
For issues or questions:
- Check the troubleshooting section above
- Verify your API key and permissions
- Check the console logs for detailed error messages
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.