From e594a0da5a3e5259fd01384bc37dc77d7d72dc06 Mon Sep 17 00:00:00 2001 From: PUJA <52121207+krypton-byte@users.noreply.github.com> Date: Sat, 30 Nov 2024 08:51:28 +0700 Subject: [PATCH] Update ffmpeg.py --- neonize/utils/ffmpeg.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/neonize/utils/ffmpeg.py b/neonize/utils/ffmpeg.py index 67c8a91..17b9618 100644 --- a/neonize/utils/ffmpeg.py +++ b/neonize/utils/ffmpeg.py @@ -260,16 +260,13 @@ async def cv_to_webp(self, animated: bool = True) -> bytes: return buf async def call(self, cmd: List[str]): - if any(" " in part for part in cmd): - cmd_str = shlex.join(cmd) - else: - cmd_str = " ".join(cmd) + cmd_str = shlex.join(cmd) if any(" " in part for part in cmd) else " ".join(cmd) popen = await asyncio.create_subprocess_shell( - cmd_str, + cmd_str if os.name == "nt" else shlex.join(cmd) , stderr=asyncio.subprocess.PIPE, stdout=asyncio.subprocess.PIPE, stdin=subprocess.DEVNULL, - shell=True if os.name == "nt" else False, + # shell=True if os.name == "nt" else False, ) stdout, stderr = await popen.communicate() # type: ignore if popen.returncode != 0: