You've already forked my-video-workflow
							
							LoadConfig ,无GPU兼容
This commit is contained in:
		| @@ -1,8 +1,10 @@ | ||||
| import argparse | ||||
|  | ||||
| from config import load_config | ||||
| from worker.danmaku import do_workflow | ||||
|  | ||||
| if __name__ == '__main__': | ||||
|     load_config() | ||||
|     parser = argparse.ArgumentParser() | ||||
|     parser.add_argument("video", help="视频标准") | ||||
|     parser.add_argument("base", help="弹幕标准") | ||||
|   | ||||
| @@ -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