position can be one of either:
top, bottom center, top-left, top-right, center-left, center-right, bottom-left, bottom-right
a list object x, y, originX = 'left', originY = 'top' , where x: 0, y: 0 is the upper left corner of the screen, and x: 1, y: 1 is the lower right corner, x is relative to video width, y to video height. originX and originY are optional, and specify the position's origin (anchor position) of the object.
Usage
er_layer_pause(color)
er_layer_image(path, resize_mode, zoom_direction, zoom_amount)
er_layer_image_overlay(
path,
position,
width,
height,
zoom_direction,
zoom_amount
)
er_layer_title(
text,
font_path,
text_color,
position,
zoom_direction,
zoom_amount
)
er_layer_subtitle(text, font_path, text_color)
er_layer_title_background(text, font_path, text_color, background)
er_layer_news_title(text, font_path, text_color, background_color, position)
er_layer_slide_in_text(
text,
font_path,
font_size,
char_spacing,
color,
position
)
er_layer_fill_color(color)
er_layer_radial_gradient(colors)
er_layer_linear_gradient(colors)
er_layer_rainbow_colors()
er_layer_video(
path,
resize_mode,
cut_from,
cut_to,
width,
height,
left,
top,
origin_x,
origin_y,
mix_volume
)
er_layer_audio(path, cut_from, cut_to, mix_volume)
er_layer_detached_audio(path, cut_from, cut_to, start, mix_volume)
Arguments
- color
string: slide color (default = random)
- path
string: path to image or video file
- resize_mode
: see Details
- zoom_direction
string: "in", out", or "null" to disable
- zoom_amount
numeric: amount to zoom (default = 0.1)
- position
string or list: see Details
- width
numeric: width (from 0 to 1) where 1 is screen width
- height
numeric: height (from 0 to 1) where 1 is screen height
- text
string: text to show
- font_path
string: path to font
- text_color
string: text color
- background
er_layer: as returned by
er_layer_radial_gradient()
,er_layer_linear_gradient()
, orer_layer_fill_color()
- background_color
string: background color
- font_size
numeric: font size
- char_spacing
numeric: character spacing
- colors
character: vector of two colors (default = random)
- cut_from
numeric: time value to cut from, in seconds
- cut_to
numeric: time value to cut to, in seconds
- left
numeric: X-position relative to screen width (0 to 1, default = 0)
- top
numeric: Y-position relative to screen height (0 to 1, default = 0)
- origin_x
numeric: X anchor ("left" or "right", default = "left")
- origin_y
numeric: Y anchor ("top" or "bottom", default = "top")
- mix_volume
numeric: relative volume when mixing this video's audio track with others (default = 1)
- start
numeric: how many seconds into this clip should this audio track start? (default = 0)
Details
Audio layers will be mixed together. If cutFrom/cutTo is set, the resulting segment (cutTo-cutFrom) will be slowed/sped-up to fit clip.duration. The slow down/speed-up operation is limited to values between 0.5x and 100x.
er_layer_detached_audio
is a special case of audio_tracks
that makes it easier to start the audio relative to clips start times without having to calculate global start times. detached audio has the exact same properties as audio_tracks
, except start time is relative to the clip's start.
For video layers, if parent clip.duration is specified, the video will be slowed/sped-up to match clip.duration. If cutFrom/cutTo is set, the resulting segment (cutTo-cutFrom) will be slowed/sped-up to fit clip.duration. If the layer has audio, it will be kept (and mixed with other audio layers if present.)
resize_mode - How to fit image to screen. Can be one of:
"contain" - All the video will be contained within the frame and letterboxed
"contain-blur" - Like contain, but with a blurred copy as the letterbox
"cover" - Video be cropped to cover the whole screen (aspect ratio preserved)
"stretch" - Video will be stretched to cover the whole screen (aspect ratio ignored). Default is "contain-blur".