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