This commit is contained in:
2025-08-05 16:12:29 +08:00
parent 2f694da5fd
commit 9a9630bf7c
2 changed files with 3 additions and 1 deletions

View File

@@ -293,6 +293,8 @@ class FfmpegTask(object):
output_args.append(video_output_str)
output_args.append("-r")
output_args.append(f"{self.frame_rate}")
output_args.append("-fps_mode")
output_args.append("cfr")
if self.mute:
input_index = input_args.count("-i")
input_args += MUTE_AUDIO_INPUT

View File

@@ -20,7 +20,7 @@ def re_encode_and_annexb(file):
return file
logger.info("ReEncodeAndAnnexb: %s", file)
has_audio = not not probe_video_audio(file)
ffmpeg_process = subprocess.run(["ffmpeg", "-y", "-hide_banner", "-vsync", "cfr", "-i", file,
ffmpeg_process = subprocess.run(["ffmpeg", "-y", "-hide_banner", "-fps_mode", "cfr", "-i", file,
*(set() if has_audio else MUTE_AUDIO_INPUT),
"-map", "0:v", "-map", "0:a" if has_audio else "1:a",
*VIDEO_ARGS, "-bsf:v", get_mp4toannexb_filter(),