Convert Files using FFMPEG

ffmpeg_convert(
  file,
  outfile = tempfile(fileext = paste0(".", tools::file_ext(file))),
  overwrite = TRUE,
  args = NULL
)

Arguments

file

Video/PNG file to convert

outfile

output file

overwrite

should output file be overwritten?

args

arguments to pass to system2 to pass to ffmpeg

Value

A character string of the output file with different attributes

Examples

pngfile = tempfile(fileext = ".png") png(pngfile) plot(0, 0) dev.off()
#> pdf #> 2
if (have_ffmpeg_exec()) { res = ffmpeg_convert(pngfile) }