This Raspberry Pi Automatically Generates YouTube Videos

Amir Ali Hashemi used a Raspberry Pi 400 computer to automatically generate videos for his YouTube channel.

Those of us who write for a living are currently debating just how much we should fear AI-writers like ChatGPT. That and several other deep learning models have proven to be quite capable of producing written content — at least on topics that aren't technical in nature. Artists are facing a similar challenge, as AI art generation is so popular that it is being used for memes. But as it turns out, AI isn't even necessary for automatic YouTube video creation, as proven by Amir Ali Hashemi's Raspberry Pi-based YouTube video generator.

This system takes advantage of a tactic that many "content creators" already utilize: stealing content from Reddit. From BuzzFeed journalists to TikTok influencers with millions of followers, many people take the easy route of grabbing all of their content from Reddit. They look for popular posts, then post the top comments. Hashemi's system does the same thing, but without any human oversight. It automatically scrapes Reddit and then generates a video (complete with voice-over) ready for upload to YouTube.

Hashemi's project started when he received a Raspberry Pi 400 from his mother as a birthday gift. That model puts the hardware of a Raspberry Pi into a keyboard enclosure. It also comes with a mouse and power supply, so the user only needs to connect a monitor to get up and running. Hashemi studies artificial intelligence at school and applied that skill set to this project. This didn't require the implementation of AI, but Hashemi's prior experience was undoubtedly helpful.

One of Hashemi's automatically generated videos

First, the Raspberry Pi runs PRAW (Python Reddit API Wrapper) to find the current hottest posts. It takes a screenshot of the post (including the title and main image, if applicable) and screenshots of the top 10 comments. The Raspberry Pi then uses the Amazon Web Service (AWS) Polly text-to-speech service to generate narration of the screenshots. Next, the Raspberry Pi uses the Moviepy library to generate a video using the screenshots for visuals, the narration audio, and generic royalty-free background music. Finally, the Raspberry Pi automatically uploads the video to Hashemi's YouTube channel.

This isn't a groundbreaking concept and many YouTube channels consist entirely of videos generated in this manner. But it is interesting to see how Hashemi was able to accomplish this using such affordable hardware. The monitor isn't even necessary and Hashemi could generate video after video using only the $100 Raspberry Pi 400.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles