In 2023, faceless channels were all over. But when I first thought about creating a faceless, automated YouTube channel, I had no idea where to start.
I knew I wanted to offer something useful yet simple, unlike the daily quotes or dating or Reddit stories (lol)
And after some brainstorming, the idea of timer videos came to me.
These videos — used for studying, workouts, or meditation — are straightforward to make, yet their demand is evergreen.
But I didn’t want to manually create each video; instead, I wanted an efficient, automated process.
This is where Python and MoviePy became my best friends.
FYI, I had prior experience with MoviePy from freelancing projects.
Not a member? I got you.
In this article, I’ll walk you through how I use MoviePy, a powerful Python library for video editing, to create timer videos for my YouTube channel with zero manual effort beyond writing some code.
The Automation Process
The goal was to automate everything: from generating the video to uploading it. Here’s how I approached it.
Step 1: Setting Up MoviePy
MoviePy is an open-source library for video editing that fits my needs perfectly. Its capabilities include text overlays, transitions, and even audio synchronization. I started by installing the library:
pip install moviepyStep 2: Designing the Timer Video
The first challenge was designing a simple yet engaging timer. I wanted:
- A dynamic background: Something that doesn’t distract but keeps the viewer engaged. [I leave this step as my most engaging videos are black as background]
- A countdown timer: Large, bold numbers displayed prominently.
- Background music: Relaxing tunes that loop seamlessly.
Here’s a sample snippet of how I achieved this:
from moviepy import * #coz who cares about too much?def create_countdown_video(minutes, output_file):
clips = []
total_seconds = minutes * 60
for seconds in range(total_seconds, -1, -1):
mins, secs = divmod(seconds, 60)
time_text = f"{mins:02}:{secs:02}"
# Create a text clip for the current time
text_clip = TextClip(text=time_text, font_size=150, color='white', size=(1920, 1080), bg_color='black',
duration=1,
font='Impact')
clips.append(text_clip)
# Combine all the text clips
video = concatenate_videoclips(clips, method="compose")
# Write the video to a file
video.write_videofile(output_file, codec="libx264", audio_codec="aac", fps=24)# additional fonts
fonts = [
"Arial", "Verdana", "Helvetica", "Courier", "Courier New",
"Times", "Times New Roman", "Georgia", "Comic Sans MS",
"Impact", "Tahoma", "Palatino", "Trebuchet MS", "Lucida Sans", "Symbol"
]This function takes a duration (in mins) and an output file name, then creates a timer video with a minimalist design.
Step 3: Adding Background Music (Optional)
Adding music was the fun part. I used royalty-free tracks from online libraries and added them to the video:
def add_background_music(video_file, audio_file, output_file):
video = VideoFileClip(video_file)
audio = AudioFileClip(audio_file).set_duration(video.duration)
video = video.set_audio(audio)
video.write_videofile(output_file, fps=24)
With this, my videos became more engaging and professional. The key was to choose music that complemented the purpose — calm and steady for study timers, energetic for workout timers.
Step 4: Automating Multiple Videos
Rather than repeating the process manually, I used a script to generate multiple videos of varying durations (e.g., 5, 10, 15 minutes) in one go:
durations = [5, 10, 15] # 5, 10, 15 minutes
for duration in durations:
video_file = f"timer_{duration}min.mp4"
create_countdown_video(duration, video_file)
add_background_music(video_file, "background.mp3", f"final_{video_file}")Challenges I Faced
Rendering times: MoviePy can be slow for long videos. I optimized by tweaking fps and reducing the number of effects.
And this is it. Here, we are with an automated timer :)
In case we are meeting for the first time, come over here, it’ll be worth the roller coaster of articles that are gonna come up in the next few weeks.