added ffmpeg-path settings. The exe will be installed by the installer
This commit is contained in:
@@ -26,7 +26,7 @@ class Handler:
|
|||||||
self.tmppath = ""
|
self.tmppath = ""
|
||||||
self.videometa = {}
|
self.videometa = {}
|
||||||
|
|
||||||
def handler(self, fsrpath, filepath, quality_mode, quality_setting, output_path, ffmpegpath):
|
def handler(self, fsrpath, filepath, quality_mode, quality_setting, output_path):
|
||||||
# Function to be called when using this class as this function automatically determines if file is video or image
|
# Function to be called when using this class as this function automatically determines if file is video or image
|
||||||
if self.os_type == "linux":
|
if self.os_type == "linux":
|
||||||
self.tmppath = config["PathSettings"]["tmpPathLinux"]
|
self.tmppath = config["PathSettings"]["tmpPathLinux"]
|
||||||
@@ -36,7 +36,7 @@ class Handler:
|
|||||||
print("OS CURRENTLY UNSUPPORTED!")
|
print("OS CURRENTLY UNSUPPORTED!")
|
||||||
return False
|
return False
|
||||||
self.tmppath += "fsru/"
|
self.tmppath += "fsru/"
|
||||||
print(self.tmppath)
|
self.ffmpegpath = config["PathSettings"]["ffmpeg"]
|
||||||
# checking for spaces in filepath (for use with terminal commands)
|
# checking for spaces in filepath (for use with terminal commands)
|
||||||
self.filepath = ""
|
self.filepath = ""
|
||||||
for self.letter in filepath:
|
for self.letter in filepath:
|
||||||
@@ -48,7 +48,7 @@ class Handler:
|
|||||||
# Determining filetype
|
# Determining filetype
|
||||||
if str(filepath)[len(filepath) - 4:] == ".mp4" or str(filepath)[len(filepath) - 4:] == ".mkv":
|
if str(filepath)[len(filepath) - 4:] == ".mp4" or str(filepath)[len(filepath) - 4:] == ".mkv":
|
||||||
print("upscaling video")
|
print("upscaling video")
|
||||||
self.video_scaling(ffmpegpath, fsrpath, filepath, quality_mode, quality_setting, output_path)
|
self.video_scaling(self.ffmpegpath, fsrpath, filepath, quality_mode, quality_setting, output_path)
|
||||||
elif str(filepath)[len(filepath) - 4:] == ".JPG" or str(filepath)[len(filepath) - 4:] == ".png" or str(filepath)[len(filepath) - 4:] == ".jpg" or str(filepath)[len(filepath) - 5:] == ".jpeg":
|
elif str(filepath)[len(filepath) - 4:] == ".JPG" or str(filepath)[len(filepath) - 4:] == ".png" or str(filepath)[len(filepath) - 4:] == ".jpg" or str(filepath)[len(filepath) - 5:] == ".jpeg":
|
||||||
print("upscaling image")
|
print("upscaling image")
|
||||||
self.photo_scaling(fsrpath, filepath, quality_mode, quality_setting, output_path)
|
self.photo_scaling(fsrpath, filepath, quality_mode, quality_setting, output_path)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
defaultOutputPath = $HOME/FSRImageVideoUpscaler/
|
defaultOutputPath = $HOME/FSRImageVideoUpscaler/
|
||||||
tmpPathLinux = /tmp/
|
tmpPathLinux = /tmp/
|
||||||
tmpPathWindows = %TEMP%
|
tmpPathWindows = %TEMP%
|
||||||
|
ffmpeg = ./bin/lib/ffmpeg.exe
|
||||||
|
|
||||||
[DevSettings]
|
[DevSettings]
|
||||||
loggerReqLevel = DEBUG
|
loggerReqLevel = DEBUG
|
||||||
Reference in New Issue
Block a user