2

Is there a way of saving the movies produced with ffmmeg_renderer or av_renderer as separate files? I always get theme embedded as data in the html file.

Erich Neuwirth
  • 943
  • 7
  • 13

2 Answers2

6

Using the example from @Roman I would use library("av") instead:

p <- ggplot(airquality, aes(Day, Temp)) + 
    geom_line(size = 2, colour = 'steelblue') + 
    transition_states(Month, 4, 1) + 
    shadow_mark(size = 1, colour = 'grey')

b <- animate(p, duration = 20, fps = 20, renderer = av_renderer())
anim_save("output.mp4", b)
Vojtěch Kania
  • 143
  • 1
  • 9
4

Since you didn't provide a reproducible example:

p <- ggplot(airquality, aes(Day, Temp)) + 
    geom_line(size = 2, colour = 'steelblue') + 
    transition_states(Month, 4, 1) + 
    shadow_mark(size = 1, colour = 'grey')
a <- animate(p, renderer = ffmpeg_renderer())

anim_save("animation.mp4", a)
Roman
  • 4,744
  • 2
  • 16
  • 58