Change where sources are located

Makes things a little more organized, but it's a breaking change
This commit is contained in:
Chev 2026-01-26 17:34:42 -08:00
parent aad0824bd6
commit 72aba68200
Signed by: chev2
GPG key ID: 0B212D6AED495EC9
11 changed files with 23 additions and 17 deletions

16
.gitignore vendored
View file

@ -25,14 +25,14 @@ recodevideofiles.py
*.bmp
# Repository-specific - only allow these video and audio sources
!input_video_sources/DOOR STUCK! DOOR STUCK!.mp4
!input_video_sources/FUS RO DAH!!!.mp4
!input_video_sources/Me at the zoo.mp4
!input_audio_sources/BOOM.mp3
!input_audio_sources/Bruh Sound Effect #2.mp3
!input_audio_sources/Damn Son.mp3
!input_image_sources/troll-face.jpg
!input_image_sources/tennis-ball-bird.jpg
!input/video/DOOR STUCK! DOOR STUCK!.mp4
!input/video/FUS RO DAH!!!.mp4
!input/video/Me at the zoo.mp4
!input/audio/BOOM.mp3
!input/audio/Bruh Sound Effect #2.mp3
!input/audio/Damn Son.mp3
!input/image/troll-face.jpg
!input/image/tennis-ball-bird.jpg
# Linux
.directory

View file

@ -3,7 +3,7 @@ Generates an output video with overlayed audio and effects using a list of audio
## How it works
Here's how it works:
1. Gets all sources to use from the `input_video_sources/`, `input_audio_sources/` and `input_image_sources/` directories. This is where you put your sources.
1. Gets all sources to use from the `input/video/`, `input/audio/` and `input/image/` directories. This is where you put your sources.
2. Gets a seed for the random number generator, which can be used if a user wants to re-generate the same exact video again.
3. Chooses _n_ random videos where _n_ is the number of videos the user wants to merge into the final results (e.g. if you want to merge 40 different videos, it chooses 40 random videos). The script will first to attempt to avoid duplicate videos. If the chosen video amount is higher than the available videos, then the script will add duplicate videos to meet that amount.
4. Applies a bunch of random effects to the video files, which include trimming the video to be a random short length, mirroring the video, speeding it up or slowing it down, reversing the video, as well as other effects.
@ -37,9 +37,9 @@ Please take a look at the **requirements** above before following these steps. *
1. Download the GitHub repo (click the green 'code' button, then 'Download ZIP') and extract it somewhere.
2. Put a list of desired sources into their respective directories:
- Videos in `input_video_sources/`
- Sounds in `input_audio_sources/`
- Images in `input_image_sources/`
- Videos in `input/video/`
- Sounds in `input/audio/`
- Images in `input/image/`
3. Run the script, and choose a seed if you want to reproduce the same video later. Otherwise, type 'any' to choose a random seed.
4. Choose the amount of videos you want the script to merge together to produce the final result.
5. The script will do the rest, and generate the final video in the root directory, which will be formatted as `result_seed-<seed>_<number-of-videos>_<effects-enabled>.mp4`.

View file

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View file

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

16
main.py
View file

@ -14,13 +14,19 @@ from tqdm import tqdm
"""
TODO:
try to overlap videos more and distort them
spread out audio duplication a bit, so they don't end up directly next to one another
"""
VIDEO_SOURCE_FOLDER = "input_video_sources"
AUDIO_SOURCE_FOLDER = "input_audio_sources"
IMAGE_SOURCE_FOLDER = "input_image_sources"
# Legacy directory paths, warn the user about them
if path.exists("input_video_sources") \
or path.exists("input_audio_sources") \
or path.exists("input_image_sources"):
print("WARNING: You are using the legacy input source folders input_video_sources, input_audio_sources, and/or input_image_sources.")
print("You must move your sources to input/video, input/audio and input/image for them to work again.")
print("")
VIDEO_SOURCE_FOLDER = "input/video"
AUDIO_SOURCE_FOLDER = "input/audio"
IMAGE_SOURCE_FOLDER = "input/image"
videoFiles = [VIDEO_SOURCE_FOLDER + "/" + vid for vid in listdir(VIDEO_SOURCE_FOLDER)]
audioFiles = [AUDIO_SOURCE_FOLDER + "/" + vid for vid in listdir(AUDIO_SOURCE_FOLDER)]