From 66ac7f975a8790726f1864374ed0be0a6f766f2a Mon Sep 17 00:00:00 2001 From: Curtiola Date: Sat, 22 Mar 2025 15:20:46 -0600 Subject: [PATCH] make overwrite_output=None default & False pass '-n' arg --- ffmpeg/_run.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ffmpeg/_run.py b/ffmpeg/_run.py index f42d1d7..20c04c9 100644 --- a/ffmpeg/_run.py +++ b/ffmpeg/_run.py @@ -149,7 +149,7 @@ def _get_output_args(node, stream_name_map): @output_operator() -def get_args(stream_spec, overwrite_output=False): +def get_args(stream_spec, overwrite_output=None): """Build command-line arguments to be passed to ffmpeg.""" nodes = get_stream_spec_nodes(stream_spec) args = [] @@ -170,6 +170,8 @@ 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'] + elif overwrite_output == False: + args += ['-n'] return args