#4: use -vf instead of -filter_complex

This commit is contained in:
Karl Kroening 2017-05-25 15:41:42 -10:00
parent 3e03f5ef61
commit f520618e14
2 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@ class _OutputNode(_Node):
filter_arg = self._get_filter_arg(filter_nodes, stream_name_map) filter_arg = self._get_filter_arg(filter_nodes, stream_name_map)
args += reduce(operator.add, [self._get_input_args(node) for node in input_nodes]) args += reduce(operator.add, [self._get_input_args(node) for node in input_nodes])
if filter_arg: if filter_arg:
args += ['-filter_complex', filter_arg] args += ['-vf', filter_arg]
args += reduce(operator.add, [self._get_output_args(node, stream_name_map) for node in output_nodes]) args += reduce(operator.add, [self._get_output_args(node, stream_name_map) for node in output_nodes])
args += reduce(operator.add, [self._get_global_args(node) for node in global_nodes], []) args += reduce(operator.add, [self._get_global_args(node) for node in global_nodes], [])
return args return args

View File

@ -102,7 +102,7 @@ def test_get_args_complex_filter():
assert args == [ assert args == [
'-i', TEST_INPUT_FILE, '-i', TEST_INPUT_FILE,
'-i', TEST_OVERLAY_FILE, '-i', TEST_OVERLAY_FILE,
'-filter_complex', '-vf',
'[0]trim=start_frame=10:end_frame=20,setpts=PTS-STARTPTS[v0];' \ '[0]trim=start_frame=10:end_frame=20,setpts=PTS-STARTPTS[v0];' \
'[0]trim=start_frame=30:end_frame=40,setpts=PTS-STARTPTS[v1];' \ '[0]trim=start_frame=30:end_frame=40,setpts=PTS-STARTPTS[v1];' \
'[v0][v1]concat=n=2[v2];' \ '[v0][v1]concat=n=2[v2];' \