--- title: AI Short Video Generator emoji: 🎬 colorFrom: purple colorTo: blue sdk: gradio sdk_version: 6.14.0 app_file: app.py pinned: false license: mit hardware: gpu-t4-small --- # 🎬 AI Short Video Generator Upload photos of characters, describe a scene, and receive a **1080×1920 (1K) Shorts-ready video** complete with animation, dialogue, voice-over, subtitles, and visual effects. ## Pipeline ``` Images → Claude Vision (character extraction) → Claude (script + storyboard) → AnimateDiff + Stable Diffusion (animated frames) → Coqui TTS (voice lines) → FFmpeg (subtitles, FX, assembly) → Final MP4 (1080×1920 @ 30fps) ``` ## Setup (HuggingFace Spaces) 1. **Fork / duplicate** this Space. 2. Go to **Settings → Secrets** and add: - `ANTHROPIC_API_KEY` — your Anthropic API key ([get one here](https://console.anthropic.com/)) 3. Choose **GPU T4 small** (or larger) hardware for reasonable speed. 4. The Space will install all dependencies and launch automatically. ## Local Setup ```bash # 1. Clone git clone https://huggingface.co/spaces//ai-short-video-generator cd ai-short-video-generator # 2. Install system deps (Ubuntu/Debian) sudo apt-get install -y ffmpeg espeak-ng # 3. Python deps pip install -r requirements.txt # 4. Set API key export ANTHROPIC_API_KEY=sk-ant-... # 5. Run python app.py ``` ## Output Specs | Property | Value | |---|---| | Resolution | 1080 × 1920 px | | Aspect ratio | 9:16 (Shorts / Reels / TikTok) | | Frame rate | 30 fps | | Video codec | H.264 | | Audio codec | AAC | | Duration | ~30–60 s | ## Visual FX Supported - **zoom** — Ken Burns zoom-in - **glitch** — RGB channel-split glitch - **slow-motion** — frame doubling - **vignette** — cinematic edge darkening - Combinations (e.g. `glitch, zoom`) ## Notes - First run downloads ~4–6 GB of model weights (SD 1.5 + AnimateDiff adapter). They are cached automatically. - Generation takes ~3–8 minutes on a T4 GPU depending on scene count. - The `ANTHROPIC_API_KEY` secret is never exposed to users.