A full content creation pipeline that turns top Reddit posts into viral short-form videos, complete with AI-generated scripts, voiceovers, Ken Burns-style slideshows, and optional YouTube upload.
cd redditvideo && streamlit run app.py --server.port 5000— run the Streamlit dashboard- The workflow "Reddit Video Pipeline" manages this automatically
- Python 3.11 + Streamlit
- Reddit API: PRAW
- Script AI: OpenAI (via Replit AI Integrations — no key needed)
- Voiceover: gTTS (Google Text-to-Speech, free)
- Images: AI-generated (gpt-image-1 via Replit AI Integrations — default, matches the script subject), Unsplash/Pexels stock (add API keys), or styled placeholders
- Video assembly: FFmpeg + moviepy (Ken Burns zoompan filter)
- Analytics: JSON flat file (redditvideo/data/analytics.json)
- Charts: Plotly
redditvideo/app.py— main Streamlit multi-page dashboardredditvideo/src/reddit.py— PRAW Reddit fetchingredditvideo/src/script_generator.py— OpenAI script generation + PRESETSredditvideo/src/voiceover.py— gTTS voiceover generationredditvideo/src/image_pipeline.py— stock/placeholder image fetching + resizingredditvideo/src/video_assembler.py— FFmpeg video assembly with Ken Burnsredditvideo/src/analytics.py— usage tracking + statsredditvideo/src/youtube_uploader.py— YouTube Data API v3 uploadredditvideo/output/— generated videos, audio, imagesredditvideo/data/analytics.json— analytics database
- Flat JSON analytics file for simplicity — no DB setup needed for a single-user tool
- FFmpeg's zoompan filter for Ken Burns effect — no Python video manipulation overhead
- gTTS used as free TTS; OpenAI TTS can be swapped in via voiceover.py
- OpenAI accessed via Replit AI Integrations proxy (no API key needed from user)
- YouTube upload is optional and uses a web-based OAuth2 flow (works on headless Replit; no server-side browser). The old
run_local_serverdesktop flow does NOT work on Replit.- Requires YOUTUBE_CLIENT_SECRETS_JSON = the FULL JSON file (top-level
webkey) from a Google Cloud Web application OAuth client — not the bareGOCSPX-...client secret string. - The OAuth client must register the app's public URL (
https://<REPLIT_DOMAIN>/) as an Authorized redirect URI. - User clicks "Connect YouTube account" in-app → authorizes in their own browser → Google redirects back with
?code=→ app exchanges it and storesdata/youtube_credentials.pkl.
- Requires YOUTUBE_CLIENT_SECRETS_JSON = the FULL JSON file (top-level
6-page Streamlit dashboard:
- Search Reddit — search any subreddit(s), filter by time/score/type, select a post
- Script Generator — AI-powered script with platform presets (YouTube Short, TikTok, Reel, etc.)
- Voiceover — free gTTS narration with language + speed options
- Images — Ken Burns slideshow images (AI-generated/stock/placeholder, auto-prompted from script). AI is the default and matches each slide to the script subject.
- Assemble Video — FFmpeg-powered video assembly with download + YouTube upload
- Analytics — usage charts, platform/genre breakdowns, recent activity log
- Free TTS preferred (gTTS)
- Both AI-generated and stock photos for images
- User has Reddit API credentials (REDDIT_CLIENT_ID, REDDIT_CLIENT_SECRET, REDDIT_USER_AGENT)
- Add UNSPLASH_ACCESS_KEY or PEXELS_API_KEY secret for real stock photos
- YouTube upload requires YOUTUBE_CLIENT_SECRETS_JSON (OAuth2 JSON from Google Cloud Console)
- Video assembly takes 1-3 minutes depending on number of images and video length
- FFmpeg must be installed (done via installSystemDependencies)
- See the
pnpm-workspaceskill for workspace structure (Node.js side) - Python packages in redditvideo/requirements.txt