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.
I'm a student from Austria. I like to code random projects like this in my free time.
Note
There is an installation of FFMPEG via WinGet, although I couldn't get it to work.
- PYTHON 3.9
- FFMPEG (Chocolatey ->
choco install ffmpeg-full
) - YT-DLP
- stable-ts (pip ->
pip install stable-ts
) - openai-whisper (pip ->
pip install openai-whisper
) - torch (pip ->
pip install torch
)
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()
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)
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.
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
- OkHTTP
- Apache License, Version 2.0
- Gson
- Apache License, Version 2.0
- JavaFaker
- Apache License, Version 2.0
- Java-TTS
- None
- Ffmpeg wrapper
- BSD 2-Clause "Simplified" License
- Slf4j
- MIT License
- PyTorch
- OpenAI-Whisper
- MIT License
- PYTHON 3.9
- FFMPEG
- GNU Lesser General Public License (LGPL) version 2.1
- YT-DLP
- The UnLicense