TubeSum ← Transcribe a video

I Automated YouTube Shorts with Python

Transcribed Jun 14, 2026 Watch on YouTube ↗
Intermediate 2 min read For: Python developers interested in video automation and content creation.
151.9K
Views
5.4K
Likes
304
Comments
115
Dislikes
3.8%
📈 Moderate

AI Summary

The video demonstrates how to automate the creation of YouTube Shorts using Python, leveraging libraries like MoviePy, APIs for stock footage and text-to-speech, and AI for script generation. The creator builds a simple frontend that generates a complete video from a user-provided idea, then tests it on a channel with modest success.

[0:00]
Inspiration and Goal

The creator saw random fact YouTube Shorts and decided to automate their creation with Python using minimal effort.

[0:16]
Tech Stack

Uses Python with MoviePy for video editing, Bing version of ChatGPT for script generation, Pexels API for stock videos, TikTok TTS unofficial API for text-to-speech, and AssemblyAI for generating subtitles.

[0:27]
Frontend and Script Generation

A simple frontend allows entering a video idea, which triggers ChatGPT to generate a script and search terms for stock footage.

[0:46]
Stock Video Handling

Pexels API provides free stock videos, but resolution issues required cropping instead of resizing to avoid glitches.

[1:09]
Text-to-Speech and Subtitles

Used TikTok TTS unofficial API for speech, then AssemblyAI to generate a transcript with timestamps in SRT format for subtitles.

[1:45]
Testing and Results

The backend generates a video; the creator shows a sample output about the Amazon rainforest. Testing on a channel yielded a few 1K-view shorts.

The project successfully automates YouTube Shorts creation, achieving modest viewership. The creator plans to release the code on GitHub for subscribers.

Clickbait Check

90% Legit

"Title accurately describes the content: automating YouTube Shorts with Python."

Mentioned in this Video

Tutorial Checklist

1 0:27 Create a frontend to accept user video idea.
2 0:33 Use ChatGPT (Bing version) to generate a script and search terms from the idea.
3 0:46 Fetch stock videos from Pexels API using generated search terms.
4 0:57 Crop videos to fix resolution issues instead of resizing.
5 1:09 Generate text-to-speech audio using TikTok TTS unofficial API.
6 1:21 Use AssemblyAI to create SRT subtitles from the audio.
7 1:32 Combine video clips, audio, and subtitles using MoviePy to produce final MP4.

Study Flashcards (6)

What Python library is used for video editing in this project?

easy Click to reveal answer

MoviePy

0:19

Which API is used to generate the video script?

medium Click to reveal answer

Bing version of ChatGPT

0:33

How did the creator fix resolution issues with stock videos?

medium Click to reveal answer

By cropping instead of resizing

1:05

Which unofficial API was used for text-to-speech?

hard Click to reveal answer

TikTok TTS unofficial API from GitHub

1:15

What platform was used to generate subtitles with timestamps?

medium Click to reveal answer

AssemblyAI

1:21

What format did AssemblyAI save the subtitles in?

hard Click to reveal answer

SRT format

1:29

💡 Key Takeaways

💡

Automation Motivation

Shows the creator's insight that these videos are easy to automate with little effort.

0:12
🔧

Cropping Fix

Demonstrates a practical technique to avoid glitches when resizing videos.

0:57
📊

Testing Results

Confirms the automation works and can achieve thousands of views.

1:45

✂️ Creator Tools: Viral Hooks

AI-generated clip ideas for Shorts based on the transcript

Automating YouTube Shorts with Python

45s

Shows a step-by-step automation process that saves time and effort, appealing to creators.

▶ Play Clip

Fixing Video Resizing Glitch

60s

Reveals a common technical problem and a clever solution, engaging developers.

▶ Play Clip

Free Text-to-Speech Hack

60s

Shares a cost-effective alternative to expensive TTS APIs, valuable for budget creators.

▶ Play Clip

Full Automation Demo

60s

Live demonstration of the tool generating a video, satisfying curiosity about the process.

▶ Play Clip

Real Results: 1K Views from Bots

43s

