From 5c9da112ce17061b9a7e86e9b94528b098f960da Mon Sep 17 00:00:00 2001 From: RapidStoned Date: Mon, 22 Aug 2022 18:01:39 +0200 Subject: [PATCH] Looking for conflic.-. --- utils/.config.template.toml | 3 +-- video_creation/final_video.py | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/utils/.config.template.toml b/utils/.config.template.toml index 31c1027..adbaed0 100644 --- a/utils/.config.template.toml +++ b/utils/.config.template.toml @@ -22,8 +22,7 @@ times_to_run = { optional = false, default = 1, example = 2, explanation = "Used opacity = { optional = false, default = 0.9, example = 0.8, explanation = "Sets the opacity of the comments when overlayed over the background", type = "float", nmin = 0, nmax = 1, oob_error = "The opacity HAS to be between 0 and 1", input_error = "The opacity HAS to be a decimal number between 0 and 1" } transition = { optional = true, default = 0.2, example = 0.2, explanation = "Sets the transition time (in seconds) between the comments. Set to 0 if you want to disable it.", type = "float", nmin = 0, nmax = 2, oob_error = "The transition HAS to be between 0 and 2", input_error = "The opacity HAS to be a decimal number between 0 and 2" } storymode = { optional = true, type = "bool", default = false, example = false, options = [true, false,], explanation = "Only read out title and post content, not yet implemented" } -sub_overlay = { optional = true, type = "bool", default = false, example = false, options = [true, false], explanation = "This will add a subscribe animation overlay to the end of the video" } -sub_overlay_name = { optional = true, default = "youtube", options = ["youtube", "tiktok", "instagram"], explanation = "Choose which overlay you would like"} + [settings.background] background_choice = { optional = true, default = "minecraft", example = "rocket-league", options = ["minecraft", "gta", "rocket-league", "motor-gta", "csgo-surf", "cluster-truck", ""], explanation = "Sets the background for the video based on game name" } diff --git a/video_creation/final_video.py b/video_creation/final_video.py index 743e561..150fd5e 100755 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -143,6 +143,11 @@ def make_final_video( final = Video(final).add_watermark( text=f"Background credit: {background_config[2]}", opacity=0.4, redditid=reddit_obj ) + + # Add an overlay + if settings.config["settings"]["sub_overlay"]: + final = Video(final).add_overlay() + final.write_videofile( f"assets/temp/{id}/temp.mp4", fps=30,