mirror of
https://github.com/kkroening/ffmpeg-python.git
synced 2025-04-05 12:48:09 +08:00
make overwrite_output=None default & False pass '-n' arg
This commit is contained in:
parent
df129c7ba3
commit
66ac7f975a
@ -149,7 +149,7 @@ def _get_output_args(node, stream_name_map):
|
|||||||
|
|
||||||
|
|
||||||
@output_operator()
|
@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."""
|
"""Build command-line arguments to be passed to ffmpeg."""
|
||||||
nodes = get_stream_spec_nodes(stream_spec)
|
nodes = get_stream_spec_nodes(stream_spec)
|
||||||
args = []
|
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], [])
|
args += reduce(operator.add, [_get_global_args(node) for node in global_nodes], [])
|
||||||
if overwrite_output:
|
if overwrite_output:
|
||||||
args += ['-y']
|
args += ['-y']
|
||||||
|
elif overwrite_output == False:
|
||||||
|
args += ['-n']
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user