diff --git a/manual/video_builder.py b/manual/video_builder.py index eb28771..b11ff5d 100644 --- a/manual/video_builder.py +++ b/manual/video_builder.py @@ -170,7 +170,11 @@ class ManualVideoBuilder: # Step 6: Overlay screenshots print_step("🖼️ Overlaying screenshots...") - screenshot_width = int((self.W * 45) // 100) + # Scale background to final resolution FIRST to avoid scaling issues + background_clip = background_clip.filter("scale", self.W, self.H) + + screenshot_width_percent = self.config.get("screenshot_width_percent", 85) + screenshot_width = int((self.W * screenshot_width_percent) // 100) current_time = 0 for s in clips: @@ -185,9 +189,6 @@ class ManualVideoBuilder: ) current_time += s["audio_duration"] - # Scale to final resolution - background_clip = background_clip.filter("scale", self.W, self.H) - # Step 7: Render print_step("🎥 Rendering the video...") self.output_dir.mkdir(parents=True, exist_ok=True) diff --git a/manual_main.py b/manual_main.py index 6998267..31c0023 100644 --- a/manual_main.py +++ b/manual_main.py @@ -50,6 +50,7 @@ MANUAL_DEFAULTS = { "background_audio_dir": "assets/backgrounds/audio", "background_audio_volume": 0.1, "max_video_length": 120, + "screenshot_width_percent": 85 } # Full default settings.config that TTS engines and shared modules expect.