These are functions to do common video editing operations in ffmpeg through R.
Works on macOS only for now. Windows support wouldn’t be difficult to add, and I’ll consider it if anyone shows some interest.
devtools::install_github("nicholascarey/ffmpegR")
Currently there are three functions:
Simply trims a video between two timepoints.
trim_vid(dir = "path/to/directory", # location, if not in current working directory
file = "input_file.mp4", # name of file including extension
output = "output", # name of output file
from = "00:02:45", # trim from here...
to = "00:09:15") # ...to here
Joins two videos together into one file.
join_vid(dir = "path/to/directory", # working directory
file1 = "input_file_1.mp4", # file 1
file2 = "input_file_2.mp4", # file 2
output = "output") # name of output file
Removes the ‘fisheye’ effect from GoPro Hero 5 Black videos (other models to follow….)
remove_fisheye(file = "path/to/file", # input
dir = "path/to/dir", # directory
output = "output", # output
remove_audio = FALSE) # remove the audio?