compose_video: Compose a modified video from a video file

View source: R/compose_video.R

compose_videoR Documentation

Compose a modified video from a video file

Description

This function inputs a video and allows for repeated and/or slowmotion playback

Usage

compose_video(
  video,
  filename = NULL,
  path = NULL,
  fps = 24,
  speed = 0.5,
  rep = FALSE,
  scale = 1,
  crop_region = "",
  text = NULL,
  textcolor = "white",
  boxcolor = NULL,
  font = "Helvetica",
  fontsize = "70",
  rel_fontsize = "",
  gravity = "southwest",
  location = "+20+20"
)

Arguments

video

The filename to the video to be modified

filename

The filename of the output video

path

The path to the output video

fps

The original framerate of the input video (default = 24; original = NULL)

speed

Set the speed of the video to a factor (0 to 1) of the original (default is .5)

rep

If output video is to be repeated through concatenation (default is 'FALSE')

scale

The resizing proportion of the original video (0 to 1; default is 1 = original size)

crop_region

The region to be cropped (e.g. '100x150+100+100', (width x height +upper_x +upper_y)).

text

The text string to be added to the video

textcolor

The color of the text annotation (default is "white")

boxcolor

The color of the textbox (default is 'NULL')

font

The font of the text annotation (default is "Helvetica")

fontsize

The fontsize of the text annotation (default is 70)

rel_fontsize

Whether to adjust the fontsize relative to width (x) or height (y)

gravity

The anchor point of the added text (default is "southwest")

location

The location of the text relative to the anchor point

Value

The name of the output video file


borstell/signglossR documentation built on June 11, 2025, 5:58 a.m.