From ca85822530137f2317236393d242fec147b92cd5 Mon Sep 17 00:00:00 2001 From: Janis Hutz <98422316+simplePCBuilding@users.noreply.github.com> Date: Thu, 16 Mar 2023 10:08:13 +0000 Subject: [PATCH] Update handler.py max cmd length windows + wrong filepath fix --- bin/handler.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/handler.py b/bin/handler.py index 2054dc4..61ac2be 100644 --- a/bin/handler.py +++ b/bin/handler.py @@ -142,7 +142,11 @@ class Handler: self.files += f"{self.tmppath}{self.file} {self.tmppath}sc\\ig{str(self.number).zfill(8)}.png " else: 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 print("found files, assembling commands") @@ -240,7 +244,7 @@ class Handler: 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" 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: print("OS CURRENTLY UNSUPPORTED!") return False