Is there a good package for editing videos in R?

Tags: #<Tag:0x00007fe8536365a8> #<Tag:0x00007fe853636198>


I’m looking for a package to cut, trim and convert video files. Of course, I can do it using ffmpeg, but I just wanted to check if there are any existing solutions in R to do it, maybe a wrapper for ffmpeg that I didn’t find?


Have you tried magick

It can read video as a set of frames. Then you can edit each frame. Checkout the vignette to get started


I’ve actually just come up against this problem myself. My solution was to write an R script that would pass the arguments I wanted to and call ffmpeg via system() with something like

    "c:\\ffmpeg\\bin\\ffmpeg.exe -accurate_seek -ss ", 
    "  -i ",,
    " -frames:v 1  -q:v 2 c:\\video\\",,
    ".bmp -y ", sep=""))


thanks @samclifford - yeah, for any advanced video editing better to use ffmpeg


There’s also, which provides bindings to the OpenCV C++ computer vision library.