Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg_renderer doesn't respect pause at end of animation. #411

Open
JoFAM opened this issue Oct 3, 2020 · 1 comment
Open

ffmpeg_renderer doesn't respect pause at end of animation. #411

JoFAM opened this issue Oct 3, 2020 · 1 comment

Comments

@JoFAM
Copy link

JoFAM commented Oct 3, 2020

When using ffmpeg_renderer(), the added frames using end_pause aren't added to the video. An example:

library(ggplot2)
library(gganimate)

anim <- ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point() +
  transition_states(cyl)

anim_save("ffmpegrend.mp4",
       anim,
       renderer = ffmpeg_renderer(),
       nframes = 20 + 100,
       fps = 10, end_pause = 100)

anim_save("avrend.mp4",
       anim,
       renderer = av_renderer(),
       nframes = 20 + 100,
       fps = 10, end_pause = 100)

anim_save("gifskirend.gif",
          anim,
          nframes = 20 + 100,
          fps = 10, end_pause = 100)

This is with gganimate 1.0.6 on R 4.0.2, Windows 10.
ffmpeg version: 4.3.1-full_build-www.gyan.dev

@thomasp85
Copy link
Owner

Weird - the end pause logic happens before the specific renderer so frames are getting rendered for it. I wonder if ffmpeg has some optimisation step that removes duplicate frames (would be bad, IMO)

In general I would recommend using AV to interface with ffmpeg though - does the issue arise there as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants