Art for Programmatic Video Creation

Programmatic Video Creation

2019 David Teather

Table of Contents

I’ve always been interested in automating things for fun and for a competitive advantage. In 2019 I saw a lot of YouTube videos that were just a text to speech voice over Reddit content. These videos were seemingly very easy to automate and were getting 100K+ views, so I decided to try to automate creating them. The project blended my interest in programming with video creation and it was a lot of fun.


What It Did

This project started off pretty simple, although there were many edge cases I had to figure out with FFmpeg. A few of these issues were: distorted audio, wrong framerate, and the wrong comment appearing at the wrong time.

It used the PRAW python package to read data using an API from Reddit, generated images from the data using an HTML template, stitched the images together over the text to speech voice, and combined them into a single video in which the voice read out the comments.

Overtime it got more sophisticated with features like

How It Worked

  1. It took in a ton of command line arguments but the most important one was a link to the thread that you wanted to create the video around.
  2. Used praw to pull all the data needed to make that video from that Reddit post.
  3. It filled out an HTML template using the post’s information and used a command line tool to convert that HTML into an image it could use in the video.
  4. Generated mp3 of a text to speech voice from AWS Polly
  5. Used FFMpeg to combine all these assets into the final video

I learned a lot along the way and it’s still one of my favorite projects still because it allowed me to leverage my programming skills to break into a weird YouTube niche. I believe that I could’ve gotten the channel more established than this if YouTube didn’t change their policies regarding automated content. This was one of the projects that affirmed my love for automation especially if it’s in a competitive environment.

Back to Home