Skip to content

Automated bot to generate content for various social media platforms

License

Notifications You must be signed in to change notification settings

Integr-0/ContentAutomation

Repository files navigation

YT_TRANS.png

Content Automation

Table of Contents

About

Project

Automatically generates clips of a length of around 30 seconds. Fills those clips with Chuck Norris jokes, and jokes from a joke-api. Uses background Videos in -mp4 format. Adds subtitles automatically. Perfect for platforms like TikTok and YouTube-shorts.

Me

I'm a student from Austria. I like to code random projects like this in my free time.

Requirements

External

Note

There is an installation of FFMPEG via WinGet, although I couldn't get it to work.

Python-Lib

  • stable-ts (pip -> pip install stable-ts)
  • openai-whisper (pip -> pip install openai-whisper)
  • torch (pip -> pip install torch)

Getting started

Setting up the virtual environment

Caution

Python 3.9.0 is Required

Create a new Python venv (or use your own Python) and get the path to the "python.exe" it uses. Add it in the .venvPath()

Configuring the Runner and running it

Caution

Make sure you have all tools installed, and u have the correct paths

Clone this repo and open the Main.kt file and edit the execution.settings.

val settings = SettingsBuilder()
  .venvPath("C:\\Users\\erikr\\Desktop\\Projects\\ContentAutomation\\venv\\Scripts\\python.exe")
  .ffmpegPath("C:\\ProgramData\\chocolatey\\lib\\ffmpeg-full\\tools\\ffmpeg\\bin\\ffmpeg.exe")
  .probePath("C:\\ProgramData\\chocolatey\\lib\\ffmpeg-full\\tools\\ffmpeg\\bin\\ffprobe.exe")
  .videoAmount(1)
  .perVideo(5)
  .outro("Follow us for more!")
  .backVids(listOf("Air_Parkour", "Hypixel_Parkour", "Spiral_Parkour", "Scenic_Parkour"))
  .contentSource {
    Generator.readJokeAPI()
  }
  .randomColor()
  .build()

Run the main() method (via Intellij or your IDE)

Downloading external content

FileUtils.downloadYT("https://www.youtube.com/watch?v=Pt5_GSKIWQM", "Hypixel_Parkour")
FileUtils.downloadYT("https://www.youtube.com/watch?v=2VpG0WS4uCo", "Spiral_Parkour")
FileUtils.downloadYT("https://www.youtube.com/watch?v=JlPEb6WNuDI", "Scenic_Parkour")

These are 3 examples of downloading a YouTube video and saving is under a name.

Grabbing the finished product

The output directory of the bot is: ./entries/saves Outputs are in the following format:

<day>-<month>-<year>-<second>-<minute>-<hour>_<video_group_index>-final.mp4

For example:

5-2-2024-16-22-8_2-final.mp4

This means that:

  • Day: 5th
  • Month: 2nd
  • Year: 2024
  • Second: 16
  • Minute: 22
  • Hour: 8
  • Index of Group: 2

Dependencies

Kotlin

Python

External