-
Notifications
You must be signed in to change notification settings - Fork 309
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 failing in animate #483
Comments
I cannot reproduce this. The ffmpeg renderer throws this error if the output file does not appear after rendering so maybe there is an issue with write permissions on your disk? |
Tom, Show in New Window |
I am trying to use gganimate to render an mp4 with code that worked several months ago but now fails with error.
p2 is a ggplot2 plot where animate(p2, nframes = 120) works fine to produce a gif. However, running the following
animate( plot = p2, renderer = ffmpeg_renderer(format = "mp4"))
produces
Error: Rendering with ffmpeg failed.
Traceback shows
4. stop("Rendering with ffmpeg failed", call. = FALSE)
3. args$renderer(frames_vars$frame_source, args$fps)
2. animate.gganim(plot = p2, renderer = ffmpeg_renderer(format = "mp4"))
I am operating on a mac M2 with gganimate version 1.08.
ffmpeg appears to be installed properly as entering the following in a terminal window does work.
ffmpeg -i my_gapminder.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" my_gapminder.mp4
Appreciate any suggestions.
The text was updated successfully, but these errors were encountered: