@ -12,4 +12,5 @@ THEME=""
SUBREDDIT=""
# Range is 0 -> 1
OPACITY="0.9"
TITLE_OPACITY="1"
COMMENT_OPACITY="0.9"
@ -7,7 +7,7 @@ from video_creation.final_video import make_final_video
from dotenv import load_dotenv
import os, time, shutil
REQUIRED_VALUES = ["REDDIT_CLIENT_ID","REDDIT_CLIENT_SECRET","REDDIT_USERNAME","REDDIT_PASSWORD", "OPACITY"]
REQUIRED_VALUES = ["REDDIT_CLIENT_ID","REDDIT_CLIENT_SECRET","REDDIT_USERNAME","REDDIT_PASSWORD", "COMMENT_OPACITY", "TITLE_OPACITY"]
print_markdown(
"### Thanks for using this tool! [Feel free to contribute to this project on GitHub!](https://lewismenelaws.com) If you have any questions, feel free to reach out to me on Twitter or submit a GitHub issue."
@ -21,7 +21,8 @@ def make_final_video(number_of_clips):
# Calls opacity from the .env
load_dotenv()
opacity = os.getenv('OPACITY')
titleopacity = os.getenv('COMMENT_OPACITY')
commentopacity = os.getenv('TITLE_OPACITY')
print_step("Creating the final video...")
@ -51,7 +52,7 @@ def make_final_video(number_of_clips):
.set_duration(audio_clips[i + 1].duration)
.set_position("center")
.resize(width=W - 100)
.set_opacity(float(opacity)),
.set_opacity(float(commentopacity)),
)
image_clips.insert(
0,
@ -59,7 +60,7 @@ def make_final_video(number_of_clips):
.set_duration(audio_clips[0].duration)
.set_opacity(float(titleopacity)),
image_concat = concatenate_videoclips(image_clips).set_position(
("center", "center")