Update handler.py

max cmd length windows + wrong filepath fix
This commit is contained in:
Janis Hutz
2023-03-16 10:08:13 +00:00
committed by GitHub
parent 0917911998
commit ca85822530

View File

@@ -142,7 +142,11 @@ class Handler:
self.files += f"{self.tmppath}{self.file} {self.tmppath}sc\\ig{str(self.number).zfill(8)}.png " self.files += f"{self.tmppath}{self.file} {self.tmppath}sc\\ig{str(self.number).zfill(8)}.png "
else: else:
self.files += f"{self.tmppath}{self.file} {self.tmppath}sc/ig{str(self.number).zfill(8)}.png " self.files += f"{self.tmppath}{self.file} {self.tmppath}sc/ig{str(self.number).zfill(8)}.png "
self.maxlength = 31900
if ( self.os_type == 'win32' ):
self.maxlength = 8000
else:
self.maxlength = 31900
self.pos = 1 self.pos = 1
print("found files, assembling commands") print("found files, assembling commands")
@@ -240,7 +244,7 @@ class Handler:
if self.os_type == "linux": if self.os_type == "linux":
self.command = f"ffmpeg -framerate {self.framerate} -i {self.tmppath}sc/ig%08d.png {output_path} -i {self.tmppath}audio.aac" self.command = f"ffmpeg -framerate {self.framerate} -i {self.tmppath}sc/ig%08d.png {output_path} -i {self.tmppath}audio.aac"
elif self.os_type == "win32": elif self.os_type == "win32":
self.command = f"ffmpeg -framerate {self.framerate} -i ${self.tmppath}sc/ig%08d.png {output_path} -i {self.tmppath}audio.aac" self.command = f"ffmpeg -framerate {self.framerate} -i \"{self.tmppath}sc/ig%08d.png\" {output_path} -i {self.tmppath}audio.aac"
else: else:
print("OS CURRENTLY UNSUPPORTED!") print("OS CURRENTLY UNSUPPORTED!")
return False return False