diff --git a/src/upscaler.py b/src/upscaler.py index 3e0137f..c5813c8 100755 --- a/src/upscaler.py +++ b/src/upscaler.py @@ -4,7 +4,7 @@ Name: Video2X Upscaler Author: K4YT3X Date Created: December 10, 2018 -Last Modified: December 30, 2020 +Last Modified: January 23, 2021 Description: This file contains the Upscaler class. Each instance of the Upscaler class is an upscaler on an image or @@ -716,7 +716,7 @@ class Upscaler: # otherwise call FFprobe to count the total number of frames else: self.total_frames = self.ffmpeg_object.get_number_of_frames( - self.current_input_file, video_stream_index + self.current_input_file ) # calculate scale width/height/ratio and scaling jobs if required diff --git a/src/wrappers/ffmpeg.py b/src/wrappers/ffmpeg.py index 58b04fc..1909f01 100755 --- a/src/wrappers/ffmpeg.py +++ b/src/wrappers/ffmpeg.py @@ -4,7 +4,7 @@ Name: Video2X FFmpeg Controller Author: K4YT3X Date Created: Feb 24, 2018 -Last Modified: September 13, 2020 +Last Modified: January 23, 2021 Description: This class handles all FFmpeg related operations. """ @@ -80,7 +80,7 @@ class Ffmpeg: return pixel_formats - def get_number_of_frames(self, input_file: str, video_stream_index: int) -> int: + def get_number_of_frames(self, input_file: str) -> int: """Count the number of frames in a video Args: @@ -97,7 +97,7 @@ class Ffmpeg: "quiet", "-count_frames", "-select_streams", - f"v:{video_stream_index}", + "v", "-show_entries", "stream=nb_read_frames", "-of",