Update handler.py

add lots of debug code
This commit is contained in:
Janis Hutz
2023-03-16 09:45:33 +00:00
committed by GitHub
parent 3937571114
commit b84d318b08

View File

@@ -94,6 +94,7 @@ class Handler:
# if ( sys.platform == 'win32' ):
# self.videometa = ffmpeg.probe(str(filepath))["streams"].pop(0)
# else:
print("\n\n\nupscaling video\n\n\n")
self.videometa = ffmpeg.probe(str(filepath))["streams"].pop(0)
# Retrieving Video metadata
self.duration = self.videometa.get("duration")
@@ -114,6 +115,8 @@ class Handler:
except FileExistsError:
pass
print("created dir")
if self.os_type == "linux":
print("linux")
self.command = f"ffmpeg -i {str(self.filepath)} {self.tmppath}ex%08d.png"
@@ -122,6 +125,8 @@ class Handler:
else:
print("OS CURRENTLY UNSUPPORTED!")
return False
print(self.command)
os.system(self.command)
print("video split")
@@ -140,6 +145,8 @@ class Handler:
self.maxlength = 31900
self.pos = 1
print("found files, assembling commands")
# Refactoring of commands that are longer than 32K characters
if len(self.files) > self.maxlength:
self.fileout = []
@@ -188,6 +195,8 @@ class Handler:
except FileExistsError:
pass
print("prepared commands")
# Upscaling images
print("\n\n\nUpscaling images... \n\n\n")
while self.fileout != []: