mirror of
https://github.com/kkroening/ffmpeg-python.git
synced 2025-04-05 04:22:51 +08:00
#4: use -vf instead of -filter_complex
This commit is contained in:
parent
3e03f5ef61
commit
f520618e14
@ -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
|
||||||
|
@ -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];' \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user