Uploading to YouTube While I Sleep
How we automated video uploads to a fleet of YouTube channels with an anti-detect browser, Playwright, and Windows Task Scheduler — and the one SRT bug that kept coming back to bite.
We build a tool that creates YouTube videos in bulk — slides, voiceover, automated thumbnails. The creation side got easy fast. The part nobody warns you about is the publishing side: you can't upload 100 videos a day by hand, and YouTube makes sure of it. This is the story of how we made uploading as automated as the content — with an anti-detect browser, Playwright, and the oldest scheduling trick in the book.
Why not the YouTube API
The obvious answer is the official API: upload once, get a video ID, done. But the channels in question weren't all "ours" in the API sense, and each one had to look like a human was posting from a real browser session — not a scripted client. The API route also meant dealing with quota, per-channel OAuth, and a paper trail that made everything look like what it was: an automated pipeline.
So we went the browser-automation route. The whole thing runs on a single Windows box with a browser tool that's basically a profile manager for real browsers.
The anatomy of the uploader
The setup has four moving parts:
- Profile manager. The browser tool exposes a localhost API that lists saved profiles — each one a real Chrome/Chromium profile, logged into a different channel. Every profile has its own cookies, storage, and device fingerprint.
- Playwright. For each profile, the API opens a real browser window; Playwright connects to it and drives the upload like a human would — drag the video file in, type the title and description, click publish.
- Task Scheduler. The Windows scheduled-task engine kicks the script off every 2–6 hours. That's the entire "orchestration." No Kubernetes, no queue worker — a scheduled task on a $100 desktop.
- A control plane. The admin panel hands the uploader a job via a domain endpoint, so it doesn't matter which ISP or subnet the box is on. It picks up work, uploads, reports back.
The genuinely clever part is how thin the core is: start profile → open flow profile → Playwright automation. Everything else is glue. The profile manager has documented APIs and sample Selenium code, which is the whole reason it's usable — someone already solved "make each browser look distinct."
The bug that kept coming back: Vietnamese SRT
The uploader was the easy 20%. The thing that ate weeks was upstream: matching images to a narrated script. The pipeline generates a slideshow where each image prompt gets queued and matched against the corresponding SRT subtitle. For English this worked great — the queue and the SRT lined up almost perfectly.
For Vietnamese, it fell apart. The SRT would come back missing words or cut off early, so the matcher couldn't find the segment, and the mapping silently broke — images drifted out of sync with the narration. The fix wasn't in the matcher; it was a post-generation verification step: an agent that re-checks every SRT after generation and catches the truncation before it reaches the renderer. Once you add verification as a pipeline stage, the bug stops being a mystery and becomes a checklist item.
What scheduling automation actually looks like
Some numbers that reframed how I think about this:
- A single scheduled task on one Windows box handles uploads for a channel fleet, every 2–6 hours, unattended.
- YouTube metrics lag about two days — you deploy today, you judge the results after the weekend. The dashboard is never "live," and building reports that pretend otherwise just manufactures anxiety.
- A video typically needs ~20 hours before YouTube starts suggesting it at all. First impressions get ~15 impressions with zero clicks. That's not a bug; that's the algorithm warming up.
The lesson: the hardest part of a "do everything automatically" system is rarely the sexy part. It's the scheduled task. It's the file that comes back with 296 timestamps when you sent 300. It's admitting the platform you publish to reports on a two-day delay and scheduling around that instead of fighting it.
Choosing the right remote tool
For a while we tried to remote into the box with the standard proprietary tool and it was silently blocked — corporate security filtering, no error, it just didn't connect. We switched to an open-source remote desktop client (RustDesk), which installed clean and has stayed. It's a small thing, but it's a pattern I keep hitting: the default corporate tool is blocked, and the open-source alternative that just works wins by default.
The whole uploader is maybe a few hundred lines of automation plus a scheduled task. It's been running unattended for weeks. The pipeline that creates the videos is the part with all the clever engineering; the part that ships them to the world is deliberately boring — a profile manager, a browser driver, and Windows' built-in scheduler. Boring turned out to be exactly what you want for something that runs at 3am with nobody watching.