From f7d6dc41b3a49cd87e610d239ae2067a8a3f8aaa Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Sun, 28 Aug 2022 03:44:27 +0000 Subject: [PATCH] changed FFmpeg vsync to fps_mode --- video2x/decoder.py | 2 +- video2x/encoder.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/video2x/decoder.py b/video2x/decoder.py index 03709a5..cd333a7 100755 --- a/video2x/decoder.py +++ b/video2x/decoder.py @@ -79,7 +79,7 @@ class VideoDecoder: self.decoder = subprocess.Popen( ffmpeg.compile( ffmpeg.input(input_path, r=frame_rate)["v"] - .output("pipe:1", format="rawvideo", pix_fmt="rgb24", vsync="cfr") + .output("pipe:1", format="rawvideo", pix_fmt="rgb24", fps_mode="cfr") .global_args("-hide_banner") .global_args("-nostats") .global_args("-nostdin") diff --git a/video2x/encoder.py b/video2x/encoder.py index 109dd4a..bcaa718 100755 --- a/video2x/encoder.py +++ b/video2x/encoder.py @@ -66,7 +66,6 @@ class VideoEncoder: "pipe:0", format="rawvideo", pix_fmt="rgb24", - vsync="cfr", s=f"{output_width}x{output_height}", r=frame_rate, ) @@ -90,7 +89,7 @@ class VideoEncoder: str(output_path), vcodec="libx264", scodec="copy", - vsync="cfr", + fps_mode="cfr", pix_fmt="yuv420p", crf=17, preset="veryslow",