def __init__(self, transition_duration, total_duration, fps, width, height, maxzoom, preserve_first, type = SlideTransitionType.alternate, outstreamprefix="ftf"): Filter.__init__(self, outstreamprefix) self._transition_duration = transition_duration self._total_duration = total_duration self._width = width self._height = height self._maxzoom = maxzoom self._slide_duration = total_duration - transition_duration self._frames = int(math.ceil(self._slide_duration * fps)) self._preserve_first = preserve_first self._type = type
def __init__(self, maxzoom, frames, type = ZoompanType.alternate, outstreamprefix="pzf"): expressions = [] step = (maxzoom - 1.0) / frames if isinstance(type, ZoompanType) == False: type = ZoompanType.alternate if type & ZoompanType.zoom_in == ZoompanType.zoom_in: expressions.append("zoompan=z='min(zoom+{s},{mz})':d={df}".format(df = frames, s = step, mz = maxzoom)) if type & ZoompanType.zoom_out == ZoompanType.zoom_out: expressions.append("zoompan=z='if(lte(zoom,1.0),{mz},max(1.001,zoom-{s}))':d={df}".format(df = frames, s = step, mz = maxzoom)) Filter.__init__(self, outstreamprefix) Combinable.__init__(self, FilterExpressionAccessor(expressions, type == ZoompanType.random))
def __init__(self, transition_duration, total_duration, outstreamprefix="ftf"): Filter.__init__(self, outstreamprefix) Combinable.__init__(self, FilterExpressionAccessor([ "fade=t=in:st=0:d={tt},fade=t=out:st={te}:d={tt}".format(tt = transition_duration, te = total_duration - transition_duration) ]))