Skip to content

gavink97/reddit-shorts-generator

Repository files navigation

reddit-shorts-gh-demo.mp4

Reddit Shorts Generator

Generate Short-form media from UGC content from the worst website on the internet


Table of contents

Why this project

I started this project after being inspired by this video.

It was mid December and I had just gotten absolutely crushed in my first technical interview, so I wanted to build something simple to regain confidence.

Features

  • Create Short-form media from UGC content from the worst website on the internet.
  • Upload videos directly to YouTube via the YouTube API.
  • Automatically generate captions for your videos using Open AI Whisper.
  • Videos are highly customizable and render blazingly fast with FFMPEG.
  • Utilizes SQLite to avoid creating duplicate content.

Installation

Reddit Shorts can run independently but if you want to upload shorts automatically to YouTube or TikTok you must install the TikTok Uploader and set up the YouTube Data API respectively.

Additionally, install the reddit shorts repo in the root directory of the project as shown in the file tree.

File tree

├── client_secrets.json
├── cookies.txt
├── [reddit-shorts]
├── resources
│   ├── footage
│   └── music
├── tiktok-uploader
├── tiktok_tts.txt
└── youtube_tts.txt

Optional

Build source

Because OpenAi's Whisper is only compatible with Python 3.8 - 3.11 only use those versions of python.

mkdir reddit-shorts
gh repo clone gavink97/reddit-shorts-generator reddit-shorts
pip install -e reddit-shorts

Install dependencies

This package requires ffmpeg fonts-liberation to be installed.

This repository utilizes pillow to create reddit images, so make sure to uninstall PIL if you have it installed

Config

If your music / footage directory is different from the file tree configure the path inside config.py.

If you are creating videos for TikTok or YouTube and wish to have some custom tts at the end of the video, make sure you create tiktok_tts.txt or youtube_tts.txt.

Getting Started

shorts is the command line interface for the project.

Simply run shorts -p platform to generate a youtube short and automatically upload it.

shorts -p youtube

it should be noted that the only supported platform is youtube at the moment

Making it your own

Customize your shorts with FFMPG inside create_short.py.

Contributing

All contributions are welcome!

Roadmap

  • Standalone video exports
  • TikTok Support

Star History

Star History Chart