From a941eb6b98a18f5d1cb02a1f3f186520092f8679 Mon Sep 17 00:00:00 2001 From: Leonardo Mortari Date: Mon, 4 Aug 2025 13:08:57 -0300 Subject: [PATCH] Adjusta vars de font e videocodec --- components/video.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/components/video.py b/components/video.py index 56b54cd..70d9c09 100644 --- a/components/video.py +++ b/components/video.py @@ -9,7 +9,7 @@ font = "./Montserrat.ttf" font_size = 70 video_codec = "libx264" -def auto_wrap_text(text, font, font_size, max_width): +def auto_wrap_text(text, max_width): if not text: return "" @@ -67,8 +67,8 @@ def process_segment(input_path: str, top_text: str = "", bottom_text: str = "", video_resized = clip.resized(width=final_width) y = top_h + (middle_h - video_resized.h) // 2 video_resized = video_resized.with_position((0, y)) - wrapped_top_text = auto_wrap_text(top_text, font, font_size, final_width - 40) - wrapped_bottom_text = auto_wrap_text(bottom_text, font, font_size, final_width - 40) + wrapped_top_text = auto_wrap_text(top_text, final_width - 40) + wrapped_bottom_text = auto_wrap_text(bottom_text, final_width - 40) txt_top = TextClip( text=wrapped_top_text, @@ -134,8 +134,6 @@ def process_full_video(filename: str, times: list = None) -> list: video_path = f"videos/{filename}" processed = [] - video_codec = "libx264" - print(f"Total de trechos: {len(times)}") print(f"Codec de render: {video_codec}")