update this code with this section: # Third party imports
import os
from pathlib import Path, WindowsPath
import time
import ffmpeg
import json
import tomlkit
import hashlib
import numpy as np
from moviepy.editor import VideoFileClip, concatenate_videoclips
import subprocess
import ctypes
from ctypes import wintypes
Local imports
from utils.console import print_step, print_substep
os.makedirs(self.merge_folder, exist_ok=True)
print_step(f"Looking for videos in: {self.results_folder}")
print_step(f"Current mode: {self.config['merger']['mode']}")
print_step(f"Current status: {self.config['merger']['status']}")
self.processed_videos = self.load_processed_videos()
def get_config_hash(self):
"""Get hash of current config file to detect changes"""
try:
with open("merger_config.toml", "rb") as f:
return hashlib.md5(f.read()).hexdigest()
except FileNotFoundError:
return None
def check_config_changed(self):
"""Check if config file has been modified"""
current_hash = self.get_config_hash()
if current_hash != self.config_hash:
print_step("Config file changed! Reloading settings...")
self.config = self.load_config()
self.config_hash = current_hash
self.results_folder = self.config['paths']['source_folder']
self.merge_folder = self.config['paths']['merge_folder']
self.target_duration = self.config['merger']['target_duration'] * 60
print_step(f"New settings loaded:")
print_substep(f"Mode: {self.config['merger']['mode']}")
print_substep(f"Status: {self.config['merger']['status']}")
print_substep(f"Target duration: {self.config['merger']['target_duration']} minutes")
if self.config['merger']['mode'] == 'specific':
print_substep(f"Specific subreddit: {self.config['merger']['specific_subreddit']}")
return True
return False
def check_status(self):
"""Check current processing status"""
self.check_config_changed()
status = self.config['merger']['status']
if status == "paused":
print_step("Processing is paused. Waiting for resume...")
while self.config['merger']['status'] == "paused":
time.sleep(10) # Check every 10 seconds
self.check_config_changed()
print_step("Processing resumed!")
return True
elif status == "stopping":
print_step("Stop signal received. Finishing current task...")
return False
return True
def wait_with_status_check(self, minutes):
"""Wait specified minutes while checking for status changes"""
print_step(f"Waiting {minutes} minutes before next check...")
for _ in range(minutes):
if not self.check_status(): # Stop if requested
return False
time.sleep(60) # Sleep for 1 minute
if self.check_config_changed():
print_step("Config changed during wait. Starting new cycle...")
return True
return True
def load_processed_videos(self):
"""Load list of already processed videos"""
try:
if os.path.exists(self.processed_videos_file):
with open(self.processed_videos_file, 'r') as f:
return json.load(f)
return []
except Exception as e:
print_substep(f"Error loading processed videos: {str(e)}")
return []
def save_processed_videos(self):
"""Save list of processed videos"""
try:
with open(self.processed_videos_file, 'w') as f:
json.dump(self.processed_videos, f)
except Exception as e:
print_substep(f"Error saving processed videos: {str(e)}")
def load_config(self):
"""Load configuration from toml file"""
try:
with open("merger_config.toml", "r", encoding="utf-8") as f:
return tomlkit.load(f)
except FileNotFoundError:
print_step("Config file not found. Creating default config...")
self.create_default_config()
return self.load_config()
def create_default_config(self):
"""Create default configuration file"""
doc = tomlkit.document()
merger = tomlkit.table()
merger.add("mode", "fastest")
merger.add("specific_subreddit", "AmItheAsshole+relationship_advice+confession+tifu")
merger.add("check_interval", 30)
merger.add("target_duration", 10)
merger.add("auto_process", True)
merger.add("status", "running")
doc.add("merger", merger)
paths = tomlkit.table()
paths.add("source_folder", r"C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results")
paths.add("merge_folder", "MergeVideo")
doc.add("paths", paths)
processing = tomlkit.table()
processing.add("delete_source", False)
processing.add("output_format", "mp4")
processing.add("safe_mode", True)
processing.add("finish_current_before_pause", True)
doc.add("processing", processing)
with open("merger_config.toml", "w", encoding="utf-8") as f:
f.write(tomlkit.dumps(doc))
def get_video_duration(self, video_path):
"""Get duration of video in seconds using ffmpeg"""
try:
probe = ffmpeg.probe(video_path)
duration = float(probe['streams'][0]['duration'])
print_substep(f"Duration of {os.path.basename(video_path)}: {duration:.2f} seconds")
return duration
except Exception as e:
print_substep(f"Error getting duration: {str(e)}")
return 0
def find_video_pairs(self, subreddit_folder):
"""Find matching pairs of videos (_out.mp4 and .mp4) in a subreddit folder"""
try:
folder_path = os.path.join(self.results_folder, subreddit_folder)
print_step(f"Scanning folder: {folder_path}")
if not os.path.exists(folder_path):
print_substep(f"Folder not found: {folder_path}")
return {}, 0
video_pairs = {}
total_duration = 0
# First find all subtitled versions (_out.mp4) and get their durations
for file in os.listdir(folder_path):
if file.endswith('_out.mp4'): # Only look for subtitled versions
base_name = file.replace('_out.mp4', '')
if base_name not in video_pairs:
video_pairs[base_name] = {
'normal': None,
'subtitled': None,
'duration': 0
}
full_path = os.path.join(folder_path, file)
video_pairs[base_name]['subtitled'] = full_path
duration = self.get_video_duration(full_path)
video_pairs[base_name]['duration'] = duration
total_duration += duration
# Now find matching normal versions but don't add their duration
for file in os.listdir(folder_path):
if file.endswith('.mp4') and not file.endswith('_out.mp4'):
base_name = file.replace('.mp4', '')
if base_name in video_pairs:
video_pairs[base_name]['normal'] = os.path.join(folder_path, file)
# Print found pairs and total duration
print_step(f"Found video pairs in {subreddit_folder}:")
complete_pairs = 0
for base_name, pair in video_pairs.items():
if pair['normal'] and pair['subtitled']:
complete_pairs += 1
print_substep(f"Pair {complete_pairs}: {base_name}")
print_substep(f" Normal: {os.path.basename(pair['normal'])}")
print_substep(f" Subtitled: {os.path.basename(pair['subtitled'])}")
print_substep(f" Duration: {pair['duration']:.2f} seconds")
print_substep(f"Total complete pairs: {complete_pairs}")
print_substep(f"Total duration: {total_duration:.2f} seconds")
return video_pairs, total_duration
except Exception as e:
print_substep(f"Error scanning folder: {str(e)}")
return {}, 0
def find_best_combination(self):
"""Find best combination of videos for fastest 10 minutes"""
available_pairs = []
total_duration = 0
# Track remaining time properly
for subreddit in os.listdir(self.results_folder):
if os.path.isdir(os.path.join(self.results_folder, subreddit)):
pairs, folder_duration = self.find_video_pairs(subreddit)
total_duration += folder_duration
for name, pair in pairs.items():
if pair['normal'] and pair['subtitled']:
if name not in self.processed_videos:
available_pairs.append({
'name': name,
'subreddit': subreddit,
'duration': pair['duration'], # This is only from the _out.mp4 version
'files': pair
})
if not available_pairs:
print_step("No unprocessed videos found!")
return None
# Sort by duration (longest first for efficient packing)
available_pairs.sort(key=lambda x: x['duration'], reverse=True)
selected_pairs = []
current_duration = 0
remaining_time = self.target_duration
# Try to get as close to target_duration as possible
for pair in available_pairs:
if current_duration + pair['duration'] <= self.target_duration:
selected_pairs.append(pair)
current_duration += pair['duration']
remaining_time = self.target_duration - current_duration
print_substep(f"\nAdded: {pair['name']} ({pair['duration']:.2f}s) from {pair['subreddit']}")
print_substep(f"Current total duration: {current_duration:.2f}s")
print_substep(f"Still need {remaining_time:.2f}s to reach target")
self.processed_videos.append(pair['name'])
if current_duration >= self.target_duration:
break
return selected_pairs
def process_specific_folder(self):
"""Process videos from specific folder"""
subreddit = self.config['merger']['specific_subreddit']
print_step(f"Processing specific folder: {subreddit}")
pairs, duration = self.find_video_pairs(subreddit)
if not pairs:
print_step("No videos found in specified folder!")
return None
selected_pairs = []
current_duration = 0
for name, pair in pairs.items():
if name not in self.processed_videos and pair['normal'] and pair['subtitled']:
if current_duration + pair['duration'] <= self.target_duration:
selected_pairs.append({
'name': name,
'subreddit': subreddit,
'duration': pair['duration'],
'files': pair
})
current_duration += pair['duration']
return selected_pairs if selected_pairs else None
def process_videos(self):
"""Process videos based on current mode"""
# Check for config changes before processing
if self.check_config_changed():
if self.config['processing']['safe_mode']:
print_step("Config changed during operation. Restarting process...")
return None
mode = self.config['merger']['mode']
if mode == "fastest":
return self.find_best_combination()
elif mode == "specific":
return self.process_specific_folder()
else:
print_step(f"Unknown mode: {mode}")
return None
def main():
compiler = VideoCompiler()
print_step("Monitoring for config changes...")
print_substep("You can modify merger_config.toml at any time to change settings")
print_substep("Set status to 'paused' to pause, 'running' to resume, or 'stopping' to stop")
code
first_run = True # Add flag for first run
while True:
try:
# Reset processed videos list at start of each cycle
compiler.processed_videos = []
compiler.save_processed_videos() # Save empty list to clear file
# Check status first
if not compiler.check_status():
print_step("Stopping process...")
break
# Check if auto-processing is still enabled
compiler.check_config_changed()
if not compiler.config['merger']['auto_process']:
print_step("Auto-processing disabled in config. Exiting.")
break
selected_videos = compiler.process_videos()
if selected_videos:
print_step("\nVideos Selected for Compilation:")
total_duration = 0
for video in selected_videos:
print_substep(f"Video: {video['name']}")
print_substep(f"From: {video['subreddit']}")
print_substep(f"Duration: {video['duration']:.2f} seconds")
print_substep("-" * 50)
total_duration += video['duration']
print_step(f"Total Compilation Duration: {total_duration:.2f} seconds")
# Here we'll need to hold selected_pairs and do the video processing
selected_pairs = selected_videos # This is your selected videos for processing
# Only wait if not first run
if not first_run:
check_interval = compiler.config['merger']['check_interval']
if not compiler.wait_with_status_check(check_interval):
break
else:
first_run = False # Mark first run complete
# Store the processed videos
for pair in selected_pairs:
compiler.processed_videos.append(pair['name'])
compiler.save_processed_videos()
print_substep(f"\nFinal compilation duration: {total_duration:.2f} seconds")
remaining_time = compiler.target_duration - total_duration
if remaining_time > 0:
print_substep(f"Could not find enough videos to fill remaining {remaining_time:.2f} seconds")
else:
print_step("Not enough unprocessed videos for compilation.")
check_interval = compiler.config['merger']['check_interval']
if not compiler.wait_with_status_check(check_interval):
break
except Exception as e:
print_step(f"Error occurred: {str(e)}")
print_step("Waiting 5 minutes before retrying...")
if not compiler.wait_with_status_check(5):
break
if name == "main":
main(), heres the section, def find_best_combination(self):
"""Find best combination of videos for fastest 10 minutes"""
available_pairs = []
code
for subreddit in os.listdir(self.results_folder):
if os.path.isdir(os.path.join(self.results_folder, subreddit)):
pairs, _ = self.find_video_pairs(subreddit)
for name, pair in pairs.items():
if pair['normal'] and pair['subtitled']:
if name not in self.processed_videos:
available_pairs.append({
'name': name,
'subreddit': subreddit,
'duration': pair['duration'],
'files': pair
})
if not available_pairs:
print_step("No unprocessed videos found!")
return None
available_pairs.sort(key=lambda x: x['duration'], reverse=True)
selected_pairs = []
current_duration = 0
# Add videos until we hit or exceed 10 minutes
for pair in available_pairs:
selected_pairs.append(pair)
current_duration += pair['duration']
print_substep(f"\nAdded: {pair['name']} ({pair['duration']:.2f}s) from {pair['subreddit']}")
print_substep(f"Current total duration: {current_duration:.2f}s")
self.processed_videos.append(pair['name'])
if current_duration >= self.target_duration:
# Stop here even if the last video makes us go over 10 minutes
break
if selected_pairs:
self.save_processed_videos()
print_substep(f"\nFinal compilation duration: {current_duration:.2f} seconds")
return selected_pairs
Assistant
It looks like you would like to update a section of the existing VideoCompiler class with a new implementation of the find_best_combination method. Below, I've integrated your revised find_best_combination method into the class while keeping the rest of the original code intact. You can replace the existing method in your code with this one:
python
def find_best_combination(self):
"""Find best combination of videos for fastest 10 minutes"""
available_pairs = []
# Find all unprocessed video pairs
for subreddit in os.listdir(self.results_folder):
if os.path.isdir(os.path.join(self.results_folder, subreddit)):
pairs, _ = self.find_video_pairs(subreddit)
for name, pair in pairs.items():
if pair['normal'] and pair['subtitled']:
if name not in self.processed_videos:
available_pairs.append({
'name': name,
'subreddit': subreddit,
'duration': pair['duration'],
'files': pair
})
if not available_pairs:
print_step("No unprocessed videos found!")
return None
# Sort the available pairs by duration (longest first for efficient packing)
available_pairs.sort(key=lambda x: x['duration'], reverse=True)
selected_pairs = []
current_duration = 0
# Add videos until we hit or exceed the target_duration
for pair in available_pairs:
selected_pairs.append(pair)
current_duration += pair['duration']
print_substep(f"\nAdded: {pair['name']} ({pair['duration']:.2f}s) from {pair['subreddit']}")
print_substep(f"Current total duration: {current_duration:.2f}s")
self.processed_videos.append(pair['name'])
if current_duration >= self.target_duration:
# Stop here even if the last video makes us go over target_duration
break
if selected_pairs:
self.save_processed_videos()
print_substep(f"\nFinal compilation duration: {current_duration:.2f} seconds")
return selected_pairs
User
provide me with the whole code file with updates
Assistant
Certainly! Below is the complete code for the VideoCompiler class with the updated find_best_combination method integrated. I've included the entire code as you provided earlier, along with the modifications.
python
User
now add this class update in the file you just updated for me, write out the whole code with all updtaes
Assistant
Sure! Below is the complete code for the VideoCompiler class with all the necessary updates integrated, including the revised find_best_combination method as requested. The entire code is written out for your convenience.
python
User
now add this class update in the file you just updated for me, write out the whole code with all updates: def splice_video(self, video_pair):
"""Create spliced version with clean intro and main content"""
try:
print_substep(f"Processing video: {video_pair['name']}")
code
# Load both versions
clean_video = VideoFileClip(video_pair['files']['normal'])
subtitled_video = VideoFileClip(video_pair['files']['subtitled'])
# Detect title end using audio analysis
title_end = self.detect_title_end(clean_video)
print_substep(f"Title ends at: {title_end:.2f}s")
# Get clean intro after title from normal version
clean_portion = clean_video.subclip(title_end)
# Get main content from subtitled version starting at same point
subtitled_portion = subtitled_video.subclip(title_end)
# Add 1 second crossfade between portions
clean_portion = clean_portion.crossfadein(1.0)
subtitled_portion = subtitled_portion.crossfadein(1.0)
# Combine with transition
final = concatenate_videoclips([clean_portion, subtitled_portion],
method="compose")
# Clean up source clips
clean_video.close()
subtitled_video.close()
return final
except Exception as e:
print_substep(f"Error splicing video: {str(e)}")
if 'clean_video' in locals():
clean_video.close()
if 'subtitled_video' in locals():
subtitled_video.close()
return None
def detect_title_end(self, video):
"""Detect when title reading ends based on audio analysis"""
try:
# Extract audio
audio = video.audio
code
Assistant
Certainly! Below is the comprehensive code for the VideoCompiler class with all updates integrated, including the newly added splice_video, detect_title_end, and merge_videos methods. The structure has been modified to accommodate the new functionality as you specified.
python
User
what dependencies do i need for this code to work?
Assistant
To run the provided VideoCompiler code successfully, you will need several dependencies, both for video processing and for handling configuration files. Below is a list of necessary Python libraries along with installation instructions:
Required Python Libraries
moviepy: For video editing and processing.
ffmpeg-python: A wrapper for FFmpeg, which is used for handling video files.
numpy: Required for numerical operations, especially in audio analysis.
tomlkit: For reading and writing TOML configuration files.
json: Already included in Python's standard library for working with JSON.
hashlib: Also included in the standard library for creating hashes.
Installation Instructions
You can install the necessary Python packages using pip. Run the following commands in your terminal or command prompt:
bash
pip install moviepy ffmpeg-python numpy tomlkit
Additional System Requirements
FFmpeg: Since moviepy relies on FFmpeg for handling video files, make sure you have FFmpeg installed on your system. You can download it from FFmpeg's official website and follow the installation instructions for your operating system.
After installation, ensure that the FFmpeg executable is in your system's PATH so that it can be called from your Python scripts.
Extract the files and copy the bin folder path (where ffmpeg.exe is located).
Add the path to your system PATH variable:
Right-click on This PC or Computer, and select Properties.
Click on Advanced system settings, then Environment Variables.
Under System variables, find and select the Path variable, then click Edit.
Add the path to the bin directory where ffmpeg.exe is located.
Additional Considerations
Python Version: Make sure you are using Python 3.6 or later as the libraries mentioned are generally compatible with these versions.
Operating System: Ensure compatibility with your OS (Windows, macOS, or Linux) since the installation of FFmpeg may vary slightly by platform.
After installing the dependencies and setting up FFmpeg, you should be able to run the VideoCompiler code successfully. If you run into any issues, make sure to check the library documentation for troubleshooting information!
User
how do we see if its functioning correctly: continue to be late for everything
Normal: AITA for not letting my in-laws
continue to be late for everything.mp4
Subtitled: AITA for not letting my in-lawscontinue to be late for everything_out.mp4
Duration: 95.01 seconds
Pair 9: AITA for not taking my step
daughter on vacation
Normal: AITA for not taking my step
daughter on vacation.mp4
Subtitled: AITA for not taking my step
daughter on vacation_out.mp4
Duration: 105.01 seconds
Pair 10: AITA for refusing to label my
wedding cake as vegan because a guest felt
tricked
Normal: AITA for refusing to label my
wedding cake as vegan because a guest felt
tricked.mp4
Subtitled: AITA for refusing to label my
wedding cake as vegan because a guest felt
tricked_out.mp4
Duration: 80.00 seconds
Pair 11: AITA for refusing to let my
brother bring his girlfriend to
Thanksgiving after she disrespected my wife Normal: AITA for refusing to let my
brother bring his girlfriend to
Thanksgiving after she disrespected my
wife.mp4
Subtitled: AITA for refusing to let my
brother bring his girlfriend to
Thanksgiving after she disrespected my
wife_out.mp4
Duration: 119.02 seconds
Pair 12: AITA for telling my bfs aunt I
could call the cops on her after she stole
my Coachella ticket
Normal: AITA for telling my bfs aunt I
could call the cops on her after she stole
my Coachella ticket.mp4
Subtitled: AITA for telling my bfs aunt I
could call the cops on her after she stole
my Coachella ticket_out.mp4
Duration: 176.01 seconds
Pair 13: AITAH for refusing to hand over mygrandmothers jewelry to my cousin who was
promised it first
Normal: AITAH for refusing to hand over mygrandmothers jewelry to my cousin who was
promised it first.mp4
Subtitled: AITAH for refusing to hand overmy grandmothers jewelry to my cousin who
was promised it first_out.mp4
Duration: 31.92 seconds
Pair 14: I anonymously reported domestic
abuse in my building
Normal: I anonymously reported domestic
abuse in my building.mp4
Subtitled: I anonymously reported domesticabuse in my building_out.mp4
Duration: 41.00 seconds
Pair 15: I broke my arm going down on my
friend with benefits
Normal: I broke my arm going down on my
friend with benefits.mp4
Subtitled: I broke my arm going down on myfriend with benefits_out.mp4
Duration: 4.04 seconds
Pair 16: Inappropriate Neighborhood Comment- Some Revelations should Stay in Mouths
Normal: Inappropriate Neighborhood Comment- Some Revelations should Stay in
Mouths.mp4
Subtitled: Inappropriate Neighborhood
Comment - Some Revelations should Stay in
Mouths_out.mp4
Duration: 40.00 seconds
Pair 17: My mom caught my dad with a 16yo
and covered it up
Normal: My mom caught my dad with a 16yo
and covered it up.mp4
Subtitled: My mom caught my dad with a
16yo and covered it up_out.mp4
Duration: 174.01 seconds
Pair 18: My sister got pregnant 14 years
ago and our parents raised her son as theirown Weve never told him
Normal: My sister got pregnant 14 years
ago and our parents raised her son as theirown Weve never told him.mp4
Subtitled: My sister got pregnant 14 yearsago and our parents raised her son as theirown Weve never told him_out.mp4
Duration: 164.01 seconds
Pair 19: TIFU by forgetting that silence isthe father of all disaster when you have
kids or pets
Normal: TIFU by forgetting that silence isthe father of all disaster when you have
kids or pets.mp4
Subtitled: TIFU by forgetting that silenceis the father of all disaster when you havekids or pets_out.mp4
Duration: 132.00 seconds
Pair 20: TIFU By Joking About Getting a
Handie From My Partners Roommate
Normal: TIFU By Joking About Getting a
Handie From My Partners Roommate.mp4
Subtitled: TIFU By Joking About Getting a
Handie From My Partners Roommate_out.mp4
Duration: 142.00 seconds
Pair 21: TIFU by stripping in front of my
doctor
Normal: TIFU by stripping in front of my
doctor.mp4
Subtitled: TIFU by stripping in front of
my doctor_out.mp4
Duration: 91.02 seconds
Pair 22: TIFU I bit my daughter in my sleep Normal: TIFU I bit my daughter in my
sleep.mp4
Subtitled: TIFU I bit my daughter in my
sleep_out.mp4
Duration: 62.00 seconds
Pair 23: UPDATE 26M 3 Years with Fiancée
24F Shes got me paying for Her ENTIRE
Family Is this getting out of hand
Normal: UPDATE 26M 3 Years with Fiancée
24F Shes got me paying for Her ENTIRE
Family Is this getting out of hand.mp4
Subtitled: UPDATE 26M 3 Years with Fiancée24F Shes got me paying for Her ENTIRE
Family Is this getting out of hand_out.mp4
Duration: 154.02 seconds
Pair 24: Update How do I 49f move forward
after my daughter 22F hid her fathers
affair from me for two years
Normal: Update How do I 49f move forward
after my daughter 22F hid her fathers
affair from me for two years.mp4
Subtitled: Update How do I 49f move
forward after my daughter 22F hid her
fathers affair from me for two
years_out.mp4
Duration: 483.01 seconds
Pair 25: What can I 23M do to feel less
turned on by my girlfriend 21F
Normal: What can I 23M do to feel less
turned on by my girlfriend 21F.mp4
Subtitled: What can I 23M do to feel less
turned on by my girlfriend 21F_out.mp4
Duration: 110.00 seconds
Pair 26: WIBTA if I left my mom to fend forherself because she didnt buy me any food
Normal: WIBTA if I left my mom to fend forherself because she didnt buy me any
food.mp4
Subtitled: WIBTA if I left my mom to fend
for herself because she didnt buy me any
food_out.mp4
Duration: 160.00 seconds
Total complete pairs: 26
Total duration: 3312.97 seconds
Assistant
To verify that your video compilation system is functioning correctly, you can follow these steps based on the logs and output you provided. Here are the aspects you should inspect and validate:
1. Loading Configurations and Video Pairs
Ensure that the configuration file (merger_config.toml) loads correctly, and the paths for source_folder and merge_folder are accurate.
Check that the script is discovering video pairs as expected. The output should list pairs containing normal videos and their corresponding subtitled versions, with correct paths and durations.
2. Video Pair Detection
Verify that the script is correctly identifying all the video pairs in the specified folders. All pairs should be logged with their respective names, durations, and whether they are normal or subtitled.
The output logs should show confirmation of the number of complete pairs found and their total duration.
3. Video Selection for Compilation
Confirm that the algorithm for selecting videos operates as intended, adding videos until the target duration is met. The log should show which videos were added and how close the total duration is to the target.
Pay attention to the message indicating how much additional time is needed to reach the target duration after each addition.
4. Error Handling
The error messages related to audio analysis ("arrays to stack must be passed as a 'sequence' type such as list or tuple.") indicate there may be an issue in the detect_title_end method. Inspect the audio.to_soundarray() line to ensure it is retrieving the audio correctly; you may need to modify it to suit your audio data context, as to_soundarray() should be returning a proper NumPy array.
Verify that title detection doesn’t break the splicing process. If it does, you may want to implement fallback mechanisms or sanity checks.
5. Video Compilation Process
Ensure the process of splicing and merging videos is functioning without issues. The output log should indicate when each video is processed and spliced correctly.
The final video (e.g., compilation_<timestamp>.mp4) should be created with proper transitions and splices, as indicated by the named process in the merge_videos method.
6. Output Validation
Check that the merged video outputs correctly in the specified . Play the video to ensure that it has the intended content and meets quality standards.
User
im not a coder, how can you help me with this
Assistant
I understand that navigating code and debugging can be challenging, especially if you're not coming from a coding background. Here’s a step-by-step guide on how you can test and troubleshoot your video compilation system more simply, along with suggestions for how I can assist you further:
Step-by-Step Guide to Test the Code
Set Up Your Environment:
Ensure you have Python installed on your machine. You can download it from python.org.
Install the required libraries:
Open your command prompt (Windows) or terminal (macOS/Linux) and type the following commands one by one:
bash
pip install moviepy ffmpeg-python numpy tomlkit
Install FFmpeg following instructions appropriate for your operating system. Make sure you include it in your system PATH.
Prepare the Video Files:
Ensure that your video files are organized in folders as your script expects. You should have both normal video files (like file.mp4) and corresponding subtitled video files (like file_out.mp4) placed in the specified source_folder path in your merger_config.toml.
Run the Code:
Save the complete code provided earlier in a Python file, e.g., video_compiler.py.
Open your command prompt or terminal, navigate to the directory where your video_compiler.py file is saved, and run:
bash
python video_compiler.py
Monitor the Output:
Observe the output in the command prompt or terminal. Look for messages that indicate:
Video files are being detected.
Videos are being selected for compilation.
Any errors that occur while processing the videos.
Check Error Messages:
If you encounter specific error messages, note them down. For instance, if you see errors like "Error detecting title end", it’s essential to understand which part of the process isn't working.
How I Can Help You Further
Interpreting Errors:
User
it wont create the files on its own?
Assistant
The video compilation system you have set up is designed to process video files based on what it finds in the specified directories. However, there are a few conditions that must be met for it to create the output files successfully. Here’s a breakdown of how it works and why it might not be creating files on its own:
How the Code Works
Input Files: The script looks for pairs of normal MP4 files (like video.mp4) and their corresponding subtitled files (like video_out.mp4) in specified directories. Without these input files, the script cannot perform any processing or compilation.
Processing Logic:
The script scans the input directories specified in the configuration file (merger_config.toml).
It identifies video pairs, checks their durations, and selects videos based on the set criteria.
Once it has selected videos to compile, it attempts to splice those videos together and create a final output file.
Output File Creation: The output video file is created as part of the merge_videos method, which concatenates the selected video clips into one final video file.
Reasons Why Output Files Might Not Be Created
No Input Files Found:
If the script doesn't find any normal and subtitled video pairs, it won't create any output. Check that you have files named correctly and placed in the expected directories.
Video Processing Errors:
If an error occurs during the splicing or merging of files (e.g., issues with reading video files, audio detection errors), the script will not successfully create an output file.
Configuration Issues:
Ensure the merger_config.toml file has the correct paths for your source and merge directories and that those directories exist. If the paths are wrong or the folders don't exist, the script can't find the input files.
Script Stopping:
If the script encounters an unhandled exception, it may stop execution before reaching the point where it creates the output file.
Verifying Issues and Fixes
Check Your File Paths:
Open your merger_config.toml and ensure paths for source_folder and merge_folder are correct.
Finding Unprocessed Videos: The revised method iterates through the subreddit folders and checks for unprocessed videos (both normal and subtitled).
No Duration Check During Addition: The new logic adds videos to the selected list until it reaches or exceeds the target duration without filtering based on whether the video can fit within 10 minutes.
Handling of Processed Videos: It saves the processed video names consistently after selecting videos.
Complete Class with Updated Method
Here's the updated class with the new find_best_combination method incorporated:
python
class VideoCompiler:
# ... (rest of the existing class code remains unchanged)
def find_best_combination(self):
"""Find best combination of videos for fastest 10 minutes"""
available_pairs = []
# Find all unprocessed video pairs
for subreddit in os.listdir(self.results_folder):
if os.path.isdir(os.path.join(self.results_folder, subreddit)):
pairs, _ = self.find_video_pairs(subreddit)
for name, pair in pairs.items():
if pair['normal'] and pair['subtitled']:
if name not in self.processed_videos:
available_pairs.append({
'name': name,
'subreddit': subreddit,
'duration': pair['duration'],
'files': pair
})
if not available_pairs:
print_step("No unprocessed videos found!")
return None
# Sort the available pairs by duration (longest first for efficient packing)
available_pairs.sort(key=lambda x: x['duration'], reverse=True)
selected_pairs = []
current_duration = 0
# Add videos until we hit or exceed the target_duration
for pair in available_pairs:
selected_pairs.append(pair)
current_duration += pair['duration']
print_substep(f"\nAdded: {pair['name']} ({pair['duration']:.2f}s) from {pair['subreddit']}")
print_substep(f"Current total duration: {current_duration:.2f}s")
self.processed_videos.append(pair['name'])
if current_duration >= self.target_duration:
# Stop here even if the last video makes us go over target_duration
break
if selected_pairs:
self.save_processed_videos()
print_substep(f"\nFinal compilation duration: {current_duration:.2f} seconds")
return selected_pairs
# ... (rest of the existing class code remains unchanged)
Just replace the existing find_best_combination method with the updated version in your full VideoCompiler class code, and it should work as intended.
# Third party imports
import os
from pathlib import Path, WindowsPath
import time
import ffmpeg
import json
import tomlkit
import hashlib
import numpy as np
from moviepy.editor import VideoFileClip, concatenate_videoclips
import subprocess
import ctypes
from ctypes import wintypes
# Local imports
from utils.console import print_step, print_substep
class VideoCompiler:
def __init__(self):
self.config = self.load_config()
self.config_hash = self.get_config_hash()
self.results_folder = self.config['paths']['source_folder']
self.merge_folder = self.config['paths']['merge_folder']
self.target_duration = self.config['merger']['target_duration'] * 60 # convert to seconds
self.subreddit_durations = {}
self.processed_videos_file = "processed_videos.json"
os.makedirs(self.merge_folder, exist_ok=True)
print_step(f"Looking for videos in: {self.results_folder}")
print_step(f"Current mode: {self.config['merger']['mode']}")
print_step(f"Current status: {self.config['merger']['status']}")
self.processed_videos = self.load_processed_videos()
def get_config_hash(self):
"""Get hash of current config file to detect changes"""
try:
with open("merger_config.toml", "rb") as f:
return hashlib.md5(f.read()).hexdigest()
except FileNotFoundError:
return None
def check_config_changed(self):
"""Check if config file has been modified"""
current_hash = self.get_config_hash()
if current_hash != self.config_hash:
print_step("Config file changed! Reloading settings...")
self.config = self.load_config()
self.config_hash = current_hash
self.results_folder = self.config['paths']['source_folder']
self.merge_folder = self.config['paths']['merge_folder']
self.target_duration = self.config['merger']['target_duration'] * 60
print_step(f"New settings loaded:")
print_substep(f"Mode: {self.config['merger']['mode']}")
print_substep(f"Status: {self.config['merger']['status']}")
print_substep(f"Target duration: {self.config['merger']['target_duration']} minutes")
if self.config['merger']['mode'] == 'specific':
print_substep(f"Specific subreddit: {self.config['merger']['specific_subreddit']}")
return True
return False
def check_status(self):
"""Check current processing status"""
self.check_config_changed()
status = self.config['merger']['status']
if status == "paused":
print_step("Processing is paused. Waiting for resume...")
while self.config['merger']['status'] == "paused":
time.sleep(10) # Check every 10 seconds
self.check_config_changed()
print_step("Processing resumed!")
return True
elif status == "stopping":
print_step("Stop signal received. Finishing current task...")
return False
return True
def wait_with_status_check(self, minutes):
"""Wait specified minutes while checking for status changes"""
print_step(f"Waiting {minutes} minutes before next check...")
for _ in range(minutes):
if not self.check_status(): # Stop if requested
return False
time.sleep(60) # Sleep for 1 minute
if self.check_config_changed():
print_step("Config changed during wait. Starting new cycle...")
return True
return True
def load_processed_videos(self):
"""Load list of already processed videos"""
try:
if os.path.exists(self.processed_videos_file):
with open(self.processed_videos_file, 'r') as f:
return json.load(f)
return []
except Exception as e:
print_substep(f"Error loading processed videos: {str(e)}")
return []
def save_processed_videos(self):
"""Save list of processed videos"""
try:
with open(self.processed_videos_file, 'w') as f:
json.dump(self.processed_videos, f)
except Exception as e:
print_substep(f"Error saving processed videos: {str(e)}")
def load_config(self):
"""Load configuration from toml file"""
try:
with open("merger_config.toml", "r", encoding="utf-8") as f:
return tomlkit.load(f)
except FileNotFoundError:
print_step("Config file not found. Creating default config...")
self.create_default_config()
return self.load_config()
def create_default_config(self):
"""Create default configuration file"""
doc = tomlkit.document()
merger = tomlkit.table()
merger.add("mode", "fastest")
merger.add("specific_subreddit", "AmItheAsshole+relationship_advice+confession+tifu")
merger.add("check_interval", 30)
merger.add("target_duration", 10)
merger.add("auto_process", True)
merger.add("status", "running")
doc.add("merger", merger)
paths = tomlkit.table()
paths.add("source_folder", r"C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results")
paths.add("merge_folder", "MergeVideo")
doc.add("paths", paths)
processing = tomlkit.table()
processing.add("delete_source", False)
processing.add("output_format", "mp4")
processing.add("safe_mode", True)
processing.add("finish_current_before_pause", True)
doc.add("processing", processing)
with open("merger_config.toml", "w", encoding="utf-8") as f:
f.write(tomlkit.dumps(doc))
def get_video_duration(self, video_path):
"""Get duration of video in seconds using ffmpeg"""
try:
probe = ffmpeg.probe(video_path)
duration = float(probe['streams'][0]['duration'])
print_substep(f"Duration of {os.path.basename(video_path)}: {duration:.2f} seconds")
return duration
except Exception as e:
print_substep(f"Error getting duration: {str(e)}")
return 0
def find_video_pairs(self, subreddit_folder):
"""Find matching pairs of videos (_out.mp4 and .mp4) in a subreddit folder"""
try:
folder_path = os.path.join(self.results_folder, subreddit_folder)
print_step(f"Scanning folder: {folder_path}")
if not os.path.exists(folder_path):
print_substep(f"Folder not found: {folder_path}")
return {}, 0
video_pairs = {}
total_duration = 0
# First find all subtitled versions (_out.mp4) and get their durations
for file in os.listdir(folder_path):
if file.endswith('_out.mp4'): # Only look for subtitled versions
base_name = file.replace('_out.mp4', '')
if base_name not in video_pairs:
video_pairs[base_name] = {
'normal': None,
'subtitled': None,
'duration': 0
}
full_path = os.path.join(folder_path, file)
video_pairs[base_name]['subtitled'] = full_path
duration = self.get_video_duration(full_path)
video_pairs[base_name]['duration'] = duration
total_duration += duration
# Now find matching normal versions but don't add their duration
for file in os.listdir(folder_path):
if file.endswith('.mp4') and not file.endswith('_out.mp4'):
base_name = file.replace('.mp4', '')
if base_name in video_pairs:
video_pairs[base_name]['normal'] = os.path.join(folder_path, file)
# Print found pairs and total duration
print_step(f"Found video pairs in {subreddit_folder}:")
complete_pairs = 0
for base_name, pair in video_pairs.items():
if pair['normal'] and pair['subtitled']:
complete_pairs += 1
print_substep(f"Pair {complete_pairs}: {base_name}")
print_substep(f" Normal: {os.path.basename(pair['normal'])}")
print_substep(f" Subtitled: {os.path.basename(pair['subtitled'])}")
print_substep(f" Duration: {pair['duration']:.2f} seconds")
print_substep(f"Total complete pairs: {complete_pairs}")
print_substep(f"Total duration: {total_duration:.2f} seconds")
return video_pairs, total_duration
except Exception as e:
print_substep(f"Error scanning folder: {str(e)}")
return {}, 0
def find_best_combination(self):
"""Find best combination of videos for fastest 10 minutes"""
available_pairs = []
# Find all unprocessed video pairs
for subreddit in os.listdir(self.results_folder):
if os.path.isdir(os.path.join(self.results_folder, subreddit)):
pairs, _ = self.find_video_pairs(subreddit)
for name, pair in pairs.items():
if pair['normal'] and pair['subtitled']:
if name not in self.processed_videos:
available_pairs.append({
'name': name,
'subreddit': subreddit,
'duration': pair['duration'],
'files': pair
})
if not available_pairs:
print_step("No unprocessed videos found!")
return None
# Sort the available pairs by duration (longest first for efficient packing)
available_pairs.sort(key=lambda x: x['duration'], reverse=True)
selected_pairs = []
current_duration = 0
# Add videos until we hit or exceed the target_duration
for pair in available_pairs:
selected_pairs.append(pair)
current_duration += pair['duration']
print_substep(f"\nAdded: {pair['name']} ({pair['duration']:.2f}s) from {pair['subreddit']}")
print_substep(f"Current total duration: {current_duration:.2f}s")
self.processed_videos.append(pair['name'])
if current_duration >= self.target_duration:
# Stop here even if the last video makes us go over target_duration
break
if selected_pairs:
self.save_processed_videos()
print_substep(f"\nFinal compilation duration: {current_duration:.2f} seconds")
return selected_pairs
def process_specific_folder(self):
"""Process videos from specific folder"""
subreddit = self.config['merger']['specific_subreddit']
print_step(f"Processing specific folder: {subreddit}")
pairs, duration = self.find_video_pairs(subreddit)
if not pairs:
print_step("No videos found in specified folder!")
return None
selected_pairs = []
current_duration = 0
for name, pair in pairs.items():
if name not in self.processed_videos and pair['normal'] and pair['subtitled']:
if current_duration + pair['duration'] <= self.target_duration:
selected_pairs.append({
'name': name,
'subreddit': subreddit,
'duration': pair['duration'],
'files': pair
})
current_duration += pair['duration']
return selected_pairs if selected_pairs else None
def process_videos(self):
"""Process videos based on current mode"""
# Check for config changes before processing
if self.check_config_changed():
if self.config['processing']['safe_mode']:
print_step("Config changed during operation. Restarting process...")
return None
mode = self.config['merger']['mode']
if mode == "fastest":
return self.find_best_combination()
elif mode == "specific":
return self.process_specific_folder()
else:
print_step(f"Unknown mode: {mode}")
return None
def main():
compiler = VideoCompiler()
print_step("Monitoring for config changes...")
print_substep("You can modify merger_config.toml at any time to change settings")
print_substep("Set status to 'paused' to pause, 'running' to resume, or 'stopping' to stop")
first_run = True # Add flag for first run
while True:
try:
# Reset processed videos list at start of each cycle
compiler.processed_videos = []
compiler.save_processed_videos() # Save empty list to clear file
# Check status first
if not compiler.check_status():
print_step("Stopping process...")
break
# Check if auto-processing is still enabled
compiler.check_config_changed()
if not compiler.config['merger']['auto_process']:
print_step("Auto-processing disabled in config. Exiting.")
break
selected_videos = compiler.process_videos()
if selected_videos:
print_step("\nVideos Selected for Compilation:")
total_duration = 0
for video in selected_videos:
print_substep(f"Video: {video['name']}")
print_substep(f"From: {video['subreddit']}")
print_substep(f"Duration: {video['duration']:.2f} seconds")
print_substep("-" * 50)
total_duration += video['duration']
print_step(f"Total Compilation Duration: {total_duration:.2f} seconds")
# Here we'll need to hold selected_pairs and do the video processing
selected_pairs = selected_videos # This is your selected videos for processing
# Only wait if not first run
if not first_run:
check_interval = compiler.config['merger']['check_interval']
if not compiler.wait_with_status_check(check_interval):
break
else:
first_run = False # Mark first run complete
# Store the processed videos
for pair in selected_pairs:
compiler.processed_videos.append(pair['name'])
compiler.save_processed_videos()
print_substep(f"\nFinal compilation duration: {total_duration:.2f} seconds")
remaining_time = compiler.target_duration - total_duration
if remaining_time > 0:
print_substep(f"Could not find enough videos to fill remaining {remaining_time:.2f} seconds")
else:
print_step("Not enough unprocessed videos for compilation.")
check_interval = compiler.config['merger']['check_interval']
if not compiler.wait_with_status_check(check_interval):
break
except Exception as e:
print_step(f"Error occurred: {str(e)}")
print_step("Waiting 5 minutes before retrying...")
if not compiler.wait_with_status_check(5):
break
if __name__ == "__main__":
main()
Summary of Changes:
The find_best_combination method has been replaced with the new implementation you provided.
All aspects of the original code structure and logic remain intact, ensuring that the behavior of the class is preserved.
You can copy and paste this entire code block into your Python file to replace the existing implementation. Make sure to test it after the changes to confirm everything functions as expected!
# Third party imports
import os
from pathlib import Path, WindowsPath
import time
import ffmpeg
import json
import tomlkit
import hashlib
import numpy as np
from moviepy.editor import VideoFileClip, concatenate_videoclips
import subprocess
import ctypes
from ctypes import wintypes
# Local imports
from utils.console import print_step, print_substep
class VideoCompiler:
def __init__(self):
self.config = self.load_config()
self.config_hash = self.get_config_hash()
self.results_folder = self.config['paths']['source_folder']
self.merge_folder = self.config['paths']['merge_folder']
self.target_duration = self.config['merger']['target_duration'] * 60 # convert to seconds
self.subreddit_durations = {}
self.processed_videos_file = "processed_videos.json"
os.makedirs(self.merge_folder, exist_ok=True)
print_step(f"Looking for videos in: {self.results_folder}")
print_step(f"Current mode: {self.config['merger']['mode']}")
print_step(f"Current status: {self.config['merger']['status']}")
self.processed_videos = self.load_processed_videos()
def get_config_hash(self):
"""Get hash of current config file to detect changes"""
try:
with open("merger_config.toml", "rb") as f:
return hashlib.md5(f.read()).hexdigest()
except FileNotFoundError:
return None
def check_config_changed(self):
"""Check if config file has been modified"""
current_hash = self.get_config_hash()
if current_hash != self.config_hash:
print_step("Config file changed! Reloading settings...")
self.config = self.load_config()
self.config_hash = current_hash
self.results_folder = self.config['paths']['source_folder']
self.merge_folder = self.config['paths']['merge_folder']
self.target_duration = self.config['merger']['target_duration'] * 60
print_step(f"New settings loaded:")
print_substep(f"Mode: {self.config['merger']['mode']}")
print_substep(f"Status: {self.config['merger']['status']}")
print_substep(f"Target duration: {self.config['merger']['target_duration']} minutes")
if self.config['merger']['mode'] == 'specific':
print_substep(f"Specific subreddit: {self.config['merger']['specific_subreddit']}")
return True
return False
def check_status(self):
"""Check current processing status"""
self.check_config_changed()
status = self.config['merger']['status']
if status == "paused":
print_step("Processing is paused. Waiting for resume...")
while self.config['merger']['status'] == "paused":
time.sleep(10) # Check every 10 seconds
self.check_config_changed()
print_step("Processing resumed!")
return True
elif status == "stopping":
print_step("Stop signal received. Finishing current task...")
return False
return True
def wait_with_status_check(self, minutes):
"""Wait specified minutes while checking for status changes"""
print_step(f"Waiting {minutes} minutes before next check...")
for _ in range(minutes):
if not self.check_status(): # Stop if requested
return False
time.sleep(60) # Sleep for 1 minute
if self.check_config_changed():
print_step("Config changed during wait. Starting new cycle...")
return True
return True
def load_processed_videos(self):
"""Load list of already processed videos"""
try:
if os.path.exists(self.processed_videos_file):
with open(self.processed_videos_file, 'r') as f:
return json.load(f)
return []
except Exception as e:
print_substep(f"Error loading processed videos: {str(e)}")
return []
def save_processed_videos(self):
"""Save list of processed videos"""
try:
with open(self.processed_videos_file, 'w') as f:
json.dump(self.processed_videos, f)
except Exception as e:
print_substep(f"Error saving processed videos: {str(e)}")
def load_config(self):
"""Load configuration from toml file"""
try:
with open("merger_config.toml", "r", encoding="utf-8") as f:
return tomlkit.load(f)
except FileNotFoundError:
print_step("Config file not found. Creating default config...")
self.create_default_config()
return self.load_config()
def create_default_config(self):
"""Create default configuration file"""
doc = tomlkit.document()
merger = tomlkit.table()
merger.add("mode", "fastest")
merger.add("specific_subreddit", "AmItheAsshole+relationship_advice+confession+tifu")
merger.add("check_interval", 30)
merger.add("target_duration", 10)
merger.add("auto_process", True)
merger.add("status", "running")
doc.add("merger", merger)
paths = tomlkit.table()
paths.add("source_folder", r"C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results")
paths.add("merge_folder", "MergeVideo")
doc.add("paths", paths)
processing = tomlkit.table()
processing.add("delete_source", False)
processing.add("output_format", "mp4")
processing.add("safe_mode", True)
processing.add("finish_current_before_pause", True)
doc.add("processing", processing)
with open("merger_config.toml", "w", encoding="utf-8") as f:
f.write(tomlkit.dumps(doc))
def get_video_duration(self, video_path):
"""Get duration of video in seconds using ffmpeg"""
try:
probe = ffmpeg.probe(video_path)
duration = float(probe['streams'][0]['duration'])
print_substep(f"Duration of {os.path.basename(video_path)}: {duration:.2f} seconds")
return duration
except Exception as e:
print_substep(f"Error getting duration: {str(e)}")
return 0
def find_video_pairs(self, subreddit_folder):
"""Find matching pairs of videos (_out.mp4 and .mp4) in a subreddit folder"""
try:
folder_path = os.path.join(self.results_folder, subreddit_folder)
print_step(f"Scanning folder: {folder_path}")
if not os.path.exists(folder_path):
print_substep(f"Folder not found: {folder_path}")
return {}, 0
video_pairs = {}
total_duration = 0
# First find all subtitled versions (_out.mp4) and get their durations
for file in os.listdir(folder_path):
if file.endswith('_out.mp4'): # Only look for subtitled versions
base_name = file.replace('_out.mp4', '')
if base_name not in video_pairs:
video_pairs[base_name] = {
'normal': None,
'subtitled': None,
'duration': 0
}
full_path = os.path.join(folder_path, file)
video_pairs[base_name]['subtitled'] = full_path
duration = self.get_video_duration(full_path)
video_pairs[base_name]['duration'] = duration
total_duration += duration
# Now find matching normal versions but don't add their duration
for file in os.listdir(folder_path):
if file.endswith('.mp4') and not file.endswith('_out.mp4'):
base_name = file.replace('.mp4', '')
if base_name in video_pairs:
video_pairs[base_name]['normal'] = os.path.join(folder_path, file)
# Print found pairs and total duration
print_step(f"Found video pairs in {subreddit_folder}:")
complete_pairs = 0
for base_name, pair in video_pairs.items():
if pair['normal'] and pair['subtitled']:
complete_pairs += 1
print_substep(f"Pair {complete_pairs}: {base_name}")
print_substep(f" Normal: {os.path.basename(pair['normal'])}")
print_substep(f" Subtitled: {os.path.basename(pair['subtitled'])}")
print_substep(f" Duration: {pair['duration']:.2f} seconds")
print_substep(f"Total complete pairs: {complete_pairs}")
print_substep(f"Total duration: {total_duration:.2f} seconds")
return video_pairs, total_duration
except Exception as e:
print_substep(f"Error scanning folder: {str(e)}")
return {}, 0
def find_best_combination(self):
"""Find best combination of videos for fastest 10 minutes"""
available_pairs = []
# Find all unprocessed video pairs
for subreddit in os.listdir(self.results_folder):
if os.path.isdir(os.path.join(self.results_folder, subreddit)):
pairs, _ = self.find_video_pairs(subreddit)
for name, pair in pairs.items():
if pair['normal'] and pair['subtitled']:
if name not in self.processed_videos:
available_pairs.append({
'name': name,
'subreddit': subreddit,
'duration': pair['duration'],
'files': pair
})
if not available_pairs:
print_step("No unprocessed videos found!")
return None
# Sort the available pairs by duration (longest first for efficient packing)
available_pairs.sort(key=lambda x: x['duration'], reverse=True)
selected_pairs = []
current_duration = 0
# Add videos until we hit or exceed the target_duration
for pair in available_pairs:
selected_pairs.append(pair)
current_duration += pair['duration']
print_substep(f"\nAdded: {pair['name']} ({pair['duration']:.2f}s) from {pair['subreddit']}")
print_substep(f"Current total duration: {current_duration:.2f}s")
self.processed_videos.append(pair['name'])
if current_duration >= self.target_duration:
# Stop here even if the last video makes us go over target_duration
break
if selected_pairs:
self.save_processed_videos()
print_substep(f"\nFinal compilation duration: {current_duration:.2f} seconds")
return selected_pairs
def process_specific_folder(self):
"""Process videos from specific folder"""
subreddit = self.config['merger']['specific_subreddit']
print_step(f"Processing specific folder: {subreddit}")
pairs, duration = self.find_video_pairs(subreddit)
if not pairs:
print_step("No videos found in specified folder!")
return None
selected_pairs = []
current_duration = 0
for name, pair in pairs.items():
if name not in self.processed_videos and pair['normal'] and pair['subtitled']:
if current_duration + pair['duration'] <= self.target_duration:
selected_pairs.append({
'name': name,
'subreddit': subreddit,
'duration': pair['duration'],
'files': pair
})
current_duration += pair['duration']
return selected_pairs if selected_pairs else None
def process_videos(self):
"""Process videos based on current mode"""
# Check for config changes before processing
if self.check_config_changed():
if self.config['processing']['safe_mode']:
print_step("Config changed during operation. Restarting process...")
return None
mode = self.config['merger']['mode']
if mode == "fastest":
return self.find_best_combination()
elif mode == "specific":
return self.process_specific_folder()
else:
print_step(f"Unknown mode: {mode}")
return None
def main():
compiler = VideoCompiler()
print_step("Monitoring for config changes...")
print_substep("You can modify merger_config.toml at any time to change settings")
print_substep("Set status to 'paused' to pause, 'running' to resume, or 'stopping' to stop")
first_run = True # Add flag for first run
while True:
try:
# Reset processed videos list at start of each cycle
compiler.processed_videos = []
compiler.save_processed_videos() # Save empty list to clear file
# Check status first
if not compiler.check_status():
print_step("Stopping process...")
break
# Check if auto-processing is still enabled
compiler.check_config_changed()
if not compiler.config['merger']['auto_process']:
print_step("Auto-processing disabled in config. Exiting.")
break
selected_videos = compiler.process_videos()
if selected_videos:
print_step("\nVideos Selected for Compilation:")
total_duration = 0
for video in selected_videos:
print_substep(f"Video: {video['name']}")
print_substep(f"From: {video['subreddit']}")
print_substep(f"Duration: {video['duration']:.2f} seconds")
print_substep("-" * 50)
total_duration += video['duration']
print_step(f"Total Compilation Duration: {total_duration:.2f} seconds")
# Here we'll need to hold selected_pairs and do the video processing
selected_pairs = selected_videos # This is your selected videos for processing
# Only wait if not first run
if not first_run:
check_interval = compiler.config['merger']['check_interval']
if not compiler.wait_with_status_check(check_interval):
break
else:
first_run = False # Mark first run complete
# Store the processed videos
for pair in selected_pairs:
compiler.processed_videos.append(pair['name'])
compiler.save_processed_videos()
print_substep(f"\nFinal compilation duration: {total_duration:.2f} seconds")
remaining_time = compiler.target_duration - total_duration
if remaining_time > 0:
print_substep(f"Could not find enough videos to fill remaining {remaining_time:.2f} seconds")
else:
print_step("Not enough unprocessed videos for compilation.")
check_interval = compiler.config['merger']['check_interval']
if not compiler.wait_with_status_check(check_interval):
break
except Exception as e:
print_step(f"Error occurred: {str(e)}")
print_step("Waiting 5 minutes before retrying...")
if not compiler.wait_with_status_check(5):
break
if __name__ == "__main__":
main()
Summary of Updates:
The find_best_combination method has been replaced with your updated version that seeks the best combination of videos to fit the target duration.
The overall structure and logic of the VideoCompiler class and its methods have remained intact, ensuring functionality is preserved.
You can copy and paste this complete code into your Python file to implement all the updates. Make sure to test the application to ensure everything works as intended!
# Convert to array
audio_array = audio.to_soundarray()
# Parameters for detection
window_size = int(audio.fps * 0.5) # 0.5 second window
threshold = 0.1 # Adjust based on testing
# Find first silence after speech
for i in range(0, len(audio_array) - window_size, window_size):
window = audio_array[i:i+window_size]
if np.max(np.abs(window)) < threshold:
# Convert sample position to seconds
return i / audio.fps
# Fallback if no clear silence found
return 5.0
except Exception as e:
print_substep(f"Error detecting title end: {str(e)}")
return 5.0
def merge_videos(self, selected_videos):
"""Merge selected videos with proper splicing and transitions"""
clips = []
try:
# Process each video with proper splicing
for video in selected_videos:
spliced = self.splice_video(video)
if spliced:
clips.append(spliced)
code
# Add transitions between videos
final_clips = []
for i, clip in enumerate(clips):
if i > 0:
# Add 1 second crossfade between videos
clip = clip.crossfadein(1.0)
final_clips.append(clip)
# Concatenate all clips
final = concatenate_videoclips(final_clips, method="compose")
# Write final video
output_path = os.path.join(
self.compiler.merge_folder,
f"compilation_{int(time.time())}.mp4"
)
final.write_videofile(
output_path,
codec='libx264',
audio_codec='aac',
temp_audiofile='temp-audio.m4a',
remove_temp=True,
threads=4
)
return output_path
except Exception as e:
print_substep(f"Error merging videos: {str(e)}")
return None
finally:
# Clean up all clips
for clip in clips:
try:
clip.close()
except:
pass
# Third party imports
import os
from pathlib import Path, WindowsPath
import time
import ffmpeg
import json
import tomlkit
import hashlib
import numpy as np
from moviepy.editor import VideoFileClip, concatenate_videoclips
import subprocess
import ctypes
from ctypes import wintypes
# Local imports
from utils.console import print_step, print_substep
class VideoCompiler:
def __init__(self):
self.config = self.load_config()
self.config_hash = self.get_config_hash()
self.results_folder = self.config['paths']['source_folder']
self.merge_folder = self.config['paths']['merge_folder']
self.target_duration = self.config['merger']['target_duration'] * 60 # convert to seconds
self.subreddit_durations = {}
self.processed_videos_file = "processed_videos.json"
os.makedirs(self.merge_folder, exist_ok=True)
print_step(f"Looking for videos in: {self.results_folder}")
print_step(f"Current mode: {self.config['merger']['mode']}")
print_step(f"Current status: {self.config['merger']['status']}")
self.processed_videos = self.load_processed_videos()
def get_config_hash(self):
"""Get hash of current config file to detect changes"""
try:
with open("merger_config.toml", "rb") as f:
return hashlib.md5(f.read()).hexdigest()
except FileNotFoundError:
return None
def check_config_changed(self):
"""Check if config file has been modified"""
current_hash = self.get_config_hash()
if current_hash != self.config_hash:
print_step("Config file changed! Reloading settings...")
self.config = self.load_config()
self.config_hash = current_hash
self.results_folder = self.config['paths']['source_folder']
self.merge_folder = self.config['paths']['merge_folder']
self.target_duration = self.config['merger']['target_duration'] * 60
print_step(f"New settings loaded:")
print_substep(f"Mode: {self.config['merger']['mode']}")
print_substep(f"Status: {self.config['merger']['status']}")
print_substep(f"Target duration: {self.config['merger']['target_duration']} minutes")
if self.config['merger']['mode'] == 'specific':
print_substep(f"Specific subreddit: {self.config['merger']['specific_subreddit']}")
return True
return False
def check_status(self):
"""Check current processing status"""
self.check_config_changed()
status = self.config['merger']['status']
if status == "paused":
print_step("Processing is paused. Waiting for resume...")
while self.config['merger']['status'] == "paused":
time.sleep(10) # Check every 10 seconds
self.check_config_changed()
print_step("Processing resumed!")
return True
elif status == "stopping":
print_step("Stop signal received. Finishing current task...")
return False
return True
def wait_with_status_check(self, minutes):
"""Wait specified minutes while checking for status changes"""
print_step(f"Waiting {minutes} minutes before next check...")
for _ in range(minutes):
if not self.check_status(): # Stop if requested
return False
time.sleep(60) # Sleep for 1 minute
if self.check_config_changed():
print_step("Config changed during wait. Starting new cycle...")
return True
return True
def load_processed_videos(self):
"""Load list of already processed videos"""
try:
if os.path.exists(self.processed_videos_file):
with open(self.processed_videos_file, 'r') as f:
return json.load(f)
return []
except Exception as e:
print_substep(f"Error loading processed videos: {str(e)}")
return []
def save_processed_videos(self):
"""Save list of processed videos"""
try:
with open(self.processed_videos_file, 'w') as f:
json.dump(self.processed_videos, f)
except Exception as e:
print_substep(f"Error saving processed videos: {str(e)}")
def load_config(self):
"""Load configuration from toml file"""
try:
with open("merger_config.toml", "r", encoding="utf-8") as f:
return tomlkit.load(f)
except FileNotFoundError:
print_step("Config file not found. Creating default config...")
self.create_default_config()
return self.load_config()
def create_default_config(self):
"""Create default configuration file"""
doc = tomlkit.document()
merger = tomlkit.table()
merger.add("mode", "fastest")
merger.add("specific_subreddit", "AmItheAsshole+relationship_advice+confession+tifu")
merger.add("check_interval", 30)
merger.add("target_duration", 10)
merger.add("auto_process", True)
merger.add("status", "running")
doc.add("merger", merger)
paths = tomlkit.table()
paths.add("source_folder", r"C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results")
paths.add("merge_folder", "MergeVideo")
doc.add("paths", paths)
processing = tomlkit.table()
processing.add("delete_source", False)
processing.add("output_format", "mp4")
processing.add("safe_mode", True)
processing.add("finish_current_before_pause", True)
doc.add("processing", processing)
with open("merger_config.toml", "w", encoding="utf-8") as f:
f.write(tomlkit.dumps(doc))
def get_video_duration(self, video_path):
"""Get duration of video in seconds using ffmpeg"""
try:
probe = ffmpeg.probe(video_path)
duration = float(probe['streams'][0]['duration'])
print_substep(f"Duration of {os.path.basename(video_path)}: {duration:.2f} seconds")
return duration
except Exception as e:
print_substep(f"Error getting duration: {str(e)}")
return 0
def find_video_pairs(self, subreddit_folder):
"""Find matching pairs of videos (_out.mp4 and .mp4) in a subreddit folder"""
try:
folder_path = os.path.join(self.results_folder, subreddit_folder)
print_step(f"Scanning folder: {folder_path}")
if not os.path.exists(folder_path):
print_substep(f"Folder not found: {folder_path}")
return {}, 0
video_pairs = {}
total_duration = 0
# First find all subtitled versions (_out.mp4) and get their durations
for file in os.listdir(folder_path):
if file.endswith('_out.mp4'): # Only look for subtitled versions
base_name = file.replace('_out.mp4', '')
if base_name not in video_pairs:
video_pairs[base_name] = {
'normal': None,
'subtitled': None,
'duration': 0
}
full_path = os.path.join(folder_path, file)
video_pairs[base_name]['subtitled'] = full_path
duration = self.get_video_duration(full_path)
video_pairs[base_name]['duration'] = duration
total_duration += duration
# Now find matching normal versions but don't add their duration
for file in os.listdir(folder_path):
if file.endswith('.mp4') and not file.endswith('_out.mp4'):
base_name = file.replace('.mp4', '')
if base_name in video_pairs:
video_pairs[base_name]['normal'] = os.path.join(folder_path, file)
# Print found pairs and total duration
print_step(f"Found video pairs in {subreddit_folder}:")
complete_pairs = 0
for base_name, pair in video_pairs.items():
if pair['normal'] and pair['subtitled']:
complete_pairs += 1
print_substep(f"Pair {complete_pairs}: {base_name}")
print_substep(f" Normal: {os.path.basename(pair['normal'])}")
print_substep(f" Subtitled: {os.path.basename(pair['subtitled'])}")
print_substep(f" Duration: {pair['duration']:.2f} seconds")
print_substep(f"Total complete pairs: {complete_pairs}")
print_substep(f"Total duration: {total_duration:.2f} seconds")
return video_pairs, total_duration
except Exception as e:
print_substep(f"Error scanning folder: {str(e)}")
return {}, 0
def find_best_combination(self):
"""Find best combination of videos for fastest 10 minutes"""
available_pairs = []
# Find all unprocessed video pairs
for subreddit in os.listdir(self.results_folder):
if os.path.isdir(os.path.join(self.results_folder, subreddit)):
pairs, _ = self.find_video_pairs(subreddit)
for name, pair in pairs.items():
if pair['normal'] and pair['subtitled']:
if name not in self.processed_videos:
available_pairs.append({
'name': name,
'subreddit': subreddit,
'duration': pair['duration'],
'files': pair
})
if not available_pairs:
print_step("No unprocessed videos found!")
return None
# Sort the available pairs by duration (longest first for efficient packing)
available_pairs.sort(key=lambda x: x['duration'], reverse=True)
selected_pairs = []
current_duration = 0
# Add videos until we hit or exceed the target_duration
for pair in available_pairs:
selected_pairs.append(pair)
current_duration += pair['duration']
print_substep(f"\nAdded: {pair['name']} ({pair['duration']:.2f}s) from {pair['subreddit']}")
print_substep(f"Current total duration: {current_duration:.2f}s")
self.processed_videos.append(pair['name'])
if current_duration >= self.target_duration:
# Stop here even if the last video makes us go over target_duration
break
if selected_pairs:
self.save_processed_videos()
print_substep(f"\nFinal compilation duration: {current_duration:.2f} seconds")
return selected_pairs
def process_specific_folder(self):
"""Process videos from specific folder"""
subreddit = self.config['merger']['specific_subreddit']
print_step(f"Processing specific folder: {subreddit}")
pairs, duration = self.find_video_pairs(subreddit)
if not pairs:
print_step("No videos found in specified folder!")
return None
selected_pairs = []
current_duration = 0
for name, pair in pairs.items():
if name not in self.processed_videos and pair['normal'] and pair['subtitled']:
if current_duration + pair['duration'] <= self.target_duration:
selected_pairs.append({
'name': name,
'subreddit': subreddit,
'duration': pair['duration'],
'files': pair
})
current_duration += pair['duration']
return selected_pairs if selected_pairs else None
def process_videos(self):
"""Process videos based on current mode"""
# Check for config changes before processing
if self.check_config_changed():
if self.config['processing']['safe_mode']:
print_step("Config changed during operation. Restarting process...")
return None
mode = self.config['merger']['mode']
if mode == "fastest":
return self.find_best_combination()
elif mode == "specific":
return self.process_specific_folder()
else:
print_step(f"Unknown mode: {mode}")
return None
def splice_video(self, video_pair):
"""Create spliced version with clean intro and main content"""
try:
print_substep(f"Processing video: {video_pair['name']}")
# Load both versions
clean_video = VideoFileClip(video_pair['files']['normal'])
subtitled_video = VideoFileClip(video_pair['files']['subtitled'])
# Detect title end using audio analysis
title_end = self.detect_title_end(clean_video)
print_substep(f"Title ends at: {title_end:.2f}s")
# Get clean intro after title from normal version
clean_portion = clean_video.subclip(title_end)
# Get main content from subtitled version starting at the same point
subtitled_portion = subtitled_video.subclip(title_end)
# Add 1 second crossfade between portions
clean_portion = clean_portion.crossfadein(1.0)
subtitled_portion = subtitled_portion.crossfadein(1.0)
# Combine with transition
final = concatenate_videoclips([clean_portion, subtitled_portion], method="compose")
# Clean up source clips
clean_video.close()
subtitled_video.close()
return final
except Exception as e:
print_substep(f"Error splicing video: {str(e)}")
if 'clean_video' in locals():
clean_video.close()
if 'subtitled_video' in locals():
subtitled_video.close()
return None
def detect_title_end(self, video):
"""Detect when title reading ends based on audio analysis"""
try:
# Extract audio
audio = video.audio
# Convert to array
audio_array = audio.to_soundarray()
# Parameters for detection
window_size = int(audio.fps * 0.5) # 0.5 second window
threshold = 0.1 # Adjust based on testing
# Find first silence after speech
for i in range(0, len(audio_array) - window_size, window_size):
window = audio_array[i:i + window_size]
if np.max(np.abs(window)) < threshold:
# Convert sample position to seconds
return i / audio.fps
# Fallback if no clear silence found
return 5.0
except Exception as e:
print_substep(f"Error detecting title end: {str(e)}")
return 5.0
def merge_videos(self, selected_videos):
"""Merge selected videos with proper splicing and transitions"""
clips = []
try:
# Process each video with proper splicing
for video in selected_videos:
spliced = self.splice_video(video)
if spliced:
clips.append(spliced)
# Add transitions between videos
final_clips = []
for i, clip in enumerate(clips):
if i > 0:
# Add 1 second crossfade between videos
clip = clip.crossfadein(1.0)
final_clips.append(clip)
# Concatenate all clips
final = concatenate_videoclips(final_clips, method="compose")
# Write final video
output_path = os.path.join(
self.merge_folder,
f"compilation_{int(time.time())}.mp4"
)
final.write_videofile(
output_path,
codec='libx264',
audio_codec='aac',
temp_audiofile='temp-audio.m4a',
remove_temp=True,
threads=4
)
return output_path
except Exception as e:
print_substep(f"Error merging videos: {str(e)}")
return None
finally:
# Clean up all clips
for clip in clips:
try:
clip.close()
except:
pass
def main():
compiler = VideoCompiler()
print_step("Monitoring for config changes...")
print_substep("You can modify merger_config.toml at any time to change settings")
print_substep("Set status to 'paused' to pause, 'running' to resume, or 'stopping' to stop")
first_run = True # Add flag for first run
while True:
try:
# Reset processed videos list at start of each cycle
compiler.processed_videos = []
compiler.save_processed_videos() # Save empty list to clear file
# Check status first
if not compiler.check_status():
print_step("Stopping process...")
break
# Check if auto-processing is still enabled
compiler.check_config_changed()
if not compiler.config['merger']['auto_process']:
print_step("Auto-processing disabled in config. Exiting.")
break
selected_videos = compiler.process_videos()
if selected_videos:
print_step("\nVideos Selected for Compilation:")
total_duration = 0
for video in selected_videos:
print_substep(f"Video: {video['name']}")
print_substep(f"From: {video['subreddit']}")
print_substep(f"Duration: {video['duration']:.2f} seconds")
print_substep("-" * 50)
total_duration += video['duration']
print_step(f"Total Compilation Duration: {total_duration:.2f} seconds")
# Here we'll need to hold selected_pairs and do the video processing
selected_pairs = selected_videos # This is your selected videos for processing
# Only wait if not first run
if not first_run:
check_interval = compiler.config['merger']['check_interval']
if not compiler.wait_with_status_check(check_interval):
break
else:
first_run = False # Mark first run complete
# Merge videos
output_path = compiler.merge_videos(selected_pairs)
if output_path:
print_step(f"Final compilation video saved to: {output_path}")
# Store the processed videos
for pair in selected_pairs:
compiler.processed_videos.append(pair['name'])
compiler.save_processed_videos()
print_substep(f"\nFinal compilation duration: {total_duration:.2f} seconds")
remaining_time = compiler.target_duration - total_duration
if remaining_time > 0:
print_substep(f"Could not find enough videos to fill remaining {remaining_time:.2f} seconds")
else:
print_step("Not enough unprocessed videos for compilation.")
check_interval = compiler.config['merger']['check_interval']
if not compiler.wait_with_status_check(check_interval):
break
except Exception as e:
print_step(f"Error occurred: {str(e)}")
print_step("Waiting 5 minutes before retrying...")
if not compiler.wait_with_status_check(5):
break
if __name__ == "__main__":
main()
Summary of Updates:
Added splice_video: This method creates a spliced version of videos, cleaning up the intro and merging it with the main content.
Added detect_title_end: This method detects when the title reading ends using audio analysis.
Added merge_videos: This method merges multiple video clips together with proper splicing, transitions, and exports the final compilation.
The main function is updated to call merge_videos after processing selected videos.
You can copy and paste this complete code into your Python file to implement all the required updates. Make sure to run tests to verify that the new functionality works as expected!
Scanning folder:
C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results\ScamNumbers+Scams
Duration of Avoid the account mackRichard
on sleeper fantasy_out.mp4: 37.01 seconds
Duration of Elite Travel Scam won at a
charity auction_out.mp4: 31.00 seconds
Duration of Now these numbers are saved forfuture people who will google them thank
you reddit_out.mp4: 66.01 seconds
Found video pairs in ScamNumbers+Scams:
Pair 1: Avoid the account mackRichard on
sleeper fantasy
Normal: Avoid the account mackRichard on
sleeper fantasy.mp4
Subtitled: Avoid the account mackRichard
on sleeper fantasy_out.mp4
Duration: 37.01 seconds
Pair 2: Elite Travel Scam won at a charity
auction
Normal: Elite Travel Scam won at a charityauction.mp4
Subtitled: Elite Travel Scam won at a
charity auction_out.mp4
Duration: 31.00 seconds
Pair 3: Now these numbers are saved for
future people who will google them thank
you reddit
Normal: Now these numbers are saved for
future people who will google them thank
you reddit.mp4
Subtitled: Now these numbers are saved forfuture people who will google them thank
you reddit_out.mp4
Duration: 66.01 seconds
Total complete pairs: 3
Total duration: 134.02 seconds
Added: Update How do I 49f move forward
after my daughter 22F hid her fathers
affair from me for two years (483.01s) fromAmItheAsshole+relationship_advice+confession+tifu
Current total duration: 483.01s
Still need 116.99s to reach target
Added: 26M 3 Years with Fiancée 24F Shes
got me paying for Her ENTIRE Family Is thisgetting out of hand (116.01s) from
AmItheAsshole+relationship_advice+confession+tifu
Current total duration: 599.02s
Still need 0.98s to reach target
Videos Selected for Compilation:
Video: Update How do I 49f move forward
after my daughter 22F hid her fathers
affair from me for two years
From:
AmItheAsshole+relationship_advice+confession+tifu
Duration: 483.01 seconds
Video: 26M 3 Years with Fiancée 24F Shes
got me paying for Her ENTIRE Family Is thisgetting out of hand
From:
AmItheAsshole+relationship_advice+confession+tifu
Duration: 116.01 seconds
Total Compilation Duration: 599.02 seconds
Waiting 30 minutes before next check...
Traceback (most recent call last):
File "C:\Users\buggy\Desktop\MergeVideo\video_compiler.py", line 379, in
main()
File "C:\Users\buggy\Desktop\MergeVideo\video_compiler.py", line 351, in main
if not compiler.wait_with_status_check(check_interval):
File "C:\Users\buggy\Desktop\MergeVideo\video_compiler.py", line 85, in wait_with_status_check
time.sleep(60) # Sleep for 1 minute
KeyboardInterrupt
(mergepython video_compiler.py
Looking for videos in: C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results
Current mode: fastest
Current status: running
Monitoring for config changes...
You can modify merger_config.toml at any time to change settings
Set status to 'paused' to pause, 'running' to resume, or 'stopping' to stop
Scanning folder: C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results\AmItheAsshole+relationship_advice+confession+tifu
Duration of 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4: 116.01 seconds
Duration of AITA for being ungrateful and not eating the brownies my gf made for me_out.mp4: 137.01 seconds
Duration of AITA for defending my daughters comments towards my other daughter being single_out.mp4: 212.02 seconds
Duration of AITA for expecting not to have to pay for Thanksgiving groceries_out.mp4: 205.01 seconds
Duration of AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery_out.mp4: 102.00 seconds
Duration of AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me_out.mp4: 162.00
seconds
Duration of AITA for not canceling a non-refundable trip for Thanksgiving_out.mp4: 14.84 seconds
Duration of AITA for not letting my in-laws continue to be late for everything_out.mp4: 95.01 seconds
Duration of AITA for not taking my step daughter on vacation_out.mp4: 105.01 seconds
Duration of AITA for refusing to label my wedding cake as vegan because a guest felt tricked_out.mp4: 80.00 seconds
Duration of AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife_out.mp4: 119.02 seconds
Duration of AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket_out.mp4: 176.01 seconds
Duration of AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first_out.mp4: 31.92 seconds
Duration of I anonymously reported domestic abuse in my building_out.mp4: 41.00 seconds
Duration of I broke my arm going down on my friend with benefits_out.mp4: 4.04 seconds
Duration of Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths_out.mp4: 40.00 seconds
Duration of My mom caught my dad with a 16yo and covered it up_out.mp4: 174.01 seconds
Duration of My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him_out.mp4: 164.01 seconds
Duration of TIFU by forgetting that silence is the father of all disaster when you have kids or pets_out.mp4: 132.00 seconds
Duration of TIFU By Joking About Getting a Handie From My Partners Roommate_out.mp4: 142.00 seconds
Duration of TIFU by stripping in front of my doctor_out.mp4: 91.02 seconds
Duration of TIFU I bit my daughter in my sleep_out.mp4: 62.00 seconds
Duration of UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4: 154.02 secondsDuration of Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years_out.mp4: 483.01 seconds
Duration of What can I 23M do to feel less turned on by my girlfriend 21F_out.mp4: 110.00 seconds
Duration of WIBTA if I left my mom to fend for herself because she didnt buy me any food_out.mp4: 160.00 seconds
Found video pairs in AmItheAsshole+relationship_advice+confession+tifu:
Pair 1: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand
Normal: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand.mp4
Subtitled: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4
Duration: 116.01 seconds
Pair 2: AITA for being ungrateful and not eating the brownies my gf made for me
Normal: AITA for being ungrateful and not eating the brownies my gf made for me.mp4
Subtitled: AITA for being ungrateful and not eating the brownies my gf made for me_out.mp4
Duration: 137.01 seconds
Pair 3: AITA for defending my daughters comments towards my other daughter being single
Normal: AITA for defending my daughters comments towards my other daughter being single.mp4
Subtitled: AITA for defending my daughters comments towards my other daughter being single_out.mp4
Duration: 212.02 seconds
Pair 4: AITA for expecting not to have to pay for Thanksgiving groceries
Normal: AITA for expecting not to have to pay for Thanksgiving groceries.mp4
Subtitled: AITA for expecting not to have to pay for Thanksgiving groceries_out.mp4
Duration: 205.01 seconds
Pair 5: AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery
Normal: AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery.mp4
Subtitled: AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery_out.mp4
Duration: 102.00 seconds
Pair 6: AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me
Normal: AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me.mp4
Subtitled: AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me_out.mp4
Duration: 162.00 seconds
Pair 7: AITA for not canceling a non-refundable trip for Thanksgiving
Normal: AITA for not canceling a non-refundable trip for Thanksgiving.mp4
Subtitled: AITA for not canceling a non-refundable trip for Thanksgiving_out.mp4
Duration: 14.84 seconds
Pair 8: AITA for not letting my in-laws continue to be late for everything
Normal: AITA for not letting my in-laws continue to be late for everything.mp4
Subtitled: AITA for not letting my in-laws continue to be late for everything_out.mp4
Duration: 95.01 seconds
Pair 9: AITA for not taking my step daughter on vacation
Normal: AITA for not taking my step daughter on vacation.mp4
Subtitled: AITA for not taking my step daughter on vacation_out.mp4
Duration: 105.01 seconds
Pair 10: AITA for refusing to label my wedding cake as vegan because a guest felt tricked
Normal: AITA for refusing to label my wedding cake as vegan because a guest felt tricked.mp4
Subtitled: AITA for refusing to label my wedding cake as vegan because a guest felt tricked_out.mp4
Duration: 80.00 seconds
Pair 11: AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife
Normal: AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife.mp4
Subtitled: AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife_out.mp4
Duration: 119.02 seconds
Pair 12: AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket
Normal: AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket.mp4
Subtitled: AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket_out.mp4
Duration: 176.01 seconds
Pair 13: AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first
Normal: AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first.mp4
Subtitled: AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first_out.mp4
Duration: 31.92 seconds
Pair 14: I anonymously reported domestic abuse in my building
Normal: I anonymously reported domestic abuse in my building.mp4
Subtitled: I anonymously reported domestic abuse in my building_out.mp4
Duration: 41.00 seconds
Pair 15: I broke my arm going down on my friend with benefits
Normal: I broke my arm going down on my friend with benefits.mp4
Subtitled: I broke my arm going down on my friend with benefits_out.mp4
Duration: 4.04 seconds
Pair 16: Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths
Normal: Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths.mp4
Subtitled: Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths_out.mp4
Duration: 40.00 seconds
Pair 17: My mom caught my dad with a 16yo and covered it up
Normal: My mom caught my dad with a 16yo and covered it up.mp4
Subtitled: My mom caught my dad with a 16yo and covered it up_out.mp4
Duration: 174.01 seconds
Pair 18: My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him
Normal: My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him.mp4
Subtitled: My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him_out.mp4
Duration: 164.01 seconds
Pair 19: TIFU by forgetting that silence is the father of all disaster when you have kids or pets
Normal: TIFU by forgetting that silence is the father of all disaster when you have kids or pets.mp4
Subtitled: TIFU by forgetting that silence is the father of all disaster when you have kids or pets_out.mp4
Duration: 132.00 seconds
Pair 20: TIFU By Joking About Getting a Handie From My Partners Roommate
Normal: TIFU By Joking About Getting a Handie From My Partners Roommate.mp4
Subtitled: TIFU By Joking About Getting a Handie From My Partners Roommate_out.mp4
Duration: 142.00 seconds
Pair 21: TIFU by stripping in front of my doctor
Normal: TIFU by stripping in front of my doctor.mp4
Subtitled: TIFU by stripping in front of my doctor_out.mp4
Duration: 91.02 seconds
Pair 22: TIFU I bit my daughter in my sleep
Normal: TIFU I bit my daughter in my sleep.mp4
Subtitled: TIFU I bit my daughter in my sleep_out.mp4
Duration: 62.00 seconds
Pair 23: UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand
Normal: UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand.mp4
Subtitled: UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4
Duration: 154.02 seconds
Pair 24: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years
Normal: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years.mp4
Subtitled: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years_out.mp4
Duration: 483.01 seconds
Pair 25: What can I 23M do to feel less turned on by my girlfriend 21F
Normal: What can I 23M do to feel less turned on by my girlfriend 21F.mp4
Subtitled: What can I 23M do to feel less turned on by my girlfriend 21F_out.mp4
Duration: 110.00 seconds
Pair 26: WIBTA if I left my mom to fend for herself because she didnt buy me any food
Normal: WIBTA if I left my mom to fend for herself because she didnt buy me any food.mp4
Subtitled: WIBTA if I left my mom to fend for herself because she didnt buy me any food_out.mp4
Duration: 160.00 seconds
Total complete pairs: 26
Total duration: 3312.97 seconds
Scanning folder: C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results\ScamNumbers+Scams
Duration of Avoid the account mackRichard on sleeper fantasy_out.mp4: 37.01 seconds
Duration of Elite Travel Scam won at a charity auction_out.mp4: 31.00 seconds
Duration of Now these numbers are saved for future people who will google them thank you reddit_out.mp4: 66.01 seconds
Found video pairs in ScamNumbers+Scams:
Pair 1: Avoid the account mackRichard on sleeper fantasy
Normal: Avoid the account mackRichard on sleeper fantasy.mp4
Subtitled: Avoid the account mackRichard on sleeper fantasy_out.mp4
Duration: 37.01 seconds
Pair 2: Elite Travel Scam won at a charity auction
Normal: Elite Travel Scam won at a charity auction.mp4
Subtitled: Elite Travel Scam won at a charity auction_out.mp4
Duration: 31.00 seconds
Pair 3: Now these numbers are saved for future people who will google them thank you reddit
Normal: Now these numbers are saved for future people who will google them thank you reddit.mp4
Subtitled: Now these numbers are saved for future people who will google them thank you reddit_out.mp4
Duration: 66.01 seconds
Total complete pairs: 3
Total duration: 134.02 seconds
Added: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years (483.01s) from
AmItheAsshole+relationship_advice+confession+tifu
Current total duration: 483.01s
Still need 116.99s to reach target
Added: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand (116.01s) from
AmItheAsshole+relationship_advice+confession+tifu
Current total duration: 599.02s
Still need 0.98s to reach target
Videos Selected for Compilation:
Video: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years
From: AmItheAsshole+relationship_advice+confession+tifu
Duration: 483.01 seconds
Video: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand
From: AmItheAsshole+relationship_advice+confession+tifu
Duration: 116.01 seconds
Total Compilation Duration: 599.02 seconds
Final compilation duration: 599.02 seconds
Could not find enough videos to fill remaining 0.98 seconds
Scanning folder: C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results\AmItheAsshole+relationship_advice+confession+tifu
Duration of 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4: 116.01 seconds
Duration of AITA for being ungrateful and not eating the brownies my gf made for me_out.mp4: 137.01 seconds
Duration of AITA for defending my daughters comments towards my other daughter being single_out.mp4: 212.02 seconds
Duration of AITA for expecting not to have to pay for Thanksgiving groceries_out.mp4: 205.01 seconds
Duration of AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery_out.mp4: 102.00 seconds
Duration of AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me_out.mp4: 162.00
seconds
Duration of AITA for not canceling a non-refundable trip for Thanksgiving_out.mp4: 14.84 seconds
Duration of AITA for not letting my in-laws continue to be late for everything_out.mp4: 95.01 seconds
Duration of AITA for not taking my step daughter on vacation_out.mp4: 105.01 seconds
Duration of AITA for refusing to label my wedding cake as vegan because a guest felt tricked_out.mp4: 80.00 seconds
Duration of AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife_out.mp4: 119.02 seconds
Duration of AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket_out.mp4: 176.01 seconds
Duration of AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first_out.mp4: 31.92 seconds
Duration of I anonymously reported domestic abuse in my building_out.mp4: 41.00 seconds
Duration of I broke my arm going down on my friend with benefits_out.mp4: 4.04 seconds
Duration of Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths_out.mp4: 40.00 seconds
Duration of My mom caught my dad with a 16yo and covered it up_out.mp4: 174.01 seconds
Duration of My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him_out.mp4: 164.01 seconds
Duration of TIFU by forgetting that silence is the father of all disaster when you have kids or pets_out.mp4: 132.00 seconds
Duration of TIFU By Joking About Getting a Handie From My Partners Roommate_out.mp4: 142.00 seconds
Duration of TIFU by stripping in front of my doctor_out.mp4: 91.02 seconds
Duration of TIFU I bit my daughter in my sleep_out.mp4: 62.00 seconds
Duration of UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4: 154.02 secondsDuration of Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years_out.mp4: 483.01 seconds
Duration of What can I 23M do to feel less turned on by my girlfriend 21F_out.mp4: 110.00 seconds
Duration of WIBTA if I left my mom to fend for herself because she didnt buy me any food_out.mp4: 160.00 seconds
Found video pairs in AmItheAsshole+relationship_advice+confession+tifu:
Pair 1: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand
Normal: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand.mp4
Subtitled: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4
Duration: 116.01 seconds
Pair 2: AITA for being ungrateful and not eating the brownies my gf made for me
Normal: AITA for being ungrateful and not eating the brownies my gf made for me.mp4
Subtitled: AITA for being ungrateful and not eating the brownies my gf made for me_out.mp4
Duration: 137.01 seconds
Pair 3: AITA for defending my daughters comments towards my other daughter being single
Normal: AITA for defending my daughters comments towards my other daughter being single.mp4
Subtitled: AITA for defending my daughters comments towards my other daughter being single_out.mp4
Duration: 212.02 seconds
Pair 4: AITA for expecting not to have to pay for Thanksgiving groceries
Normal: AITA for expecting not to have to pay for Thanksgiving groceries.mp4
Subtitled: AITA for expecting not to have to pay for Thanksgiving groceries_out.mp4
Duration: 205.01 seconds
Pair 5: AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery
Normal: AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery.mp4
Subtitled: AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery_out.mp4
Duration: 102.00 seconds
Pair 6: AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me
Normal: AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me.mp4
Subtitled: AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me_out.mp4
Duration: 162.00 seconds
Pair 7: AITA for not canceling a non-refundable trip for Thanksgiving
Normal: AITA for not canceling a non-refundable trip for Thanksgiving.mp4
Subtitled: AITA for not canceling a non-refundable trip for Thanksgiving_out.mp4
Duration: 14.84 seconds
Pair 8: AITA for not letting my in-laws continue to be late for everything
Normal: AITA for not letting my in-laws continue to be late for everything.mp4
Subtitled: AITA for not letting my in-laws continue to be late for everything_out.mp4
Duration: 95.01 seconds
Pair 9: AITA for not taking my step daughter on vacation
Normal: AITA for not taking my step daughter on vacation.mp4
Subtitled: AITA for not taking my step daughter on vacation_out.mp4
Duration: 105.01 seconds
Pair 10: AITA for refusing to label my wedding cake as vegan because a guest felt tricked
Normal: AITA for refusing to label my wedding cake as vegan because a guest felt tricked.mp4
Subtitled: AITA for refusing to label my wedding cake as vegan because a guest felt tricked_out.mp4
Duration: 80.00 seconds
Pair 11: AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife
Normal: AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife.mp4
Subtitled: AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife_out.mp4
Duration: 119.02 seconds
Pair 12: AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket
Normal: AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket.mp4
Subtitled: AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket_out.mp4
Duration: 176.01 seconds
Pair 13: AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first
Normal: AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first.mp4
Subtitled: AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first_out.mp4
Duration: 31.92 seconds
Pair 14: I anonymously reported domestic abuse in my building
Normal: I anonymously reported domestic abuse in my building.mp4
Subtitled: I anonymously reported domestic abuse in my building_out.mp4
Duration: 41.00 seconds
Pair 15: I broke my arm going down on my friend with benefits
Normal: I broke my arm going down on my friend with benefits.mp4
Subtitled: I broke my arm going down on my friend with benefits_out.mp4
Duration: 4.04 seconds
Pair 16: Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths
Normal: Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths.mp4
Subtitled: Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths_out.mp4
Duration: 40.00 seconds
Pair 17: My mom caught my dad with a 16yo and covered it up
Normal: My mom caught my dad with a 16yo and covered it up.mp4
Subtitled: My mom caught my dad with a 16yo and covered it up_out.mp4
Duration: 174.01 seconds
Pair 18: My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him
Normal: My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him.mp4
Subtitled: My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him_out.mp4
Duration: 164.01 seconds
Pair 19: TIFU by forgetting that silence is the father of all disaster when you have kids or pets
Normal: TIFU by forgetting that silence is the father of all disaster when you have kids or pets.mp4
Subtitled: TIFU by forgetting that silence is the father of all disaster when you have kids or pets_out.mp4
Duration: 132.00 seconds
Pair 20: TIFU By Joking About Getting a Handie From My Partners Roommate
Normal: TIFU By Joking About Getting a Handie From My Partners Roommate.mp4
Subtitled: TIFU By Joking About Getting a Handie From My Partners Roommate_out.mp4
Duration: 142.00 seconds
Pair 21: TIFU by stripping in front of my doctor
Normal: TIFU by stripping in front of my doctor.mp4
Subtitled: TIFU by stripping in front of my doctor_out.mp4
Duration: 91.02 seconds
Pair 22: TIFU I bit my daughter in my sleep
Normal: TIFU I bit my daughter in my sleep.mp4
Subtitled: TIFU I bit my daughter in my sleep_out.mp4
Duration: 62.00 seconds
Pair 23: UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand
Normal: UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand.mp4
Subtitled: UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4
Duration: 154.02 seconds
Pair 24: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years
Normal: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years.mp4
Subtitled: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years_out.mp4
Duration: 483.01 seconds
Pair 25: What can I 23M do to feel less turned on by my girlfriend 21F
Normal: What can I 23M do to feel less turned on by my girlfriend 21F.mp4
Subtitled: What can I 23M do to feel less turned on by my girlfriend 21F_out.mp4
Duration: 110.00 seconds
Pair 26: WIBTA if I left my mom to fend for herself because she didnt buy me any food
Normal: WIBTA if I left my mom to fend for herself because she didnt buy me any food.mp4
Subtitled: WIBTA if I left my mom to fend for herself because she didnt buy me any food_out.mp4
Duration: 160.00 seconds
Total complete pairs: 26
Total duration: 3312.97 seconds
Scanning folder: C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results\ScamNumbers+Scams
Duration of Avoid the account mackRichard on sleeper fantasy_out.mp4: 37.01 seconds
Duration of Elite Travel Scam won at a charity auction_out.mp4: 31.00 seconds
Duration of Now these numbers are saved for future people who will google them thank you reddit_out.mp4: 66.01 seconds
Found video pairs in ScamNumbers+Scams:
Pair 1: Avoid the account mackRichard on sleeper fantasy
Normal: Avoid the account mackRichard on sleeper fantasy.mp4
Subtitled: Avoid the account mackRichard on sleeper fantasy_out.mp4
Duration: 37.01 seconds
Pair 2: Elite Travel Scam won at a charity auction
Normal: Elite Travel Scam won at a charity auction.mp4
Added: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand (116.01s) from
AmItheAsshole+relationship_advice+confession+tifu
Current total duration: 599.02s
Still need 0.98s to reach target
Videos Selected for Compilation:
Video: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years
From: AmItheAsshole+relationship_advice+confession+tifu
Duration: 483.01 seconds
Video: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand
From: AmItheAsshole+relationship_advice+confession+tifu
Duration: 116.01 seconds
Total Compilation Duration: 599.02 seconds
Waiting 30 minutes before next check...
Traceback (most recent call last):
File "C:\Users\buggy\Desktop\MergeVideo\video_compiler.py", line 380, in
File "C:\Users\buggy\Desktop\MergeVideo\video_compiler.py", line 352, in main
else:
File "C:\Users\buggy\Desktop\MergeVideo\video_compiler.py", line 85, in wait_with_status_check
time.sleep(60) # Sleep for 1 minute
KeyboardInterrupt
(mergeEnv) PS C:\Users\buggy\Desktop\MergeVideo> python video_compiler.py
Looking for videos in: C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results
Current mode: fastest
Current status: running
Monitoring for config changes...
You can modify merger_config.toml at any time to change settings
Set status to 'paused' to pause, 'running' to resume, or 'stopping' to stop
Scanning folder: C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results\AmItheAsshole+relationship_advice+confession+tifu
Duration of 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4: 116.01 seconds
Duration of AITA for being ungrateful and not eating the brownies my gf made for me_out.mp4: 137.01 seconds
Duration of AITA for defending my daughters comments towards my other daughter being single_out.mp4: 212.02 seconds
Duration of AITA for expecting not to have to pay for Thanksgiving groceries_out.mp4: 205.01 seconds
Duration of AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery_out.mp4: 102.00 seconds
Duration of AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me_out.mp4: 162.00
seconds
Duration of AITA for not canceling a non-refundable trip for Thanksgiving_out.mp4: 14.84 seconds
Duration of AITA for not letting my in-laws continue to be late for everything_out.mp4: 95.01 seconds
Duration of AITA for not taking my step daughter on vacation_out.mp4: 105.01 seconds
Duration of AITA for refusing to label my wedding cake as vegan because a guest felt tricked_out.mp4: 80.00 seconds
Duration of AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife_out.mp4: 119.02 seconds
Duration of AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket_out.mp4: 176.01 seconds
Duration of AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first_out.mp4: 31.92 seconds
Duration of I anonymously reported domestic abuse in my building_out.mp4: 41.00 seconds
Duration of I broke my arm going down on my friend with benefits_out.mp4: 4.04 seconds
Duration of Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths_out.mp4: 40.00 seconds
Duration of My mom caught my dad with a 16yo and covered it up_out.mp4: 174.01 seconds
Duration of My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him_out.mp4: 164.01 seconds
Duration of TIFU by forgetting that silence is the father of all disaster when you have kids or pets_out.mp4: 132.00 seconds
Duration of TIFU By Joking About Getting a Handie From My Partners Roommate_out.mp4: 142.00 seconds
Duration of TIFU by stripping in front of my doctor_out.mp4: 91.02 seconds
Duration of TIFU I bit my daughter in my sleep_out.mp4: 62.00 seconds
Duration of UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4: 154.02 secondsDuration of Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years_out.mp4: 483.01 seconds
Duration of What can I 23M do to feel less turned on by my girlfriend 21F_out.mp4: 110.00 seconds
Duration of WIBTA if I left my mom to fend for herself because she didnt buy me any food_out.mp4: 160.00 seconds
Found video pairs in AmItheAsshole+relationship_advice+confession+tifu:
Pair 1: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand
Normal: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand.mp4
Subtitled: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4
Duration: 116.01 seconds
Pair 2: AITA for being ungrateful and not eating the brownies my gf made for me
Normal: AITA for being ungrateful and not eating the brownies my gf made for me.mp4
Subtitled: AITA for being ungrateful and not eating the brownies my gf made for me_out.mp4
Duration: 137.01 seconds
Pair 3: AITA for defending my daughters comments towards my other daughter being single
Normal: AITA for defending my daughters comments towards my other daughter being single.mp4
Subtitled: AITA for defending my daughters comments towards my other daughter being single_out.mp4
Duration: 212.02 seconds
Pair 4: AITA for expecting not to have to pay for Thanksgiving groceries
Normal: AITA for expecting not to have to pay for Thanksgiving groceries.mp4
Subtitled: AITA for expecting not to have to pay for Thanksgiving groceries_out.mp4
Duration: 205.01 seconds
Pair 5: AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery
Normal: AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery.mp4
Subtitled: AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery_out.mp4
Duration: 102.00 seconds
Pair 6: AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me
Normal: AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me.mp4
Subtitled: AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me_out.mp4
Duration: 162.00 seconds
Pair 7: AITA for not canceling a non-refundable trip for Thanksgiving
Normal: AITA for not canceling a non-refundable trip for Thanksgiving.mp4
Subtitled: AITA for not canceling a non-refundable trip for Thanksgiving_out.mp4
Duration: 14.84 seconds
Pair 8: AITA for not letting my in-laws continue to be late for everything
Normal: AITA for not letting my in-laws continue to be late for everything.mp4
Subtitled: AITA for not letting my in-laws continue to be late for everything_out.mp4
Duration: 95.01 seconds
Pair 9: AITA for not taking my step daughter on vacation
Normal: AITA for not taking my step daughter on vacation.mp4
Subtitled: AITA for not taking my step daughter on vacation_out.mp4
Duration: 105.01 seconds
Pair 10: AITA for refusing to label my wedding cake as vegan because a guest felt tricked
Normal: AITA for refusing to label my wedding cake as vegan because a guest felt tricked.mp4
Subtitled: AITA for refusing to label my wedding cake as vegan because a guest felt tricked_out.mp4
Duration: 80.00 seconds
Pair 11: AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife
Normal: AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife.mp4
Subtitled: AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife_out.mp4
Duration: 119.02 seconds
Pair 12: AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket
Normal: AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket.mp4
Subtitled: AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket_out.mp4
Duration: 176.01 seconds
Pair 13: AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first
Normal: AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first.mp4
Subtitled: AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first_out.mp4
Duration: 31.92 seconds
Pair 14: I anonymously reported domestic abuse in my building
Normal: I anonymously reported domestic abuse in my building.mp4
Subtitled: I anonymously reported domestic abuse in my building_out.mp4
Duration: 41.00 seconds
Pair 15: I broke my arm going down on my friend with benefits
Normal: I broke my arm going down on my friend with benefits.mp4
Subtitled: I broke my arm going down on my friend with benefits_out.mp4
Duration: 4.04 seconds
Pair 16: Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths
Normal: Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths.mp4
Subtitled: Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths_out.mp4
Duration: 40.00 seconds
Pair 17: My mom caught my dad with a 16yo and covered it up
Normal: My mom caught my dad with a 16yo and covered it up.mp4
Subtitled: My mom caught my dad with a 16yo and covered it up_out.mp4
Duration: 174.01 seconds
Pair 18: My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him
Normal: My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him.mp4
Subtitled: My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him_out.mp4
Duration: 164.01 seconds
Pair 19: TIFU by forgetting that silence is the father of all disaster when you have kids or pets
Normal: TIFU by forgetting that silence is the father of all disaster when you have kids or pets.mp4
Subtitled: TIFU by forgetting that silence is the father of all disaster when you have kids or pets_out.mp4
Duration: 132.00 seconds
Pair 20: TIFU By Joking About Getting a Handie From My Partners Roommate
Normal: TIFU By Joking About Getting a Handie From My Partners Roommate.mp4
Subtitled: TIFU By Joking About Getting a Handie From My Partners Roommate_out.mp4
Duration: 142.00 seconds
Pair 21: TIFU by stripping in front of my doctor
Normal: TIFU by stripping in front of my doctor.mp4
Subtitled: TIFU by stripping in front of my doctor_out.mp4
Duration: 91.02 seconds
Pair 22: TIFU I bit my daughter in my sleep
Normal: TIFU I bit my daughter in my sleep.mp4
Subtitled: TIFU I bit my daughter in my sleep_out.mp4
Duration: 62.00 seconds
Pair 23: UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand
Normal: UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand.mp4
Subtitled: UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4
Duration: 154.02 seconds
Pair 24: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years
Normal: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years.mp4
Subtitled: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years_out.mp4
Duration: 483.01 seconds
Pair 25: What can I 23M do to feel less turned on by my girlfriend 21F
Normal: What can I 23M do to feel less turned on by my girlfriend 21F.mp4
Subtitled: What can I 23M do to feel less turned on by my girlfriend 21F_out.mp4
Duration: 110.00 seconds
Pair 26: WIBTA if I left my mom to fend for herself because she didnt buy me any food
Normal: WIBTA if I left my mom to fend for herself because she didnt buy me any food.mp4
Subtitled: WIBTA if I left my mom to fend for herself because she didnt buy me any food_out.mp4
Duration: 160.00 seconds
Total complete pairs: 26
Total duration: 3312.97 seconds
Scanning folder: C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results\ScamNumbers+Scams
Duration of Avoid the account mackRichard on sleeper fantasy_out.mp4: 37.01 seconds
Duration of Elite Travel Scam won at a charity auction_out.mp4: 31.00 seconds
Duration of Now these numbers are saved for future people who will google them thank you reddit_out.mp4: 66.01 seconds
Found video pairs in ScamNumbers+Scams:
Pair 1: Avoid the account mackRichard on sleeper fantasy
Normal: Avoid the account mackRichard on sleeper fantasy.mp4
Subtitled: Avoid the account mackRichard on sleeper fantasy_out.mp4
Duration: 37.01 seconds
Pair 2: Elite Travel Scam won at a charity auction
Normal: Elite Travel Scam won at a charity auction.mp4
Subtitled: Elite Travel Scam won at a charity auction_out.mp4
Duration: 31.00 seconds
Pair 3: Now these numbers are saved for future people who will google them thank you reddit
Normal: Now these numbers are saved for future people who will google them thank you reddit.mp4
Subtitled: Now these numbers are saved for future people who will google them thank you reddit_out.mp4
Duration: 66.01 seconds
Total complete pairs: 3
Total duration: 134.02 seconds
Added: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years (483.01s) from
AmItheAsshole+relationship_advice+confession+tifu
Current total duration: 483.01s
Added: AITA for defending my daughters comments towards my other daughter being single (212.02s) from
AmItheAsshole+relationship_advice+confession+tifu
Current total duration: 695.03s
Final compilation duration: 695.03 seconds
Videos Selected for Compilation:
Video: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years
From: AmItheAsshole+relationship_advice+confession+tifu
Duration: 483.01 seconds
Video: AITA for defending my daughters comments towards my other daughter being single
From: AmItheAsshole+relationship_advice+confession+tifu
Duration: 212.02 seconds
Total Compilation Duration: 695.03 seconds
Processing video: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years
Error detecting title end: arrays to stack must be passed as a "sequence" type such as list or tuple.
Title ends at: 5.00s
Processing video: AITA for defending my daughters comments towards my other daughter being single
Error detecting title end: arrays to stack must be passed as a "sequence" type such as list or tuple.
Title ends at: 5.00s
Moviepy - Building video MergeVideo\compilation_1732208370.mp4.
MoviePy - Writing audio in temp-audio.m4a
chunk: 0%| | 0/30211 [00:00<?, ?it/s, now=None]Error merging videos: 'NoneType' object has no attribute 'get_frame'
Final compilation duration: 695.03 seconds
Scanning folder: C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results\AmItheAsshole+relationship_advice+confession+tifu
Duration of 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4: 116.01 seconds
Duration of AITA for being ungrateful and not eating the brownies my gf made for me_out.mp4: 137.01 seconds
Duration of AITA for defending my daughters comments towards my other daughter being single_out.mp4: 212.02 seconds
Duration of AITA for expecting not to have to pay for Thanksgiving groceries_out.mp4: 205.01 seconds
Duration of AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery_out.mp4: 102.00 seconds
Duration of AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me_out.mp4: 162.00
seconds
Duration of AITA for not canceling a non-refundable trip for Thanksgiving_out.mp4: 14.84 seconds
Duration of AITA for not letting my in-laws continue to be late for everything_out.mp4: 95.01 seconds
Duration of AITA for not taking my step daughter on vacation_out.mp4: 105.01 seconds
Duration of AITA for refusing to label my wedding cake as vegan because a guest felt tricked_out.mp4: 80.00 seconds
Duration of AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife_out.mp4: 119.02 seconds
Duration of AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket_out.mp4: 176.01 seconds
Duration of AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first_out.mp4: 31.92 seconds
Duration of I anonymously reported domestic abuse in my building_out.mp4: 41.00 seconds
Duration of I broke my arm going down on my friend with benefits_out.mp4: 4.04 seconds
Duration of Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths_out.mp4: 40.00 seconds
Duration of My mom caught my dad with a 16yo and covered it up_out.mp4: 174.01 seconds
Duration of My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him_out.mp4: 164.01 seconds
Duration of TIFU by forgetting that silence is the father of all disaster when you have kids or pets_out.mp4: 132.00 seconds
Duration of TIFU By Joking About Getting a Handie From My Partners Roommate_out.mp4: 142.00 seconds
Duration of TIFU by stripping in front of my doctor_out.mp4: 91.02 seconds
Duration of TIFU I bit my daughter in my sleep_out.mp4: 62.00 seconds
Duration of UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4: 154.02 secondsDuration of Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years_out.mp4: 483.01 seconds
Duration of What can I 23M do to feel less turned on by my girlfriend 21F_out.mp4: 110.00 seconds
Duration of WIBTA if I left my mom to fend for herself because she didnt buy me any food_out.mp4: 160.00 seconds
Found video pairs in AmItheAsshole+relationship_advice+confession+tifu:
Pair 1: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand
Normal: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand.mp4
Subtitled: 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4
Duration: 116.01 seconds
Pair 2: AITA for being ungrateful and not eating the brownies my gf made for me
Normal: AITA for being ungrateful and not eating the brownies my gf made for me.mp4
Subtitled: AITA for being ungrateful and not eating the brownies my gf made for me_out.mp4
Duration: 137.01 seconds
Pair 3: AITA for defending my daughters comments towards my other daughter being single
Normal: AITA for defending my daughters comments towards my other daughter being single.mp4
Subtitled: AITA for defending my daughters comments towards my other daughter being single_out.mp4
Duration: 212.02 seconds
Pair 4: AITA for expecting not to have to pay for Thanksgiving groceries
Normal: AITA for expecting not to have to pay for Thanksgiving groceries.mp4
Subtitled: AITA for expecting not to have to pay for Thanksgiving groceries_out.mp4
Duration: 205.01 seconds
Pair 5: AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery
Normal: AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery.mp4
Subtitled: AITA for Kicking My Boyfriend Out because he Didnt Take Me to My Oral Surgery_out.mp4
Duration: 102.00 seconds
Pair 6: AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me
Normal: AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me.mp4
Subtitled: AITA for not allowing my foster parents to put parental controls on the iphone my biological parents bought me_out.mp4
Duration: 162.00 seconds
Pair 7: AITA for not canceling a non-refundable trip for Thanksgiving
Normal: AITA for not canceling a non-refundable trip for Thanksgiving.mp4
Subtitled: AITA for not canceling a non-refundable trip for Thanksgiving_out.mp4
Duration: 14.84 seconds
Pair 8: AITA for not letting my in-laws continue to be late for everything
Normal: AITA for not letting my in-laws continue to be late for everything.mp4
Subtitled: AITA for not letting my in-laws continue to be late for everything_out.mp4
Duration: 95.01 seconds
Pair 9: AITA for not taking my step daughter on vacation
Normal: AITA for not taking my step daughter on vacation.mp4
Subtitled: AITA for not taking my step daughter on vacation_out.mp4
Duration: 105.01 seconds
Pair 10: AITA for refusing to label my wedding cake as vegan because a guest felt tricked
Normal: AITA for refusing to label my wedding cake as vegan because a guest felt tricked.mp4
Subtitled: AITA for refusing to label my wedding cake as vegan because a guest felt tricked_out.mp4
Duration: 80.00 seconds
Pair 11: AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife
Normal: AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife.mp4
Subtitled: AITA for refusing to let my brother bring his girlfriend to Thanksgiving after she disrespected my wife_out.mp4
Duration: 119.02 seconds
Pair 12: AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket
Normal: AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket.mp4
Subtitled: AITA for telling my bfs aunt I could call the cops on her after she stole my Coachella ticket_out.mp4
Duration: 176.01 seconds
Pair 13: AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first
Normal: AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first.mp4
Subtitled: AITAH for refusing to hand over my grandmothers jewelry to my cousin who was promised it first_out.mp4
Duration: 31.92 seconds
Pair 14: I anonymously reported domestic abuse in my building
Normal: I anonymously reported domestic abuse in my building.mp4
Subtitled: I anonymously reported domestic abuse in my building_out.mp4
Duration: 41.00 seconds
Pair 15: I broke my arm going down on my friend with benefits
Normal: I broke my arm going down on my friend with benefits.mp4
Subtitled: I broke my arm going down on my friend with benefits_out.mp4
Duration: 4.04 seconds
Pair 16: Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths
Normal: Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths.mp4
Subtitled: Inappropriate Neighborhood Comment - Some Revelations should Stay in Mouths_out.mp4
Duration: 40.00 seconds
Pair 17: My mom caught my dad with a 16yo and covered it up
Normal: My mom caught my dad with a 16yo and covered it up.mp4
Subtitled: My mom caught my dad with a 16yo and covered it up_out.mp4
Duration: 174.01 seconds
Pair 18: My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him
Normal: My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him.mp4
Subtitled: My sister got pregnant 14 years ago and our parents raised her son as their own Weve never told him_out.mp4
Duration: 164.01 seconds
Pair 19: TIFU by forgetting that silence is the father of all disaster when you have kids or pets
Normal: TIFU by forgetting that silence is the father of all disaster when you have kids or pets.mp4
Subtitled: TIFU by forgetting that silence is the father of all disaster when you have kids or pets_out.mp4
Duration: 132.00 seconds
Pair 20: TIFU By Joking About Getting a Handie From My Partners Roommate
Normal: TIFU By Joking About Getting a Handie From My Partners Roommate.mp4
Subtitled: TIFU By Joking About Getting a Handie From My Partners Roommate_out.mp4
Duration: 142.00 seconds
Pair 21: TIFU by stripping in front of my doctor
Normal: TIFU by stripping in front of my doctor.mp4
Subtitled: TIFU by stripping in front of my doctor_out.mp4
Duration: 91.02 seconds
Pair 22: TIFU I bit my daughter in my sleep
Normal: TIFU I bit my daughter in my sleep.mp4
Subtitled: TIFU I bit my daughter in my sleep_out.mp4
Duration: 62.00 seconds
Pair 23: UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand
Normal: UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand.mp4
Subtitled: UPDATE 26M 3 Years with Fiancée 24F Shes got me paying for Her ENTIRE Family Is this getting out of hand_out.mp4
Duration: 154.02 seconds
Pair 24: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years
Normal: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years.mp4
Subtitled: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years_out.mp4
Duration: 483.01 seconds
Pair 25: What can I 23M do to feel less turned on by my girlfriend 21F
Normal: What can I 23M do to feel less turned on by my girlfriend 21F.mp4
Subtitled: What can I 23M do to feel less turned on by my girlfriend 21F_out.mp4
Duration: 110.00 seconds
Pair 26: WIBTA if I left my mom to fend for herself because she didnt buy me any food
Normal: WIBTA if I left my mom to fend for herself because she didnt buy me any food.mp4
Subtitled: WIBTA if I left my mom to fend for herself because she didnt buy me any food_out.mp4
Duration: 160.00 seconds
Total complete pairs: 26
Total duration: 3312.97 seconds
Scanning folder: C:\Users\buggy\Desktop\FullyAutomatedRedditVideoMakerBot-main\results\ScamNumbers+Scams
Duration of Avoid the account mackRichard on sleeper fantasy_out.mp4: 37.01 seconds
Duration of Elite Travel Scam won at a charity auction_out.mp4: 31.00 seconds
Duration of Now these numbers are saved for future people who will google them thank you reddit_out.mp4: 66.01 seconds
Found video pairs in ScamNumbers+Scams:
Pair 1: Avoid the account mackRichard on sleeper fantasy
Normal: Avoid the account mackRichard on sleeper fantasy.mp4
Subtitled: Avoid the account mackRichard on sleeper fantasy_out.mp4
Duration: 37.01 seconds
Pair 2: Elite Travel Scam won at a charity auction
Normal: Elite Travel Scam won at a charity auction.mp4
Subtitled: Elite Travel Scam won at a charity auction_out.mp4
Duration: 31.00 seconds
Pair 3: Now these numbers are saved for future people who will google them thank you reddit
Normal: Now these numbers are saved for future people who will google them thank you reddit.mp4
Subtitled: Now these numbers are saved for future people who will google them thank you reddit_out.mp4
Duration: 66.01 seconds
Total complete pairs: 3
Total duration: 134.02 seconds
Added: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years (483.01s) from
AmItheAsshole+relationship_advice+confession+tifu
Current total duration: 483.01s
Added: AITA for defending my daughters comments towards my other daughter being single (212.02s) from
AmItheAsshole+relationship_advice+confession+tifu
Current total duration: 695.03s
Final compilation duration: 695.03 seconds
Videos Selected for Compilation:
Video: Update How do I 49f move forward after my daughter 22F hid her fathers affair from me for two years
From: AmItheAsshole+relationship_advice+confession+tifu
Duration: 483.01 seconds
Video: AITA for defending my daughters comments towards my other daughter being single
From: AmItheAsshole+relationship_advice+confession+tifu
Duration: 212.02 seconds
Total Compilation Duration: 695.03 seconds
Waiting 30 minutes before next check...
merge_folder
The log should indicate whether the final compilation succeeded, including details like total duration and status messages.
7. User Interaction and Pausing
As indicated in your logs, you can control the status of processing by modifying the merger_config.toml file. Test this feature by changing the status to 'paused' or 'stopping' to observe the response of the script.
Ensure that it responds to these changes correctly without interrupting or crashing during runs.
Final Steps
If you encounter any issues, such as errors during audio analysis, you might consider implementing additional debugging logs to help identify where the data is not as expected. Breakpoints or additional print statements can help clarify the flow of data through the script functions.
If you find that everything works as intended based on the above checks, your system is functioning correctly. If errors persist, specifically review the lines of code where the errors are raised and ensure that the files being processed have the expected formats and integrity.
If you provide me with specific error messages or issues you encounter while running the code, I can help explain what they mean and how to fix them.
Simplifying the Code:
If you prefer, I can help simplify parts of the code. For instance, we could remove complex functionalities that might not be necessary for basic operations.
Step-by-Step Debugging:
If you're facing errors, I can walk you through debugging methods in more straightforward terms, including adding print statements to the code to track where things go wrong.
Alternatives:
If programming feels overwhelming, consider using software tools available for video editing and merging. I can suggest free or paid applications that can achieve similar outcomes without involving coding.
Learning Resources:
If you're interested in learning a bit about programming, I can recommend beginner-friendly resources to get started, including websites and videos that explain Python and video processing in simple terms.
Encouragement
Don’t hesitate to ask for specific help! Programming can be a learning curve, but I'm here to support you, whether it's troubleshooting errors, explaining how code functions, or finding alternative solutions. Let me know what you'd like to tackle first!
Verify Input Videos:
Make sure you have both the normal and subtitled video files in the folders specified. They should have the correct naming conventions (e.g., video.mp4 and video_out.mp4).
Run the Script:
Launch the script from the command prompt and check for messages about found files or errors. Pay close attention to any output during execution.
Print Debugging:
If you're comfortable with modifying the script, you can add print statements to check the state of variables, such as:
This will tell you what files the script is attempting to process.
Steps You Can Take
Recheck Your Files: Ensure the necessary video files are in place.
Run the Script Again: Execute the script and observe the output in the command prompt for errors or confirmations.
Let Me Know the Outputs: Share any error messages or outputs you see in the terminal. This feedback will give me more insight into what’s happening.
Conclusion
The script is designed to automate video compilation, but its success relies on having the right input files, configurations, and error handling. If after checking everything it still does not create output files, feel free to share the output from running the code so I can help you troubleshoot further.