Proof of success with actual view counts, motivating viewers to try the method.

▶ Play Clip

[00:00] when I was scrolling through YouTube

[00:01] shorts yesterday I came across these

[00:03] videos seeing random facts about the

[00:05] world here's an example meet the

[00:06] immortal jellyfish a mesmerizing

[00:08] creature that defies the boundaries of

[00:10] life and death and I just thought how

[00:12] easy these would be to automate with

[00:13] literally little to no effort here's how

[00:16] that went I wanted to use Python to do

[00:18] this project since you can easily edit

[00:19] videos with it using a library called

[00:22] movie pie and because this is

[00:23] essentially free money method I named it

[00:25] money printer first of all I created a

[00:27] very simple front end where you can

[00:29] enter your video idea and it will

[00:30] automatically generate the video for you

[00:33] since I already know how to use the Bing

[00:35] version of cgt with python from previous

[00:37] projects I let it create a video script

[00:39] based on the provided user idea now that

[00:42] I have the script next up is to find

[00:43] good stock videos based on Search terms

[00:46] that jpt also generated for me for this

[00:48] I used the pixels API which is very easy

[00:50] to use and also free there is one

[00:52] problem however I don't know the

[00:54] resolution of the videos that the pixels

[00:56] API provides me with so I need to

[00:57] manually resize them using movie pie

[00:59] which is a pain since most of the time

[01:01] it simply renders this weird TV glitch

[01:03] screen but somehow I managed to fix it

[01:05] by cropping the video clips instead of

[01:07] resizing them now I had to find a form

[01:09] of Texas speech which didn't sound too

[01:11] robotic but I obviously don't have

[01:13] enough money for the 11 Labs API so we

[01:15] went with a Tik Tok TTS unofficial API

[01:18] from GitHub and it was converting the

[01:19] sentences in my script just fine there's

[01:21] a platform called assembly Ai and this

[01:23] is what I used to get a transcript of my

[01:25] just generated Texas speech as it would

[01:27] include timestamps and it can save the

[01:29] sub it in the SRT format movie piie

[01:32] comes in clutch Again by letting me burn

[01:34] subtitles into the video easily by

[01:36] concatenating the original video file

[01:38] with a subti clip class instance which

[01:40] just needs the path to my just exported

[01:43] SRT file with that the application is

[01:45] basically finished Let's test it out

[01:47] okay let's run our back end all right

[01:49] should be running now let's click on

[01:52] generate and now wait right now it's

[01:55] generating or generating our

[01:58] script it's generated it now these are

[02:01] the Search terms which we are going to

[02:03] use with the pixels API here are the

[02:05] videos it shows now it's downloading

[02:08] those okay it prints the script again

[02:12] now it's completing the text of speech

[02:14] using the Tik Tok API or unofficial API

[02:18] all right now it's generated the

[02:19] subtitles with the assembly Ai and last

[02:23] but not least it's combining everything

[02:24] together and once this is done we should

[02:27] have our output. MP4 I'm going to speed

[02:30] up this process a little bit cuz it's

[02:31] boring all right it seems like we still

[02:34] have to do something so I'm going to

[02:36] take that sacrifice because I'd rather

[02:38] wait a little while than edit all these

[02:40] videos myself so I'm fine with that

[02:43] great now it's done with that said let's

[02:45] have a look at our video the Amazon

[02:48] rainforest is the largest tropical

[02:50] rainforest in the world covering an area

[02:52] of approximately 5.5 million square km

[02:56] it is home to a diverse range of plant

[02:58] and animal species many of which are

[03:01] found nowhere else on Earth this looks

[03:03] good enough just so you don't think this

[03:05] was just some useless project I actually

[03:07] tested these clips on a channel and here

[03:09] are the

[03:11] results as you can see I did get a

[03:14] couple 1K views shorts which is pretty

[03:16] impressive for an automation bot in my

[03:18] opinion if you guys want the code like

[03:20] And subscribe as I'll be posting it on

[03:22] GitHub in the upcoming days till next

[03:28] time oh

⚡ Saved you time reading this? Transcribe any YouTube video for free — no signup needed.