多GPU工作时,跳过空白

This commit is contained in:
Jerry Yan 2022-05-18 11:31:09 +08:00
parent ac314969d9
commit 3dcf787c58

@ -45,6 +45,7 @@ def multi_gpu_encode_video_with_subtitles(orig_filename: str, subtitles: list[st
"-hwaccel", "qsv", "-ss", str((_slices - 1) * VIDEO_CLIP_EACH_SEC),
"-copyts", "-i", orig_filename, "-vf",
",".join("subtitles=%s" % i for i in subtitles),
"-ss", str((_slices - 1) * VIDEO_CLIP_EACH_SEC),
"-c:a", "copy", "-c:v", "h264_qsv",
"-f", "mp4", "-b:v", VIDEO_BITRATE, "-rc:v", "vbr", "-tune:v", "hq",
*_common_ffmpeg_params(),
@ -80,6 +81,7 @@ def multi_gpu_encode_video_with_subtitles(orig_filename: str, subtitles: list[st
"-copyts", "-i", orig_filename, "-vf",
",".join("subtitles=%s" % i for i in subtitles),
"-c:a", "copy", "-c:v", "h264_qsv",
"-ss", str(_slices * VIDEO_CLIP_EACH_SEC),
"-f", "mp4", "-b:v", VIDEO_BITRATE, "-rc:v", "vbr", "-tune:v", "hq",
*_common_ffmpeg_params(),
# "-t", "10",