Realiza varios ajustes para melhorar o tracking e o render de video
This commit is contained in:
@@ -345,7 +345,9 @@ class VideoRenderer:
|
||||
target_width=settings.rendering.frame_width,
|
||||
target_height=settings.rendering.frame_height,
|
||||
frame_skip=settings.rendering.smart_framing_frame_skip,
|
||||
smoothing_window=settings.rendering.smart_framing_smoothing_window
|
||||
smoothing_window=settings.rendering.smart_framing_smoothing_window,
|
||||
max_velocity=settings.rendering.smart_framing_max_velocity,
|
||||
person_switch_cooldown=settings.rendering.smart_framing_person_switch_cooldown
|
||||
)
|
||||
|
||||
def render(
|
||||
@@ -436,12 +438,10 @@ class VideoRenderer:
|
||||
audio_samples=audio_samples
|
||||
)
|
||||
|
||||
# Apply smart framing based on detected layout
|
||||
use_split_screen = framing_plan.layout_mode in ["dual_split", "grid"]
|
||||
# Apply smart framing (always single-person focus)
|
||||
video_clip = self.smart_framer.apply_framing(
|
||||
video_clip=subclip,
|
||||
framing_plan=framing_plan,
|
||||
use_split_screen=use_split_screen
|
||||
framing_plan=framing_plan
|
||||
)
|
||||
|
||||
logger.info(f"Smart framing applied: layout={framing_plan.layout_mode}, "
|
||||
@@ -602,6 +602,10 @@ class VideoRenderer:
|
||||
if audio_clip is not None and audio_needs_close:
|
||||
audio_clip.close()
|
||||
|
||||
# Force garbage collection to free memory after rendering
|
||||
import gc
|
||||
gc.collect()
|
||||
|
||||
return str(output_path)
|
||||
|
||||
def _materialize_audio(
|
||||
|
||||
Reference in New Issue
Block a user