支持更高gop,重新编码音频

This commit is contained in:
Jerry Yan 2022-12-05 14:36:19 +08:00
parent 9395fec802
commit cf7b56d2e3

View File

@ -352,7 +352,7 @@ class WorkerThread(QThread):
split_process = subprocess.Popen([
FFMPEG_EXEC, "-y", "-hide_banner", "-progress", "-", "-loglevel", "error",
"-ss", str(current_sec),
"-i", file, "-c", "copy", "-f", "mp4",
"-i", file, "-c:v", "copy", "-f", "mp4", "-c:a", "aac",
"-t", str(VIDEO_CLIP_EACH_SEC + VIDEO_CLIP_OVERFLOW_SEC),
"-fflags", "+genpts", "-shortest", "-movflags", "faststart",
os.path.join(VIDEO_OUTPUT_DIR, "{}.mp4".format(current_dt))
@ -589,7 +589,7 @@ def _common_ffmpeg_setting():
def _common_ffmpeg_params():
return (
"-f", "mp4", "-b:v", VIDEO_BITRATE, "-c:a", "copy",
"-f", "mp4", "-b:v", VIDEO_BITRATE, "-c:a", "aac",
"-preset:v", "fast", "-profile:v", "main", "-avoid_negative_ts", "1",
"-qmin", "18", "-qmax", "38", "-crf", str(VIDEO_CRF), "-g:v", str(VIDEO_GOP),
"-fflags", "+genpts", "-shortest", "-movflags", "faststart"