Ajustes de rendering

This commit is contained in:
LeoMortari
2025-10-27 09:15:12 -03:00
parent ba768cf093
commit 8caa849148
5 changed files with 34 additions and 27 deletions

View File

@@ -279,8 +279,9 @@ class VideoRenderer:
caption_clips = []
caption_resources: List[ImageClip] = []
caption_y = frame_h - bottom_h + (bottom_h - self.captions.canvas_height) // 2
margin = 20
caption_y = max(0, video_y - self.captions.canvas_height - margin)
for clip_set in caption_sets:
base_positioned = clip_set.base.with_position(("center", caption_y))
caption_clips.append(base_positioned)
@@ -299,7 +300,7 @@ class VideoRenderer:
font_size=self.settings.rendering.subtitle_font_size,
color=self.settings.rendering.base_color,
method="caption",
size=(frame_w - 160, bottom_h - 40),
size=(frame_w - 160, max(40, self.captions.canvas_height)),
)
.with_duration(duration)
.with_position(("center", caption_y))