AI-powered video-to-ad content generator. Paste any Instagram Reel, YouTube Short, Facebook Ad, or TikTok video — get an adapted script, hook, caption, and visual direction for your brand in seconds.
Built with Next.js, Gemini AI, shadcn/ui, and Tailwind CSS.
Recast downloads a social media video, analyzes it with Google's Gemini 2.5 Flash, and generates five adapted ad content sections for your product:
| Output | Description |
|---|---|
| Video Summary | Breakdown of the source video's hook, format, tone, and structure |
| Adapted Hook | A rewritten opening hook for your product (under 10 seconds) |
| Adapted Script | 30-45 second script with [VISUAL CUE] markers, matching the source's pacing |
| Instagram Caption | 100-150 word caption with hashtags and CTA |
| Visual Direction | 2-3 scene descriptions with camera angles, overlays, and mood notes |
The adapted script preserves the original language of the source video — Hindi stays Hindi, Tamil stays Tamil.
- Multi-platform support — Instagram Reels, YouTube Shorts, Facebook Ads, TikTok
- Audio or Full Video mode — fast audio-only analysis or full visual + audio
- Product URL scraping — paste a product page URL and context is auto-extracted
- Copy any section — one-click copy on every result card
- Dark mode — system-aware theme toggle
- Cal.com-inspired design — monochrome, shadow-based depth, generous whitespace
- Video preview — watch the downloaded source video inline
- Node.js 18+
- yt-dlp —
pip install yt-dlporbrew install yt-dlp - ffmpeg —
brew install ffmpeg - Google API Key — Get one here
git clone https://github.com/thegauravmahto/recast.git
cd recast
npm installCreate a .env file:
GOOGLE_API_KEY=your_google_api_key_hereOptionally set custom paths for yt-dlp and ffmpeg:
YTDLP_PATH=/usr/local/bin/yt-dlp
FFMPEG_PATH=/usr/local/bin/ffmpegnpm run devOpen http://localhost:3000.
Video URL → yt-dlp download → ffmpeg audio extraction (optional)
→ Gemini Files API upload → Gemini 2.5 Flash analysis
→ Structured markdown parsing → JSON response → UI
- Download — yt-dlp pulls the video from any supported platform
- Process — Audio extracted via ffmpeg (in audio mode) or full video sent
- Upload — File uploaded to Gemini's Files API, polled until ready
- Analyze — Gemini generates adapted ad content with a specialized system prompt
- Parse — Response split into 5 sections by markdown headers
- Render — Results displayed in a card grid with copy buttons
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| UI | shadcn/ui, Tailwind CSS |
| AI | Google Gemini 2.5 Flash |
| Video | yt-dlp, ffmpeg |
| Styling | Cal.com-inspired design system |
| Theme | next-themes (dark/light) |
| Language | TypeScript |
recast/
├── app/
│ ├── layout.tsx # Theme provider, fonts, metadata
│ ├── page.tsx # Renders dashboard
│ ├── globals.css # Design tokens, Cal.com shadows
│ └── api/
│ ├── analyze/route.ts # Video download → Gemini → JSON
│ └── video/[filename]/ # Serves downloaded videos
├── components/
│ ├── dashboard.tsx # Main UI — input, skeletons, results
│ ├── result-card.tsx # Card with copy button
│ ├── theme-provider.tsx # next-themes wrapper
│ └── theme-toggle.tsx # Dark/light toggle
├── DESIGN.md # Design system reference
└── .env.example # Environment variables template
- Instagram Reels
- YouTube Shorts & Videos
- Facebook Ads (via Ads Library)
- TikTok Videos
- Any platform supported by yt-dlp
MIT