Skip to contents

Create various sections of an editly spec

Usage

er_layer(type, ...)

er_clip(duration, transition, layers)

er_defaults(transition, layer, layer_type)

er_header(
  out_path = tempfile(fileext = ".mp4"),
  fps,
  width,
  height,
  allow_remote_requests,
  audio_file_path,
  loop_audio,
  keep_source_audio,
  clips_audio_volume,
  output_volume,
  audio_norm.enable,
  audio_norm.gauss_size,
  audio_norm.max_gain,
  defaults,
  custom_output_args,
  logo_path,
  logo_width,
  logo_height,
  logo_x,
  logo_y
)

Arguments

type

string: the layer type (e.g. "title", "image", "video")

...

: other parameters

duration

numeric: duration in seconds

transition

list: an er_transition() object

layers

list: a list of er_layer objects

layer

list: default layer spec

layer_type

list: default layerType spec

out_path

string: the path of the video file to create (the file extension can be a video file extension or ".gif")

fps

numeric: frames per second (default = 25 or FPS of first video)

width

integer: video width (default = 640)

height

integer: auto based on width and aspect ratio of first video

allow_remote_requests

logical: allow remote URLs as paths? (default = FALSE)

audio_file_path

string: set an audio track for the whole video

loop_audio

logical: loop the audio track if it is shorter than video? (default = FALSE)

keep_source_audio

logical: keep source audio from clips? (default = FALSE)

clips_audio_volume

numeric: volume of audio from clips relative to er_audio_track()s (default = 1)

output_volume

numeric or string: adjust output volume (final stage). e.g. 0.5 or "10dB" (default = 1)

audio_norm.enable

logical: enable audio normalization? (default = FALSE)

audio_norm.gauss_size

numeric: audio normalization gauss size (default = 5)

audio_norm.max_gain

numeric: audio normalization max gain (default = 30)

defaults

er_defaults: as returned by er_defaults()

custom_output_args

character: vector of custom output codec/format arguments for ffmpeg

logo_path

string: path to logo file. This must be a local file, even if allow_remote_requests is TRUE. logo_path will be ignored if out_path is a gif

logo_width

numeric: width of logo relative to screen width (0 to 1, default = 0.2). If only one of logo height or width is specified, the logo aspect ratio will be retained

logo_height

numeric: height of logo relative to screen width (0 to 1, default = 0.1). If only one of logo height or width is specified, the logo aspect ratio will be retained

logo_x

numeric: logo left-hand-edge position relative to left of screen (0 = left to 1 = right, default = 0.78). The logo is referenced relative to its left-hand edge, so the default of 0.78 and width 0.2 puts the right-hand edge at 0.98

logo_y

numeric: logo bottom-edge position relative to top of screen (0 = top to 1 = bottom, default = 0.98)

Value

A list with class er_clip, er_layer, etc

See also