Spaces:
Sleeping
Sleeping
| title: YouTube Automation Studio | |
| emoji: π¬ | |
| colorFrom: red | |
| colorTo: blue | |
| sdk: docker | |
| pinned: false | |
| license: mit | |
| app_port: 7860 | |
| # π¬ YouTube Automation Studio | |
| AI-powered automation tool for downloading Instagram Reels, generating metadata with Google Gemini AI, and uploading to YouTube automatically. | |
| ## β¨ Features | |
| - π₯ **Instagram Reel Downloader**: Download Reels in HD quality with original audio | |
| - π€ **AI Metadata Generator**: Generate SEO-optimized titles, descriptions, tags using Google Gemini 2.0 | |
| - π€ **YouTube Auto Uploader**: Upload directly to YouTube with automated metadata | |
| - π΅ **Video Editor**: Add background music and text overlays to videos | |
| - π **Multi-User Support**: Each user has their own isolated YouTube authentication | |
| ## π Quick Start | |
| 1. **Set Environment Variables** (Required): | |
| - `GEMINI_API_KEY`: Get from [Google AI Studio](https://makersuite.google.com/app/apikey) | |
| - `IG_SESSIONID`: Instagram session cookie (see below) | |
| - `SECRET_KEY`: Generate with `python -c "import secrets; print(secrets.token_hex(32))"` | |
| 2. **Upload client_secret.json**: | |
| - Create OAuth credentials in [Google Cloud Console](https://console.cloud.google.com) | |
| - Enable YouTube Data API v3 | |
| - Download and upload `client_secret.json` as a secret file | |
| 3. **Access the app** and start automating! | |
| ## π Getting Instagram Session ID | |
| 1. Open Instagram in Chrome | |
| 2. Press `F12` β Application β Cookies β instagram.com | |
| 3. Find `sessionid` cookie and copy its value | |
| 4. Add to Space secrets as `IG_SESSIONID` | |
| ## π― Usage | |
| 1. **Sign in with YouTube** (OAuth 2.0 - secure & one-time) | |
| 2. **Paste Instagram Reel URL** | |
| 3. **(Optional) Add video editing**: | |
| - Background music from YouTube or local file | |
| - Text overlays with custom positioning | |
| 4. **AI generates metadata** (title, description, tags, hashtags) | |
| 5. **Video uploads to YouTube** automatically | |
| ## π οΈ Tech Stack | |
| - **Backend**: Flask, Python 3.11, Gunicorn | |
| - **AI**: Google Gemini 2.0 Flash | |
| - **APIs**: YouTube Data API v3, Instagram | |
| - **Video Processing**: MoviePy, OpenCV, FFmpeg | |
| - **Auth**: OAuth 2.0, Session-based authentication | |
| ## π Environment Variables | |
| Set these in your Hugging Face Space settings: | |
| ```env | |
| ENVIRONMENT=production | |
| GEMINI_API_KEY=your-gemini-api-key-here | |
| IG_SESSIONID=your-instagram-sessionid-here | |
| SECRET_KEY=your-secret-key-here | |
| ``` | |
| ## π Security | |
| - OAuth 2.0 for YouTube authentication | |
| - Session-based user isolation | |
| - Secure cookie handling | |
| - No password storage | |
| - Automatic credential refresh | |
| ## π OAuth Redirect URI | |
| Add this to your Google Cloud OAuth credentials: | |
| ```` | |