From fd92a1f7ae7cf902c6171cdc9bf8d848c667b2f8 Mon Sep 17 00:00:00 2001 From: Amirhossein Barati Date: Sat, 22 Jun 2024 15:00:47 +0330 Subject: [PATCH] fix: Add double qoutation if the command started and ended with brackets --- ffmpeg/_run.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ffmpeg/_run.py b/ffmpeg/_run.py index f42d1d7..0e1411c 100644 --- a/ffmpeg/_run.py +++ b/ffmpeg/_run.py @@ -170,6 +170,9 @@ def get_args(stream_spec, overwrite_output=False): args += reduce(operator.add, [_get_global_args(node) for node in global_nodes], []) if overwrite_output: args += ['-y'] + for i, arg in enumerate(args): + if arg.startswith('[') and arg.endswith(']'): + args[i] = f'"{args}"' return args