Turn ideas into published YouTube Shorts automatically: trend discovery β AI script β voiceover β video β upload
Shortube is a free, open-source YouTube Shorts automation tool that takes a topic β or discovers trending topics for you β and produces a finished, published YouTube Short: an AI-written script, a natural text-to-speech voiceover, a Remotion-rendered video with karaoke captions, branded thumbnail, and an automatic upload to your YouTube channel.
β From idea to published Short in minutes β no video editing skills required.
- β¨ Features
- π€ Why Shortube?
- βοΈ How It Works β the Automated Pipeline
- π Quick Start
- π§ LLM Providers
- ποΈ Quality Presets
- πΌοΈ Visual Templates
- ποΈ Architecture
- βοΈ Configuration Reference
- β FAQ
- π€ Contributing
- π License
| Feature | What it does | |
|---|---|---|
| π | Dashboard | Generate by topic or one-click Auto mode with live progress bar, stage-by-stage log, and job cancellation |
| π₯ | Trends | Refresh trending topics in your niche (LLM-refined), click to generate |
| ποΈ | Videos | Thumbnail gallery, open local files or YouTube links, retry failed videos with cache resume |
| βοΈ | Settings | Tabbed config β LLM, voice, video & quality, upload, advanced β with Test Connection and YouTube channel picker |
| π | Schedule | Automatic generation on an interval with a daily limit (survives restarts) |
| π | Analytics | Views, likes and comments for your uploaded videos |
| π§ | Setup Wizard | First-run guide: LLM provider β template β quality β YouTube connection |
| π‘οΈ | Dependency Check | Friendly startup warnings for missing Node.js / Remotion / ffmpeg |
- π§ LLM-powered scripts β hook, body points, CTA, keywords, title and tags in a single validated prompt
- β Strict quality gate β hook/points/CTA length, keyword density β₯ 60%, spoken duration β€ 55s, duplicate & junk detection with up to 3 automatic retries
- π Self-healing β malformed LLM output is detected and retried with the exact fix hints
- π° 3 sources β Hacker News (Algolia), RSS (NYT, BBC, The Verge, Wired, Ars Technica), YouTube Search (Data API)
- π― LLM refinement β headlines converted into Shorts-optimized topics for your niche
- π« Used-topic tracking β never re-generates a topic you've already uploaded
- π¬ Word-synced karaoke captions β timed to TTS word boundaries
- π¨ Config-driven templates β colors, transitions (zoomBlur / fade / slide / wipe), Ken Burns, caption style
- π Intro/outro bumpers β progress ring, typewriter title, subscribe CTA
- π Sound design β whoosh/pop/riser SFX + background music with ducking
- ποΈ Loudness normalized to YouTube's -14 LUFS
- β±οΈ 60s Shorts cap enforced at both script and voiceover level
- π OAuth 2.0 with token persistence (browser flow)
- π·οΈ Tags & keywords β the LLM generates 3β8 keywords and 4β12 tags per script; the description auto-appends the first 8 tags as
#hashtags, truncated at YouTube's 500-char limit - πͺ Fallback tags β
TAGS_DEFAULT(shorts, youtubeshorts) when a script has none - πΌοΈ Branded thumbnails, π
scheduled publishing,
βΆοΈ playlist assignment, π₯ multi-channel selection
| Problem | Shortube's answer |
|---|---|
| "I have no time to edit Shorts" | The whole production chain runs unattended β including auto-discovery and scheduled publishing |
| "I don't know what topics to make" | Built-in trend discovery from 3 sources, LLM-refined for your niche |
| "AI voiceovers sound robotic" | edge-tts neural voices with word-level timestamps for perfect caption sync |
| "I can't edit video" | Remotion renders everything from a JSON template β colors, transitions, captions, bumpers, SFX |
| "Manual upload is a chore" | OAuth 2.0 auto-upload with title, description, tags, thumbnail, and optional playlist |
| "Other tools cost $30+/month" | 100% free and open source (MIT) β pay only for LLM API usage if you want |
ββββββββββ ββββββββββ ββββββββββββ ββββββββββββ βββββββββββ
β Topic β β β Script β β βVoiceover β β βStoryboardβ β βAssembly β
ββββββββββ β (LLM) β β (edge- β β (media + β β(Remotionβ
ββββββββββ β tts) β β AI img) β β + SFX) β
ββββββββββββ ββββββββββββ ββββββ¬βββββ
βΌ
ββββββββββββ ββββββββββββ ββββββββββββββββ
β YouTube β β βThumbnail β β β loudnorm -14β
β Upload β β (Pillow) β β LUFS β
ββββββββββββ ββββββββββββ ββββββββββββββββ
Each stage is resumable: a cached script + storyboard + voiceover chain is reused all-or-nothing, so a failed render restarts from the last good piece β never from zero.
| Requirement | Why |
|---|---|
| π Python 3.11+ | Core engine |
| β‘ Node.js 18+ | Remotion rendering |
| π¬ ffmpeg (on PATH) | Loudness normalization (recommended) |
| π¦ Ollama or API key | LLM for script writing |
# Python dependencies
pip install -r requirements.txt
# Remotion renderer
cd remotion
npm install
cd ..python -m shortube.desktopOn first launch, the setup wizard walks you through everything β pick your LLM provider, connect your YouTube channel, choose a template and quality preset. All of it is editable later in Settings.
python -m shortube.main # Show trending topics
python -m shortube.main generate -t "Mind-blowing facts about the universe"
python -m shortube.main auto # Auto-discover, generate, uploadShortube works with any OpenAI-compatible LLM provider β switch anytime in Settings β LLM:
| Provider | Setup | Cost |
|---|---|---|
| β‘ Groq (default) | GROQ_API_KEY |
Fast & cheap |
| π OpenRouter | OPENROUTER_API_KEY |
Many models (incl. free ones) |
| π¦ Ollama | local install, no key | Free, runs on your machine |
GROQ_API_KEY=gsk_xxx
# or
OPENROUTER_API_KEY=sk-or-xxx
# or (no key needed)
LLM_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434Control render speed vs. output quality β pick in Settings β Video & Quality:
| Preset | ποΈ fps | βοΈ Concurrency | π¨ CRF | π Audio bitrate | Best for |
|---|---|---|---|---|---|
| β‘ fast | 24 | 2 | 22 | 160k | Drafts, quick previews |
| βοΈ standard | 30 | auto | 18 | 192k | Everyday uploads |
| π pro | 30 | cores/2 | 14 | 256k | Maximum quality |
π Tip: CRF is the H.264 quality knob β lower = better quality, bigger file. YouTube re-encodes anyway, so
standardis the sweet spot for Shorts.
Every render's look is defined by a JSON template in templates/ β colors, fonts, transitions, Ken Burns, caption style and outro styling. Templates are hot-swappable without touching code.
| Template | Vibe |
|---|---|
| π’ premium (default) | Premium Bold β dark, zoomBlur transitions, green accent |
| π΅ clean | Clean Minimal β light, slide transitions, blue accent |
Create your own by copying one and picking new colors β the app lists it automatically.
shortube/
βββ π₯οΈ desktop/ # PyQt6 desktop app
β βββ app.py # Entry point (python -m shortube.desktop)
β βββ main_window.py # Thin view: navigation + job wiring
β βββ app_controller.py # Facade for all DB write orchestration
β βββ workers.py # Background job thread, signals, cancel
β βββ setup_wizard.py # First-run configuration wizard
β βββ theme.py # Dark theme, template-aware accent color
β βββ pages/ # dashboard Β· trends Β· videos Β· settings Β· schedule Β· analytics
βββ main.py # CLI entry point (Click)
βββ pipeline.py # PipelineOrchestrator: typed stages + resume
βββ script.py # ScriptWriter: LLM script generation + validation + retries
βββ voice.py # edge-tts voiceover with word timestamps
βββ storyboard.py # Scene builder + media providers
βββ assemble.py # Remotion assembly + loudness normalization
βββ remotion_bridge.py # Python β Remotion CLI integration
βββ quality.py # Fast/Standard/Pro render presets
βββ template_loader.py # Visual templates (templates/*.json)
βββ scheduler.py # Auto-generation (APScheduler, persisted daily limit)
βββ upload.py # YouTube Data API v3 upload + thumbnails
βββ analytics.py # Video statistics
βββ discover.py # Trend discovery engine
βββ llm.py # One OpenAI-compatible LLM client (Groq / OpenRouter / Ollama)
βββ settings_env.py # .env persistence for the settings UI
βββ config.py # Pydantic settings (.env)
βββ db.py # SQLite database (versioned migrations, typed rows)
βββ types.py # Data classes
remotion/ # Renderer (TypeScript)
βββ src/ # ShortubeVideo, Captions, SceneClip, bumpers,
# Transitions, SoundEffects, template.tsx
templates/ # premium.json Β· clean.json
All settings live in the desktop app (Settings tab) or .env. Most work with either.
| Setting | Default | Description |
|---|---|---|
LLM_PROVIDER |
groq |
groq, openrouter, or ollama |
LLM_MODEL |
llama-3.3-70b-versatile |
Script model |
DISCOVERY_MODEL |
(inherits LLM_MODEL) |
Trend refinement model |
LLM_TEMPERATURE |
0.8 |
Creativity (0.0 β 1.5) |
LLM_MAX_TOKENS |
800 |
Max tokens per LLM call |
GROQ_API_KEY |
β | Groq key (required for groq) |
OPENROUTER_API_KEY |
β | OpenRouter key (required for openrouter) |
OLLAMA_BASE_URL |
http://localhost:11434 |
Ollama server URL |
| Setting | Default | Description |
|---|---|---|
NICHE |
general_facts |
Default content niche |
TAGS_DEFAULT |
shorts, youtubeshorts |
Fallback YouTube tags when a script has none |
QUALITY |
standard |
fast, standard, or pro |
| Setting | Default | Description |
|---|---|---|
VOICE_NAME |
en-US-AriaNeural |
edge-tts voice |
VOICE_SPEED |
1.15 |
Playback speed |
VOICE_VOLUME |
1.0 |
Voiceover gain |
| Setting | Default | Description |
|---|---|---|
VIDEO_WIDTH / VIDEO_HEIGHT |
1080 / 1920 |
Canvas size (px) |
VIDEO_FPS |
30 |
Baseline fps (presets may override) |
BUMPER_DURATION |
1.5 |
Intro/outro bumper length (s) |
TRANSITION_DURATION |
0.3 |
Scene transition length (s) |
TEMPLATE |
premium |
Visual template from templates/*.json |
REMOTION_PROJECT_DIR |
remotion |
Path to Remotion project |
REMOTION_CONCURRENCY |
0 |
Render threads (0 = preset default) |
CAPTION_FONT_SIZE |
48 |
Caption size (px) |
CAPTION_FONT / CAPTION_FONT_COLOR |
β / white |
Caption font & color |
CAPTION_STROKE_COLOR / WIDTH |
black / 3 |
Caption outline |
| Setting | Default | Description |
|---|---|---|
IMAGE_PROVIDER |
auto |
auto, pexels, pixabay, or pollinations |
MEDIA_PREFER_VIDEOS |
true |
Prefer stock video clips over still images |
PEXELS_API_KEY / PIXABAY_API_KEY |
β | Stock media keys (optional) |
BACKGROUND_MUSIC_PATH |
β | Path to a music loop (optional) |
MUSIC_VOLUME |
15.0 |
Music level (0β100) |
DUCK_THRESHOLD |
6.0 |
Music ducking intensity |
SFX_ENABLED |
true |
whoosh/pop/riser sound effects |
SFX_DIR |
resources/sfx |
SFX folder |
| Setting | Default | Description |
|---|---|---|
YOUTUBE_CLIENT_SECRETS |
client_secrets.json |
OAuth client file |
UPLOAD_PRIVACY |
public |
private, unlisted, or public |
UPLOAD_CATEGORY |
22 |
YouTube category ID |
UPLOAD_LANGUAGE |
en |
Video language |
UPLOAD_CHANNEL_ID |
β | Default upload channel |
UPLOAD_PUBLISH_AT |
β | ISO 8601 scheduled publish time |
UPLOAD_PLAYLIST_ID |
β | Auto-add videos to a playlist |
Is Shortube free? Yes. The software is MIT-licensed and free forever. You only pay for optional LLM API usage (Groq/OpenRouter) β or run it fully free with a local Ollama model.
Do I need to know how to edit video? No. Remotion renders the entire Short from a JSON template β captions, transitions, bumpers, and sound effects are all automated.
Which LLM providers are supported? Groq, OpenRouter, and Ollama β anything OpenAI-compatible. See the LLM Providers section.
Does it upload to YouTube automatically?
Yes, via YouTube Data API v3 with OAuth 2.0. You can also use --dry-run or
the desktop app to generate without uploading, and private/unlisted
privacy modes are supported.
Can I schedule Shorts to publish at a specific time?
Yes β both the built-in scheduler (generate on an interval with a daily cap)
and YouTube's scheduled publishing (UPLOAD_PUBLISH_AT) are supported.
What happens if a render fails? The pipeline is resumable: cached script + storyboard + voiceover are reused, and rendering restarts from the last good stage. See How It Works.
Does it work on Windows, macOS, and Linux? The Python side is cross-platform. PyQt6 desktop app runs on all three; the Remotion renderer needs Node.js 18+.
Found a bug or have an idea? Open an issue or submit a PR. See CONTRIBUTING.md for the full development guide; the CI pipeline runs the same gates locally:
python -m ruff check shortube tests # lint
python -m pytest # unit tests (84+)The real-render E2E smoke test is opt-in and needs Node.js + the Remotion deps installed:
cd remotion && npm install && cd ..
$env:SHORTUBE_E2E = "1" # PowerShell (Linux/macOS: export SHORTUBE_E2E=1)
python -m pytest -m e2eOther gates: python -m compileall -q shortube, npx tsc --noEmit in remotion/, and a Qt offscreen boot check of MainWindow.
MIT β free to use, modify, and distribute, including commercially.
Made with β€οΈ by alimaandev
π₯ Shortube β the open-source YouTube Shorts generator that turns ideas into published Shorts, automatically.
β Star the repo if you find it useful β it helps more people discover it.