YouTube Shorts Automation: Daily AI Videos From a Raspberry Pi
๐ March 14, 2026 ยท โฑ๏ธ 7 min read
Running multiple YouTube channels sounds fun until you try to publish every single day. We built a fully automated Shorts factory that generates, narrates, adds sound effects and music, assembles, and uploads ~42-second vertical videos across five themed channels โ all running 24/7 on a Raspberry Pi 5.
๐ฏ The Problem
Consistency is everything on YouTube, but manually producing even one Short per day involves scripting, asset creation, voice recording, editing, rendering, and uploading. Multiply that by five channels and it becomes a full-time job. We wanted daily output with zero daily effort.
๐บ The Channels
The system manages seven themed channels, with five currently active and two reserved for future activation:
- ๐ InterdimensionalNightmare โ Creepy stories, cosmic horror, and sleep paralysis tales
- ๐ช InterdimensionalMotivation โ Stoic philosophy, Marcus Aurelius quotes, discipline content
- โก InterdimensionalMythology โ Greek, Norse, Egyptian, and Hindu myths retold
- ๐พ InterdimensionalPaws โ Heartwarming animal rescues and pet stories
- ๐ฟ InterdimensionalFlora โ Medicinal herbs, pollinators, and botany facts
Each channel has its own distinct profile: unique voice style, visual aesthetic, color grading, pacing, title patterns, and music mood โ so every Short feels native to its niche.
๐ง End-to-End Pipeline
Every Short goes through 12 automated steps from idea to published video. Hereโs the full flow:
1. Topic Selection
An AI model generates a channel-specific topic, drawing from curated catalogs and injecting seasonal context. Topic history files prevent repeats โ no channel ever publishes the same story twice.
2. Script & Story Generation
A single AI call produces a complete narrative package: title, description, hashtags, per-clip narration lines (12โ16 words each), matching visual prompts, voice settings, and a music style recommendation.
3. Scene Frame Generation
High-quality 9:16 images are generated via Flux 2.0 Pro โ one per clip โ to serve as image-to-video seeds. Two frames render in parallel with a 4-attempt retry and progressive prompt simplification on failure.
4. Video Clip Generation
Browser automation submits each visual prompt to an AI video generator, configured for 720p, 9:16, 6-second clips. Each clip downloads sequentially with polling, timeouts, and cooldown delays between requests.
5. Voice Analysis & Matching
AI vision analyzes frames to determine the dominant character gender and corrects voice selection if thereโs a mismatch โ preventing a male voice from narrating a female characterโs story.
6. Sound Effects
AI-generated sound effects are synchronized to each video clip. A smart mode analyzes 5 frames per clip and generates contextual SFX prompts. Layered mode produces foreground, midground, and background audio layers.
7. Text-to-Speech Narration
Per-line narration is synthesized with configurable voice speed, pitch, and emotion. Each line retries up to 3 times with exponential backoff.
8. Short Assembly
ffmpeg merges everything: clips are trimmed to match TTS duration, audio is mixed (voice at 180%, SFX at 40%, music at 20%), sidechain compression ducks music under voice, and the output is hard-capped at 59 seconds. Final spec: 1080ร1920, H.264 CRF 18, AAC 192kbps.
9. Metadata Generation
YouTube metadata โ title, description, tags, hashtags, and category โ is generated and saved alongside the video, optimized for the 500-character limit.
10. Upload
Browser automation handles the YouTube Studio upload flow: channel switching, overlay dismissal (with a self-learning cache), title/description entry, privacy settings, and publish confirmation. Results are logged to an audit trail.
โฐ Scheduling & Orchestration
A custom control-center daemon manages the daily schedule. Each channel has a fixed time slot staggered every 4 hours (Eastern Time):
- ๐ 01:00 ET โ InterdimensionalNightmare โ horror
- ๐ 05:00 ET โ InterdimensionalMotivation โ motivation
- โ๏ธ 09:00 ET โ InterdimensionalMythology โ mythology
- ๐ค๏ธ 13:00 ET โ InterdimensionalPaws โ animals
- ๐ 17:00 ET โ InterdimensionalFlora โ plants
All channels share a single video generation queue โ only one runs at a time since the AI video generator can only handle one browser session. A completedSlots map prevents duplicate runs within the same time window. Scheduler state persists across daemon restarts.
๐ก๏ธ Reliability & Safety
Automations fail unless you design for failure. These safeguards made the biggest difference:
- ๐ Smart Retries โ Exponential backoff on TTS, SFX, and image generation. Up to 60 retries for browser connections.
- ๐ Lockfile System โ PID-based stale lock detection prevents concurrent instances from colliding.
- โฉ Resume Support โ The
--resumeflag detects existing clips and skips already-generated content. - ๐งน Browser Health Checks โ CDP health check before each run; Chromium restarts automatically if unresponsive.
- ๐ Lifecycle Management โ Videos move through ready โ uploaded โ failed directories. 3 failed uploads move to a failure queue.
- ๐ซ Deduplication โ Topic history prevents repeated stories. Schedule slot tracking prevents duplicate daily runs.
๐ฅ๏ธ The Hardware
The entire stack โ Chromium, ffmpeg, Node.js, and all AI API calls โ runs on a single Raspberry Pi 5 Model B with Debian 13. No cloud servers, no powerful desktop machines โ just a single-board computer running 24/7.
Heavy computation (video generation, TTS, image rendering, music, SFX) is offloaded to cloud AI APIs. The Pi handles orchestration, browser automation, ffmpeg assembly, and uploads โ tasks that are I/O-bound rather than compute-bound.
๐ Real-World Results
Production data from February 25 to March 14, 2026:
- ๐ค 72 Videos Uploaded โ Across 5 channels over ~18 days of unattended operation
- โ 83.7% Upload Success Rate โ 14 failures, most recovered on retry โ only persistent failures moved to the failure queue
- ๐ 5 Shorts Per Day โ One per active channel, every single day
- ๐ค Zero Manual Intervention โ Fully automated from topic selection to published Short
๐ Lessons Learned
- Single-machine automation works, but resource contention is real โ staggering schedules is essential.
- Browser automation is powerful but fragile โ YouTube Studio UI changes can break the upload flow at any time.
- Observability is not optional โ structured logs and state tracking save you repeatedly.
- โUnattendedโ only works when retry paths are built in from day one. Every API call, every browser action, every file operation needs a failure plan.
๐ฎ Whatโs Next
- External alerting โ Telegram/Discord notifications for failures and agent crashes
- YouTube Data API migration โ Replace browser automation with the official API for upload stability
- Distributed generation โ Offload video generation to more powerful hardware; keep the Pi as scheduler
- Automated session refresh โ Eliminate manual re-authentication for long-running sessions
- Analytics feedback loop โ Track per-video YouTube performance to improve content generation
๐ฏ Final Thought
This project started as โcan I automate one channel?โ and became a multi-channel production system running on a Raspberry Pi. Itโs not perfect โ the 84% upload rate needs work and browser automation will always be fragile โ but it consistently turns AI-generated ideas into published YouTube Shorts every single day. That consistency compounds.
- ๐ InterdimensionalNightmare
- ๐ช InterdimensionalMotivation
- โก InterdimensionalMythology
- ๐พ InterdimensionalPaws
- ๐ฟ InterdimensionalFlora
โ DankDev
Tags: YouTube Automation ยท Raspberry Pi ยท AI Video ยท Node.js ยท ffmpeg ยท Automation ยท YouTube Shorts ยท Text-to-Speech