Merge pull request #1626 from joshholly/joshholly-fix-opacity
Fixed Opacity Function
This commit is contained in:
1 file changed
+5
-3
@@ -142,6 +142,8 @@ def make_final_video(
|
||||
# settings values
|
||||
W: Final[int] = int(settings.config["settings"]["resolution_w"])
|
||||
H: Final[int] = int(settings.config["settings"]["resolution_h"])
|
||||
"""Fixed to allow fraction opacity Ea: 0.7"""
|
||||
opacity = settings.config["settings"]["opacity"]
|
||||
|
||||
reddit_id = re.sub(r"[^\w\s-]", "", reddit_obj["thread_id"])
|
||||
|
||||
@@ -269,8 +271,9 @@ def make_final_video(
|
||||
"v"
|
||||
].filter("scale", screenshot_width, -1)
|
||||
)
|
||||
image_overlay = image_clips[i].filter("colorchannelmixer", aa=opacity)
|
||||
background_clip = background_clip.overlay(
|
||||
image_clips[i],
|
||||
image_overlay,
|
||||
enable=f"between(t,{current_time},{current_time + audio_clips_durations[i]})",
|
||||
x="(main_w-overlay_w)/2",
|
||||
y="(main_h-overlay_h)/2",
|
||||
@@ -399,9 +402,8 @@ def make_final_video(
|
||||
old_percentage = pbar.n
|
||||
pbar.update(100 - old_percentage)
|
||||
pbar.close()
|
||||
|
||||
save_data(subreddit, filename + ".mp4", title, idx, background_config['video'][2])
|
||||
print_step("Removing temporary files 🗑")
|
||||
cleanups = cleanup(reddit_id)
|
||||
print_substep(f"Removed {cleanups} temporary files 🗑")
|
||||
print_step("Done! 🎉 The video is in the results folder 📁")
|
||||
print_step("Done! 🎉 The video is in the results folder 📁")
|
||||
Reference in new issue
Block a user