diff --git a/TTS/engine_wrapper.py b/TTS/engine_wrapper.py index e22c96b..213defb 100644 --- a/TTS/engine_wrapper.py +++ b/TTS/engine_wrapper.py @@ -13,7 +13,7 @@ from utils.console import print_step, print_substep from utils.voice import sanitize_text from utils import settings -DEFAULT_MAX_LENGTH: int = 5 # video length variable todo change +DEFAULT_MAX_LENGTH: int = 50 # video length variable class TTSEngine: diff --git a/utils/video.py b/utils/video.py index 5c89e3b..03ed88c 100644 --- a/utils/video.py +++ b/utils/video.py @@ -35,14 +35,13 @@ class Video: return ImageClip(path) def add_watermark(self, text, opacity=0.5, duration: int | float = 5, position: Tuple = (0.7, 0.9), fontsize=15): - print(len(text)) compensation = round((position[0] / ((len(text) * (fontsize / 5) / 1.5) / 100 + position[0] * position[0])), ndigits=2) position = (compensation, position[1]) - print(f'{compensation=}') - print(f'{position=}') + #print(f'{compensation=}') + #print(f'{position=}') img_clip = self._create_watermark(text, opacity=opacity, fontsize=fontsize) img_clip = img_clip.set_opacity(opacity).set_duration(duration) - img_clip = img_clip.set_position(position, relative=True) # set position doesn't work for some reason # fixme + img_clip = img_clip.set_position(position, relative=True) # todo get dara from utils/CONSTANTS.py and adapt position accordingly # Overlay the img clip on the first video clip self.video = CompositeVideoClip([self.video, img_clip])