参数写错BUG
This commit is contained in:
parent
25d0ad097e
commit
28627e8816
@ -341,10 +341,8 @@ class WorkerThread(QThread):
|
|||||||
"-i", orig_filename, "-vf",
|
"-i", orig_filename, "-vf",
|
||||||
",".join("subtitles=%s" % i for i in subtitles) + ",hwupload_cuda",
|
",".join("subtitles=%s" % i for i in subtitles) + ",hwupload_cuda",
|
||||||
"-c:a", "copy", "-c:v", "h264_nvenc",
|
"-c:a", "copy", "-c:v", "h264_nvenc",
|
||||||
"-f", "mp4", "-preset:v", "fast", "-profile:v", "high", "-level", "4.1",
|
"-f", "mp4", "-b:v", VIDEO_BITRATE, "-rc:v", "vbr", "-tune:v", "hq",
|
||||||
"-b:v", VIDEO_BITRATE, "-rc:v", "vbr", "-tune:v", "hq",
|
*_common_ffmpeg_params(),
|
||||||
"-qmin", "10", "-qmax", "32", "-crf", "16",
|
|
||||||
"-fflags", "+genpts", "-shortest", "-movflags", "faststart",
|
|
||||||
# "-t", "10",
|
# "-t", "10",
|
||||||
new_filename
|
new_filename
|
||||||
], **subprocess_args(True))
|
], **subprocess_args(True))
|
||||||
@ -396,6 +394,7 @@ class WorkerThread(QThread):
|
|||||||
self.encode_video_with_subtitles(orig_filename, subtitles, new_fullpath)
|
self.encode_video_with_subtitles(orig_filename, subtitles, new_fullpath)
|
||||||
return [new_fullpath]
|
return [new_fullpath]
|
||||||
duration = self.get_video_real_duration(orig_filename)
|
duration = self.get_video_real_duration(orig_filename)
|
||||||
|
print("[ ]Video Duration:", duration)
|
||||||
if duration > (VIDEO_CLIP_EACH_SEC * 5):
|
if duration > (VIDEO_CLIP_EACH_SEC * 5):
|
||||||
# qsv 压制前2段,剩余交由nvenc压制
|
# qsv 压制前2段,剩余交由nvenc压制
|
||||||
_slices = int(duration / VIDEO_CLIP_EACH_SEC)
|
_slices = int(duration / VIDEO_CLIP_EACH_SEC)
|
||||||
@ -422,7 +421,7 @@ class WorkerThread(QThread):
|
|||||||
"-t", str((_slices - 1) * VIDEO_CLIP_EACH_SEC + (VIDEO_CLIP_OVERFLOW_SEC * 0.8)),
|
"-t", str((_slices - 1) * VIDEO_CLIP_EACH_SEC + (VIDEO_CLIP_OVERFLOW_SEC * 0.8)),
|
||||||
"-i", orig_filename, "-vf",
|
"-i", orig_filename, "-vf",
|
||||||
",".join("subtitles=%s" % i for i in subtitles),
|
",".join("subtitles=%s" % i for i in subtitles),
|
||||||
"-c:a", "copy", "-c:v", "h264_nvenc", "-ss", str(VIDEO_CLIP_EACH_SEC * 2),
|
"-c:a", "copy", "-c:v", "h264_nvenc",
|
||||||
"-f", "mp4", "-b:v", VIDEO_BITRATE, "-rc:v", "vbr", "-tune:v", "hq",
|
"-f", "mp4", "-b:v", VIDEO_BITRATE, "-rc:v", "vbr", "-tune:v", "hq",
|
||||||
*_common_ffmpeg_params(),
|
*_common_ffmpeg_params(),
|
||||||
# "-t", "10",
|
# "-t", "10",
|
||||||
@ -459,7 +458,7 @@ class WorkerThread(QThread):
|
|||||||
"-t", str(_slices * VIDEO_CLIP_EACH_SEC + (VIDEO_CLIP_OVERFLOW_SEC * 0.8)),
|
"-t", str(_slices * VIDEO_CLIP_EACH_SEC + (VIDEO_CLIP_OVERFLOW_SEC * 0.8)),
|
||||||
"-i", orig_filename, "-vf",
|
"-i", orig_filename, "-vf",
|
||||||
",".join("subtitles=%s" % i for i in subtitles),
|
",".join("subtitles=%s" % i for i in subtitles),
|
||||||
"-c:a", "copy", "-c:v", "h264_nvenc", "-ss", str(VIDEO_CLIP_EACH_SEC),
|
"-c:a", "copy", "-c:v", "h264_nvenc",
|
||||||
"-f", "mp4", "-b:v", VIDEO_BITRATE, "-rc:v", "vbr", "-tune:v", "hq",
|
"-f", "mp4", "-b:v", VIDEO_BITRATE, "-rc:v", "vbr", "-tune:v", "hq",
|
||||||
*_common_ffmpeg_params(),
|
*_common_ffmpeg_params(),
|
||||||
# "-t", "10",
|
# "-t", "10",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user