mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
add_text can accept frame_start argument
This commit is contained in:
parent
be088579be
commit
ca19b5d679
1 changed files with 6 additions and 2 deletions
|
|
@ -134,17 +134,21 @@ class ModifiedBurnins(ffmpeg_burnins.Burnins):
|
|||
if options_init:
|
||||
self.options_init.update(options_init)
|
||||
|
||||
def add_text(self, text, align, options=None):
|
||||
def add_text(self, text, align, frame_start=None, options=None):
|
||||
"""
|
||||
Adding static text to a filter.
|
||||
|
||||
:param str text: text to apply to the drawtext
|
||||
:param enum align: alignment, must use provided enum flags
|
||||
:param int frame_start: starting frame for burnins
|
||||
:param dict options: recommended to use TextOptions
|
||||
"""
|
||||
if not options:
|
||||
options = ffmpeg_burnins.TextOptions(**self.options_init)
|
||||
self._add_burnin(text, align, options, ffmpeg_burnins.DRAWTEXT)
|
||||
|
||||
options = options.copy()
|
||||
if frame_start:
|
||||
options["frame_offset"] = frame_start
|
||||
|
||||
def add_timecode(self, align, options=None, start_frame=None):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue