I built a Python bot that generates a story, images, voiceover, word‑by‑word subtitles, assembles the video, and uploads the Short to YouTube with one click — almost zero budget.
Note: This is a personal project. I’m not selling anything, no plans to commercialize it.
An end‑to‑end automation challenge to reuse in future AI projects, keeping costs as close to zero as possible.
Video link: [
]
Happy to share snippets or a repo if there’s interest!
(Again: no sales, just sharing the journey.)
Note: This is a personal project. I’m not selling anything, no plans to commercialize it.
Why?
An end‑to‑end automation challenge to reuse in future AI projects, keeping costs as close to zero as possible.
Constraints / Stack
- Cost: near‑zero
- LLMs & images: g4f client for GPT‑4 + Flux
- ️ TTS: edge-tts
Word timestamps/STT: Deepgram- ️ Video/audio: OpenCV (cv2) + ffmpeg
Upload: YouTube Data API (auto refresh-token)- Language: Python
️ Pipeline highlights
- Story generation (100–120 words) to stay <60s.
- Mixtral needed in‑context examples to respect length (>90% success).
- GPT‑4 did it natively → token savings.
- Unique plots via random sampling from arrays of events/roles/time periods.
- Structured output with a forced JSON schema:
{
"story": "..."
}
- Image prompts: split story into 12 parts, detailed prompts incl. historical cues.
- Image processing/motion: 1024×1024 → 1500×1920 (cv2), padding + random pans/diagonals.
- Voiceover: neural voice via edge-tts.
- Word-by-word subtitles: Deepgram timestamps → .srt per parola.
- Background music: ~10 royalty‑free tracks (YouTube library), LLM picks the best fit.
- Compositing: ffmpeg to merge voice+music and hardcode subtitles (FFmpeg = ).
- Auto-upload: refresh token automation for the YouTube API.
Takeaways
- JSON schemas, randomness and token mgmt = huge time savers.
- Creative automation is doable on a shoestring.
- Python + FFmpeg is a killer combo for media pipelines.
Video link: [
Happy to share snippets or a repo if there’s interest!
(Again: no sales, just sharing the journey.)