# Having problems with creating animations with Plots.jl - GRBackend - Juno

**URL:** <https://discourse.julialang.org/t/having-problems-with-creating-animations-with-plots-jl-grbackend-juno/21876>\
**Category:** Visualization\
**Tags:** plots, gr, animations\
**Created:** [March 14, 2019, 4:25pm UTC](https://discourse.julialang.org/t/having-problems-with-creating-animations-with-plots-jl-grbackend-juno/21876 "2019-03-14T16:25:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![BeastyBlacksmith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beastyblacksmith/32/4741_2.png) [@BeastyBlacksmith](https://discourse.julialang.org/u/BeastyBlacksmith)\
**Post date:** [March 14, 2019, 4:40pm UTC](https://discourse.julialang.org/t/having-problems-with-creating-animations-with-plots-jl-grbackend-juno/21876/2 "2019-03-14T16:40:45Z")

</div>

I have the same problem, I use the following workaround

```julia
loadpath = # path to where plots should be stored
animation = Animation(loadpath,String[])
for i=1:n
        p = plot(x,u_sol[i,:])
        frame( animation, p )
end
name_of_gif = # name of file.gif
run(`ffmpeg -framerate 15 -i $loadpath"%06d.png" $name_of_gif`) # run this in the REPL, it will hang indefinetly, if the gif already exists

```

when you already go this road I would recommend to use a better format for the video like for example `.mp4` with

```julia
run(`ffmpeg -framerate 15 -i $loadpath"%06d.png" -vcodec libx264 -crf 25 $name_ending_in_mp4`)

```

---

_[View the full topic](https://discourse.julialang.org/t/having-problems-with-creating-animations-with-plots-jl-grbackend-juno/21876)._
