diff --git a/video_creation/final_video.py b/video_creation/final_video.py index 0e18d28..6035081 100644 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -12,7 +12,7 @@ from moviepy.editor import ( CompositeVideoClip, ) -import reddit.subreddit +import reddit.subreddit from utils.console import print_step @@ -20,9 +20,10 @@ W, H = 1080, 1920 def make_final_video(number_of_clips): - # Calls opacity from the .env load_dotenv() + opacity = os.getenv('OPACITY') + print_step("Creating the final video...") VideoFileClip.reW = lambda clip: clip.resize(width=W) @@ -74,6 +75,7 @@ def make_final_video(number_of_clips): ) image_concat.audio = audio_composite final = CompositeVideoClip([background_clip, image_concat]) + filename = ( re.sub('[?\"%*:|<>]', '', ("assets/" + reddit.subreddit.submission.title + ".mp4")) )