mirror of
https://github.com/kkroening/ffmpeg-python.git
synced 2025-04-05 04:22:51 +08:00
Merge 61c5080db6ad15744ed2cb087a84126dd39dd8ea into df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6
This commit is contained in:
commit
9b897f9634
@ -491,6 +491,50 @@ def colorchannelmixer(stream, *args, **kwargs):
|
|||||||
return FilterNode(stream, colorchannelmixer.__name__, kwargs=kwargs).stream()
|
return FilterNode(stream, colorchannelmixer.__name__, kwargs=kwargs).stream()
|
||||||
|
|
||||||
|
|
||||||
|
@filter_operator()
|
||||||
|
def vstack(main_parent_node, second_parent_node, shortest='1', **kwargs):
|
||||||
|
"""Stack input videos vertically.
|
||||||
|
|
||||||
|
All streams must be of same pixel format and of same width.
|
||||||
|
|
||||||
|
Note that this filter is faster than using overlay and pad filter to create same output.
|
||||||
|
|
||||||
|
The filter accept the following option:
|
||||||
|
|
||||||
|
inputs
|
||||||
|
Set number of input streams. Default is 2.
|
||||||
|
|
||||||
|
shortest
|
||||||
|
If set to 1, force the output to terminate when the shortest input terminates. Default value is 0.
|
||||||
|
|
||||||
|
Official documentation: `vstack <https://ffmpeg.org/ffmpeg-filters.html#vstack>`__
|
||||||
|
"""
|
||||||
|
kwargs['shortest'] = shortest
|
||||||
|
return FilterNode([main_parent_node, second_parent_node], vstack.__name__, kwargs=kwargs,max_inputs=2).stream()
|
||||||
|
|
||||||
|
|
||||||
|
@filter_operator()
|
||||||
|
def hstack(main_parent_node, second_parent_node, shortest='1', **kwargs):
|
||||||
|
"""Stack input videos vertically.
|
||||||
|
|
||||||
|
All streams must be of same pixel format and of same width.
|
||||||
|
|
||||||
|
Note that this filter is faster than using overlay and pad filter to create same output.
|
||||||
|
|
||||||
|
The filter accept the following option:
|
||||||
|
|
||||||
|
inputs
|
||||||
|
Set number of input streams. Default is 2.
|
||||||
|
|
||||||
|
shortest
|
||||||
|
If set to 1, force the output to terminate when the shortest input terminates. Default value is 0.
|
||||||
|
|
||||||
|
Official documentation: `hstack <https://ffmpeg.org/ffmpeg-filters.html#hstack>`__
|
||||||
|
"""
|
||||||
|
kwargs['shortest'] = shortest
|
||||||
|
return FilterNode([main_parent_node, second_parent_node], hstack.__name__, kwargs=kwargs,max_inputs=2).stream()
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'colorchannelmixer',
|
'colorchannelmixer',
|
||||||
'concat',
|
'concat',
|
||||||
@ -507,4 +551,6 @@ __all__ = [
|
|||||||
'trim',
|
'trim',
|
||||||
'vflip',
|
'vflip',
|
||||||
'zoompan',
|
'zoompan',
|
||||||
|
'vstack',
|
||||||
|
'hstack',
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user