ffm_trim: Trim the Duration of the FFmpeg Pipeline

View source: R/ffm.R

ffm_trimR Documentation

Trim the Duration of the FFmpeg Pipeline

Description

Trim the input so that the output contains one continuous subpart of the input. Note that, if start=NULL, then the kept section will start at the beginning of the input. If both end=NULL and duration=NULL, the kept section will end at the end of the input.

Usage

ffm_trim(
  object,
  start = NULL,
  end = NULL,
  duration = NULL,
  units = c("tds", "pts", "frame"),
  setpts = TRUE
)

Arguments

object

An ffmpeg pipeline (ffm) object created by ffm_files().

start

The time of the start of the kept section (i.e., this will be the first frame in the output) given in units.

end

The time of the first frame that will be dropped (i.e., the frame immediately preceding this will be the last frame in the output), given in units.

duration

The maximum duration of the output given in time duration syntax.

units

A string indicating whether the start and/or end are given time duration syntax ("tds"), timebase units ("pts"), or frame number ("frame"). default = "tds"

setpts

A logical indicating whether the output timestamps should be modified to start at zero. If TRUE, will add a setpts filter after trim.

Value

object but will added instructions to trim the duration.

References

https://ffmpeg.org/ffmpeg-filters.html#trim

https://ffmpeg.org/ffmpeg-utils.html#time-duration-syntax


jmgirard/tidymedia documentation built on June 15, 2024, 1:52 p.m.