How I built an automated YouTube video pipeline for my SaaS using Python, edge-tts, and moviepy
I run a niche tool called WhaleTrack (whaletrack.app) - it tracks big bets on Polymarket in real time. To grow it I decided to start a faceless YouTube channel. No camera, no editing software, no designer. Just code. Here's the full pipeline I built in one day.
The stack
- edge-tts - Microsoft's neural TTS (Andrew voice, free, no API key)
- moviepy 1.0.3 - video assembly
- Pillow - image processing
- Puppeteer - screenshot the live website
- ffmpeg - underlying encoder
Step 1: Screenshot the real website
Instead of fake mockups I screenshot the actual live site using Puppeteer:
const puppeteer = require('puppeteer');
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({ width: 1920, height: 1080 });
await page.goto('https://whaletrack.app');
await page.screenshot({ path: 'screenshots/home.png' });
Gotcha: if your package.json has "type": "module", Puppeteer's require() breaks. Name the file .cjs not .js.
Step 2: AI voiceover
import edge_tts
comm = edge_tts.Communicate(script, voice='en-US-AndrewNeural', rate='+8%')
await comm.save('audio.mp3')
Completely free. Sounds genuinely good. Andrew Neural is the best voice I found for this style of content.
Step 3: Ken Burns effect
Static screenshots are boring. This adds a slow zoom + pan to make it feel like real video:
def apply_ken_burns(img, progress, zoom_from, zoom_to, pan_from, pan_to):
zoom = zoom_from + (zoom_to - zoom_from) * progress
iw, ih = img.size
crop_w, crop_h = int(iw / zoom), int(ih / zoom)
ox = int(pan_from[0] + (pan_to[0] - pan_from[0]) * progress) * (iw - crop_w)
oy = int(pan_from[1] + (pan_to[1] - pan_from[1]) * progress) * (ih - crop_h)
return img.crop((ox, oy, ox + crop_w, oy + crop_h)).resize((1920, 1080), Image.LANCZOS)
Step 4: Assemble with moviepy
from moviepy.editor import VideoClip, AudioFileClip
def make_frame(t):
progress = t / duration
frame = apply_ken_burns(bg_image, progress, 1.0, 1.12, (0,0), (0.03,0.02))
return np.array(frame)
clip = VideoClip(make_frame, duration=duration)
clip = clip.set_audio(AudioFileClip('audio.mp3'))
Result
A 2.6 minute 1080p YouTube video, fully automated, from a Python script. Total cost: $0. Total time to build the pipeline: ~1 day.
- The video: https://youtu.be/iwGwUpbhABA
- The tool: https://whaletrack.app
Happy to share the full script if anyone wants it. Building in public - follow along if you're into niche tools + automation.
Comments
No comments yet. Start the discussion.