diff --git a/.gitignore b/.gitignore index f38ea6c..ff4c7ab 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/README.md b/README.md index f522e4c..8fa23f4 100644 --- a/README.md +++ b/README.md @@ -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-__.mp4`. diff --git a/input_audio_sources/BOOM.mp3 b/input/audio/BOOM.mp3 similarity index 100% rename from input_audio_sources/BOOM.mp3 rename to input/audio/BOOM.mp3 diff --git a/input_audio_sources/Bruh Sound Effect #2.mp3 b/input/audio/Bruh Sound Effect #2.mp3 similarity index 100% rename from input_audio_sources/Bruh Sound Effect #2.mp3 rename to input/audio/Bruh Sound Effect #2.mp3 diff --git a/input_audio_sources/Damn Son.mp3 b/input/audio/Damn Son.mp3 similarity index 100% rename from input_audio_sources/Damn Son.mp3 rename to input/audio/Damn Son.mp3 diff --git a/input_image_sources/tennis-ball-bird.jpg b/input/image/tennis-ball-bird.jpg similarity index 100% rename from input_image_sources/tennis-ball-bird.jpg rename to input/image/tennis-ball-bird.jpg diff --git a/input_image_sources/troll-face.jpg b/input/image/troll-face.jpg similarity index 100% rename from input_image_sources/troll-face.jpg rename to input/image/troll-face.jpg diff --git a/input_video_sources/DOOR STUCK! DOOR STUCK!.mp4 b/input/video/DOOR STUCK! DOOR STUCK!.mp4 similarity index 100% rename from input_video_sources/DOOR STUCK! DOOR STUCK!.mp4 rename to input/video/DOOR STUCK! DOOR STUCK!.mp4 diff --git a/input_video_sources/FUS RO DAH!!!.mp4 b/input/video/FUS RO DAH!!!.mp4 similarity index 100% rename from input_video_sources/FUS RO DAH!!!.mp4 rename to input/video/FUS RO DAH!!!.mp4 diff --git a/input_video_sources/Me at the zoo.mp4 b/input/video/Me at the zoo.mp4 similarity index 100% rename from input_video_sources/Me at the zoo.mp4 rename to input/video/Me at the zoo.mp4 diff --git a/main.py b/main.py index 91e807a..a9907a2 100644 --- a/main.py +++ b/main.py @@ -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)]