Ajusta presets de render

This commit is contained in:
LeoMortari
2026-01-04 03:34:48 -03:00
parent e4c5c6adfe
commit f496663b63

View File

@@ -40,14 +40,17 @@ def cut_video_new_clip(input_path: str, start: float, end: float, output_path: s
segment = clip.subclipped(start, end) segment = clip.subclipped(start, end)
fps = clip.fps or 30 fps = clip.fps or 30
if segment.h < 720:
segment = segment.resized(height=720)
segment.write_videofile( segment.write_videofile(
output_path, output_path,
codec=video_codec, codec=video_codec,
remove_temp=True, remove_temp=True,
fps=fps, fps=fps,
bitrate="3000k", bitrate="5000k",
ffmpeg_params=[ ffmpeg_params=[
"-preset", "ultrafast", "-preset", "fast",
"-tune", "zerolatency", "-tune", "zerolatency",
"-pix_fmt", "yuv420p", "-pix_fmt", "yuv420p",
"-profile:v", "high", "-profile:v", "high",
@@ -98,9 +101,9 @@ def process_segment(input_path: str, top_text: str = "", bottom_text: str = "",
codec=video_codec, codec=video_codec,
remove_temp=True, remove_temp=True,
fps=30, fps=30,
bitrate="3000k", bitrate="5000k",
ffmpeg_params=[ ffmpeg_params=[
"-preset", "ultrafast", "-preset", "fast",
"-tune", "zerolatency", "-tune", "zerolatency",
"-pix_fmt", "yuv420p", "-pix_fmt", "yuv420p",
"-profile:v", "high", "-profile:v", "high",