attempting to fix #442

This commit is contained in:
K4YT3X 2021-01-23 16:33:40 -05:00
parent cde02be32b
commit dc51b8b04c
2 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@
Name: Video2X Upscaler Name: Video2X Upscaler
Author: K4YT3X Author: K4YT3X
Date Created: December 10, 2018 Date Created: December 10, 2018
Last Modified: December 30, 2020 Last Modified: January 23, 2021
Description: This file contains the Upscaler class. Each Description: This file contains the Upscaler class. Each
instance of the Upscaler class is an upscaler on an image or 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 # otherwise call FFprobe to count the total number of frames
else: else:
self.total_frames = self.ffmpeg_object.get_number_of_frames( 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 # calculate scale width/height/ratio and scaling jobs if required

View File

@ -4,7 +4,7 @@
Name: Video2X FFmpeg Controller Name: Video2X FFmpeg Controller
Author: K4YT3X Author: K4YT3X
Date Created: Feb 24, 2018 Date Created: Feb 24, 2018
Last Modified: September 13, 2020 Last Modified: January 23, 2021
Description: This class handles all FFmpeg related operations. Description: This class handles all FFmpeg related operations.
""" """
@ -80,7 +80,7 @@ class Ffmpeg:
return pixel_formats 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 """Count the number of frames in a video
Args: Args:
@ -97,7 +97,7 @@ class Ffmpeg:
"quiet", "quiet",
"-count_frames", "-count_frames",
"-select_streams", "-select_streams",
f"v:{video_stream_index}", "v",
"-show_entries", "-show_entries",
"stream=nb_read_frames", "stream=nb_read_frames",
"-of", "-of",