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
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

View File

@ -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",