You've already forked my-video-workflow
LoadConfig ,无GPU兼容
This commit is contained in:
@ -23,7 +23,8 @@ def get_video_real_duration(filename):
|
||||
def encode_video_with_subtitles(orig_filename: str, subtitles: list[str], new_filename: str):
|
||||
encode_process = subprocess.Popen([
|
||||
FFMPEG_EXEC, "-hide_banner", "-progress", "-", "-v", "0", "-y",
|
||||
"-i", orig_filename, "-vf", ",".join("subtitles=%s" % i for i in subtitles) + ",hwupload_cuda",
|
||||
"-i", orig_filename, "-vf",
|
||||
",".join("subtitles=%s" % i for i in subtitles) + (",hwupload_cuda" if FFMPEG_USE_GPU else ""),
|
||||
"-c:a", "copy", "-c:v", "h264_nvenc" if FFMPEG_USE_GPU else "h264", "-f", "mp4",
|
||||
"-preset:v", "fast", "-profile:v", "high", "-level", "4.1",
|
||||
"-b:v", VIDEO_BITRATE, "-rc:v", "vbr", "-tune", "hq",
|
||||
|
Reference in New Issue
Block a user