Ajusta presets de render
This commit is contained in:
@@ -40,18 +40,21 @@ 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",
|
||||||
"-level", "4.1"
|
"-level", "4.1"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -98,13 +101,13 @@ 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",
|
||||||
"-level", "4.1"
|
"-level", "4.1"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user