Adjusta vars de font e videocodec
This commit is contained in:
@@ -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}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user