Building an Autonomous YouTube Shorts Pipeline: From 17 GB Livestreams to 2K 60fps Multi-Agent AI (Part 1)
Content creation on YouTube Shorts is one of the highest-leverage distribution channels on the internet today. But behind every successful channel lies a brutal manual bottleneck:
- Manually scanning 6+ hour creator livestreams (often 15 GB to 20 GB of raw video).
- Listening for high-energy moments, audience reactions, or gameplay bugs.
- Cropping 16:9 widescreen footage into a vertical 9:16 layout without clipping important UI or creator facecams.
- Generating word-by-word synchronized karaoke captions.
- Mixing and mastering background audio beds against vocal tracks to avoid copyright strikes and audio clipping.
- Scheduling daily uploads across peak US viewing windows.
What if we could automate the entire lifecycle end-to-end—from VOD discovery to cloud archiving—using autonomous agents, PyTorch on Apple Silicon, faster-whisper, and headless FFmpeg pipelines?
Welcome to Part 1 of our deep dive series into Resolve Lumvrix™: our autonomous multi-agent video clipping and publishing engine.
1. How Did It Start? The Origin Story
The project began with a single challenge: Can an AI agent run a profitable, top-tier YouTube channel without any human intervention?
The Core Problem with Existing Tools
Most online "AI clipper" SaaS tools have significant drawbacks:
- Low Visual Quality: They output 720p or 1080p with heavy compression, preventing YouTube from granting the high-bitrate VP9/AV1 codec tier.
- Lazy Formatting: They slap ugly black letterbox bars between the facecam and the gameplay, dropping viewer retention in the critical first 3 seconds.
- AV Sync Drift: Complex audio filters or variable frame rate (VFR) clips cause audio and video to drift out of sync over time.
- Disconnected Pipelines: You still have to download the result, open YouTube Studio, write descriptions, tag the video, and upload manually.
The Objective
Build a headless, zero-cost-per-video pipeline running locally on Apple Silicon (M-series Mac) that:
- Wakes up autonomously on a schedule.
- Checks YouTube channel upload caps.
- Discovers top trending streams and video topics in real-time.
- Automatically cuts, crops, renders, and scores viral candidates using trained ML ranking models.
- Uploads directly to YouTube and safely backs up masters to Google Drive.
2. System Architecture: The Multi-Agent Engine
flowchart TD A["Scheduled Daemon (cron / agentapi)"] --> B["Quota & Analytics Gate (youtube_upload.py)"] B --> C["Multi-Tier Discovery Radar (Trending / VODs)"] C --> D["Audio Extraction & Muxing (yt-dlp + ffmpeg)"] D --> E["Peak Moment Mining (faster-whisper + CTranslate2)"] E --> F["Video Engine (clip.py: Flush Split + 2K 60fps)"] F --> G["Pro Animated Captions & Neural Voice Clone"] G --> H["Dual-Stage ML Virality Scorer (viral_algorithm.py)"] H --> I["YouTube API Publisher (@hrlspeedgta6)"] I --> J["Google Drive Archiver (Byte-verified)"] J --> K["Local Disk Cache Auto-Purge"] The system is partitioned into five specialized stages:
Stage 1: The Quota & Radar Gate (youtube_upload.py)
YouTube enforces a strict daily quota (typically a hard cap of 10 uploads/day for non-enterprise channels). Before any heavy processing starts:
- The agent queries
youtube_upload.py status. - It calculates today’s calendar uploads and rolling 24-hour quota.
- If quota remains, it activates the Discovery Radar, querying competitor and creator channels (such as IShowSpeed, Kai Cenat, CaseOh, and Rockstar Games) to identify fresh high-view-rate streams.
Stage 2: Deep Stream Mining (clip.py mine)
Rather than relying on basic silence-removal scripts, our pipeline downloads the full stream using yt-dlp and ffmpeg. For a typical 6-hour stream:
- The video stream (
source.f308.webm) and audio stream (source.f251.webm) are multiplexed into a single stream on disk. - A dedicated 16kHz audio track (
audio.wav) is extracted. - We run faster-whisper with CTranslate2 (accelerated via Metal Performance Shaders / MPS on Mac).
- The pipeline scores 30-second candidate sliding windows using RankNet algorithms: measuring opening 1.5s RMS energy burst ratios, peak crest factor, words-per-minute (WPM), and creator sentiment/rage spikes.
Stage 3: The Video Assembly & Invariant Engine
Once the top moment is selected, clip.py renders the output:
- Zero-Gap Flush Split: Facecam and gameplay meet edge-to-edge (
816px + 1744px = 2560pxat 2K). - Anti-Blur 2K Master: 60fps Lanczos scaling + AMD CAS sharpening encoded with
libx264 High Profile CRF 13to force YouTube's VP9/AV1 ingestion pipeline. - Dynamic Pro Captions: Word-by-word animated highlights (Hormozi, Shine light sweeps, or Neon Flicker) overlaid seamlessly.
Stage 4: Dual-Stage ML Scoring Gate (viral_algorithm.py)
Before anything touches YouTube, the rendered .mp4 must pass through our forensic auditor trained on over 2,193 Shorts:
- Loudness must hit -18.4 LUFS broadcast standard.
- Voice-to-BGM SNR must exceed 5.5 dB with 10:1 speech-band sidechain compression.
- Cold-open energy ratio must exceed 1.10x in the first 1.5 seconds.
- Video duration must stay inside the 27.0s – 33.5s Goldilocks virality window.
Stage 5: Publish & Cloud Archival
- Videos passing the audit are scheduled across US Prime Slots (spaced 120+ minutes apart at 17:00, 19:00, 21:00, 23:00, 01:00 UTC).
- The rendered video is uploaded to Google Drive (
HRL_GTA6_Shorts) with remote byte verification. - Once verified, the massive 18 GB local cache is instantly purged, maintaining clean disk space.
3. What is Happening Right Now?
As of today, the autonomous engine has produced over 69 fully finished and verified Shorts!
Just moments ago, the pipeline completed processing an 18 GB, 6-hour livestream (OIeLbmyraRQ), extracted the peak viral finale rage window (13385s – 13415s), rendered Short #69 (IShowSpeed | FAILS GTA 6 FINALE) in 2K 60fps, passed the v4.8 algorithm scoring gate, and automatically purged the temporary files.
4. What's Next in This Series?
In Part 2, we will dive directly under the hood into the code:
- The exact FFmpeg filtergraph recipes for zero-gap split screens and audio sidechain ducking.
- How we built our 1:1 Fireship neural voice clone using MPS acceleration on macOS.
- How to write custom ASS caption generators with keyframed light-sweep shaders.
Follow along and subscribe to the series for the full open architecture!
