Merge 84da93fbcfbf99faa2eda3744f443c27525b7c17 into df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6

This commit is contained in:
Jason 2022-07-13 17:58:50 -07:00 committed by GitHub
commit b25dc913f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
from __future__ import unicode_literals
from .nodes import FilterNode, filter_operator
from ._utils import escape_chars
from .nodes import FilterNode, filter_operator
@filter_operator()
@ -107,6 +107,28 @@ def trim(stream, **kwargs):
return FilterNode(stream, trim.__name__, kwargs=kwargs).stream()
@filter_operator()
def atrim(stream, **kwargs):
"""Trim the audio input so that the output contains one continuous subpart of the input.
Args:
start: Specify the time of the start of the kept section, i.e. the sample with the timestamp start will be the
first frame in the output.
end: Specify the time of the first sample that will be dropped, i.e. the sample immediately preceding the one
with the timestamp end will be the last frame in the output.
start_pts: This is the same as start, except this option sets the start timestamp in timebase units instead of
seconds.
end_pts: This is the same as end, except this option sets the end timestamp in timebase units instead of
seconds.
duration: The maximum duration of the output in seconds.
start_sample: The number of the first frame that should be passed to the output.
end_sample: The number of the first frame that should be dropped.
Official documentation: `trim <https://ffmpeg.org/ffmpeg-filters.html#trim>`__
"""
return FilterNode(stream, atrim.__name__, kwargs=kwargs).stream()
@filter_operator()
def overlay(main_parent_node, overlay_parent_node, eof_action='repeat', **kwargs):
"""Overlay one video on top of another.