Closed ghost closed 3 years ago
I don't think there is much I can do about the gif encoder in the bindings.
An alternative encoder is available in the magick package. The image_animate()
function has a delay parameter:
library(magick)
demo <- image_read_video("demo.mp4")
# demo <- image_animate(demo)
image_write(demo, "demo.gif")
# or alternatively using gifski:
image_write_gif(demo, "demo.gif")
Yet another alternative would be to use av_video_images()
to extract png files and then convert those directly to gif using the gifski package.
Thanks for the alternative solution. Works like a charm. Much appreciated!
Thanks for this lovely package. Much appreciated. I am trying to convert mp4 to gif. Output file is a bit cluttered in terms of background. Can we also add delay argument in the function?