An automated pipeline to generate faceless YouTube Shorts based on Google Trends or custom topic. This system leverages AI-generated scripts, manual script approval, TTS voice, subtitle alignment, and FFmpeg video composition, all wrapped in a fully containerized architecture.
Maintaining and improving this open-source project takes significant time and effort. If you find it useful, please consider supporting my work via GitHub Sponsors:
Your support helps keep this project alive and free for the community. Thank you! 🙌
- Trending Topic Detection via Google Trends
- Prompt-based script generation with Google Gemini
- Manual script approval and editing before rendering
- Voice synthesis with Piper TTS
- Forced alignment of subtitles with Aeneas
- Video composition with FFmpeg
- Selectable output orientation (portrait, landscape, square, original, custom)
- Persistent SQLite-backed app settings (
/api/settings) - Configurable generated video save folder (server-side)
- One-click web interface
-
Write Prompt/Choose a topic Choose a category to filter for trending topics from Google Trends, or choose a custom topic or enter a custom prompt in the web UI to describe the video idea.
-
Generate Script (Gemini) The
trendscraperservice uses Gemini to generate atitle,description, andbody. -
Approve Script Review and optionally edit the script. Rendering starts only after approval.
-
Text-to-Speech (Piper) The approved script is converted to speech using Piper TTS.
-
Subtitle Alignment (Aeneas)
speechalignaligns the generated audio with the script to produce timed subtitles. -
Video Assembly (FFmpeg) The system merges:
- A background video from
/videos(nameddefault_*.mp4) - The voiceover audio
- Subtitles to create the final faceless short.
- A background video from
-
Web Trigger Interface Access a minimal frontend on port
80to trigger everything with one click.
viral_faceless/
├── trendscraper/ # Gemini + FFmpeg composition API
├── piper/ # Piper TTS container
├── speechalign/ # Forced alignment via Aeneas
├── nginx/ # Web interface + reverse proxy
├── videos/ # Background video clips (e.g., gameplay, press machine)
├── docker-compose.yml
Note: Background clips must be placed in
/videosand named likedefault_something.mp4.
Rename example.env in .env and replace the placeholder Gemini API key with the one you generated from Google AI Studio, then start the pipeline with:
docker-compose up --buildAccess the web interface at http://localhost to generate your first viral Short.
- Docker + Docker Compose
- Google Gemini API Key
- At least one video clip in
/videos/