1
0 Comments

Creating 100+ shorts while exercising

One of the reasons I started programming is because I always liked working on something and then be able to let the computer "work for you" while you do anything else...

And today I will showcase how I created an automatism to create 100+ shorts while I was away from the computer exercising.

As a short introduction, it's worth mentioning that I'm currently on a 75 days challenge (you can read this post to see more about it) and this is the first week but since this post is about how I created the automatism, for more information and progress, feel free to subscribe to my free newsletter.

Which tools did I use to create the shorts?

To create that automatism, I tried to mix several tools, more precisely the following:

  • ElevenLabs: to generate speech from text
  • Leonardo AI: to generate some of the visuals
  • Bash + htmlq: to scrap the content I needed
  • Remotion.dev: to create the actual videos

How did I structure the shorts?

Basically, the initial idea for this channel was kind of a quiz, so to simplify it, the video structure would be like 4 screens:

  1. Introduction (with some welcome screen and spoken audio)
  2. The quiz itself (showing images and animating them with sounds)
  3. The solution (showing animated images and sounds)
  4. The conclusion (with some text, spoken audio and call to action to subscribe)

The actual thinking process

Once I had the structure in mind, I tried to think of the cheapest approach to create these videos but that could create interesting results.
For the voices, instead of generating audio for each video, I manually generated up to 10 different (yet similar) introductions, and 10 conclusions using ElevenLabs. And within remotion, every time I was creating a video I would get one of these audios using a random approach.
The same was done for the backgrounds. To have the different videos looking different, I created some visuals with LeonardoAI (manually) and then when creating the video, one random background would be selected at every execution.
To scrap the content, I came up with a bash script that used htmlq to extract the needed information for my videos.
And mixing all these elements, there was a remotion project that by calling it with different parameters, it would arrange the different pieces and animate them so that it looked good.
Example call:
pnpm exec remotion render --audio-codec mp3 --props='{"xxxx": "xxxx"}' --output out/xxxx.mp4

Then, I created a second script that iterated over a list of 100+ topics, and for each of them, was calling the previous command. That way, when I finished exercising, I had 100+ videos created ready to be published to youtube shorts.

I'm proud of the results, and the part I like the most is that it didn't result on an expensive test. If I sum up all the credits used for the audio and the visuals, it was less than 1€, so if it works, it will be a really good investment.

Now is time to upload and program them all and see if it was a good niche, but with what I did, I have the basics to create different kind of videos with remotion.

If you reached this, thanks for reading. If you want more details of the challenge process, check my free newsletter and please leave in the comments any suggestion or question you may have.

on October 12, 2024