# Animation error Makie

**URL:** https://discourse.julialang.org/t/animation-error-makie/18405
**Category:** Visualization
**Created:** [December 7, 2018, 3:48am UTC](https://discourse.julialang.org/t/animation-error-makie/18405 "2018-12-07T03:48:09Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![OlivierHnt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivierhnt/32/6227_2.png) [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)
#### Post date: [December 7, 2018, 3:48am UTC](https://discourse.julialang.org/t/animation-error-makie/18405/1 "2018-12-07T03:48:09Z")

</div>

I downloaded Makie and I tried to run one of the given example:

```julia
using Makie

 xyvec = rand(Point2f0, (2)) .* 5 .+ 1
 velvec = rand(Point2f0, (2)) .* 10
 # define some other parameters
 t = 0
 ts = 0.03
 balldiameter = 1
 origin = Point2f0(0, 0)
 xybounds = Point2f0(10, 10)
 N = 200
 scene = scatter(
     xyvec,
     markersize = balldiameter,
     color = rand(RGBf0, 2),
     limits = FRect(0, 0, xybounds)
 )
 s = scene[end] # last plot in scene

 record(scene, "pong.mp4", 1:N) do i
     # calculate new ball position
     global t = t + ts
     global xyvec = xyvec .+ velvec .* ts
     global velvec = map(xyvec, xybounds, origin, velvec) do p, b, o, vel
         boolvec = ((p .+ balldiameter/2) .> b) .| ((p .- balldiameter/2) .< o)
         velvec = map(boolvec, vel) do b, v
             b ? -v : v
         end
     end
     # plot
     s[1] = xyvec
end

```

This animation plays but at the end I get the following error:

```julia
ERROR: LoadError: failed process: Process(`ffmpeg -loglevel quiet -i '/var/folders/fn/h4l89fwx2sgdfscp5rt05cbm0000gn/T/tmpt6c6Hl/##video#369.mkv' -c:v libx264 -preset slow -crf 24 -pix_fmt yuv420p -c:a libvo_aacenc -b:a 128k -y pong.mp4`, ProcessExited(1)) [1]

```

The issue is from the function record(). Running `]test Makie`, I have a similar error when it tries to use record. Any idea on how to fix this ? (I did not find this issue anywhere else)

Thank you for your suggestions!

---

<div class="post-metadata">

### Author: ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)
#### Post date: [December 7, 2018, 5:44am UTC](https://discourse.julialang.org/t/animation-error-makie/18405/2 "2018-12-07T05:44:30Z")

</div>

Do you have ffmpeg?

---

<div class="post-metadata">

### Author: ![OlivierHnt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivierhnt/32/6227_2.png) [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)
#### Post date: [December 7, 2018, 5:48am UTC](https://discourse.julialang.org/t/animation-error-makie/18405/3 "2018-12-07T05:48:28Z")

</div>

No I do not… I assumed the installation would do everything for me.  
I am downloading it right now! Thank you very much.

---

<div class="post-metadata">

### Author: ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)
#### Post date: [December 7, 2018, 6:10am UTC](https://discourse.julialang.org/t/animation-error-makie/18405/4 "2018-12-07T06:10:45Z")

</div>

Very understandable, but it turns out to be tricky to have ffmpeg as a binary dependency

---

<div class="post-metadata">

### Author: ![OlivierHnt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivierhnt/32/6227_2.png) [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)
#### Post date: [December 7, 2018, 6:55am UTC](https://discourse.julialang.org/t/animation-error-makie/18405/5 "2018-12-07T06:55:27Z")

</div>

Oh ok.  
So I did install ffmpeg (then moved the folder to my User folder). The command `]test Makie` still fails:

```julia
LoadError: failed process: Process(`ffmpeg -loglevel quiet -i '/var/folders/fn/h4l89fwx2sgdfscp5rt05cbm0000gn/T/tmpybAg97/##video#371.mkv' -c:v libx264 -preset slow -crf 24 -pix_fmt yuv420p -c:a libvo_aacenc -b:a 128k -y ./media/interaction.mp4`, ProcessExited(1)) [1]

```

Then, I added in my bash\_profile file the following line

```julia
# Setting PATH for ffmpeg
export PATH="/ffmpeg-4.1/:${PATH}"

```

It did not help, so I used `push!(LOAD_PATH,"/Users/Olivier/ffmpeg-4.1")` but no luck. Would you happen to know why Makie does not see ffmpeg ?

---

<div class="post-metadata">

### Author: ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)
#### Post date: [December 7, 2018, 7:02am UTC](https://discourse.julialang.org/t/animation-error-makie/18405/6 "2018-12-07T07:02:41Z")

</div>

No but I saw someone else with this problem. @sdanisch probably knows.

---

<div class="post-metadata">

### Author: ![OlivierHnt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivierhnt/32/6227_2.png) [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)
#### Post date: [December 7, 2018, 7:04am UTC](https://discourse.julialang.org/t/animation-error-makie/18405/7 "2018-12-07T07:04:40Z")

</div>

Ok thank you. I will message him then 🙂

---

<div class="post-metadata">

### Author: ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)
#### Post date: [December 7, 2018, 7:16am UTC](https://discourse.julialang.org/t/animation-error-makie/18405/8 "2018-12-07T07:16:30Z")

</div>

It’s normally preferred not to message the package developer directly - he’ll most likely see this when he visits Discourse in his own time 🙂

---

<div class="post-metadata">

### Author: ![OlivierHnt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivierhnt/32/6227_2.png) [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)
#### Post date: [December 7, 2018, 7:20am UTC](https://discourse.julialang.org/t/animation-error-makie/18405/9 "2018-12-07T07:20:54Z")

</div>

Ah! I already sent a message through Julia discourse… Well I will know for next time at least! Thank you.

---

<div class="post-metadata">

### Author: ![OlivierHnt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivierhnt/32/6227_2.png) [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)
#### Post date: [December 9, 2018, 2:58am UTC](https://discourse.julialang.org/t/animation-error-makie/18405/10 "2018-12-09T02:58:48Z")

</div>

Good evening, I just want to post an update on the situation.  
I kept looking and trying different things but none of my attempt have been successful (mainly adding path and reinstalling using conda instead of brew).

Julia seems to find ffmpeg since if I use the shell and type ffmpeg, the REPL returns something.  
Also (not sure if it indicates anything) but animations with Plots seem to work just fine.  
At this point all I can think of is either:

- there is a specific version of ffmpeg compatible with Makie. But that would have been written somewhere so I doubt it.
- I messed up somewhere, or I just really don’t understand what adding a path for Julia mean. This is definitely more likely.

Anyways, if anyone has some thoughts I’d be glad to hear them!

---

<div class="post-metadata">

### Author: ![mauro](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@mauro](https://discourse.julialang.org/u/mauro)
#### Post date: [December 9, 2018, 11:13am UTC](https://discourse.julialang.org/t/animation-error-makie/18405/11 "2018-12-09T11:13:29Z")

</div>

I had the same issue and a simple installation of ffmpeg is probably missing some additional dependencies/libraries that are required in

```julia
ffmpeg -loglevel quiet -i filename.mkv -c:v libx264 -preset slow -crf 24 -pix_fmt yuv420p -c:a libvo_aacenc -b:a 128k -y filename.mp4

```

Try to run directly the above command on some examples (outside Julia) and see the error message you get to understand what you are missing (Makie hides error messages). I found this guide useful [CompilationGuide/Ubuntu – FFmpeg](https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu)

---

<div class="post-metadata">

### Author: ![OlivierHnt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivierhnt/32/6227_2.png) [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)
#### Post date: [December 9, 2018, 3:14pm UTC](https://discourse.julialang.org/t/animation-error-makie/18405/12 "2018-12-09T15:14:12Z")

</div>

I ran the command you wrote on my Terminal and I had no error message. I will check the guide in any case, thanks!

---

<div class="post-metadata">

### Author: ![mauro](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@mauro](https://discourse.julialang.org/u/mauro)
#### Post date: [December 9, 2018, 3:30pm UTC](https://discourse.julialang.org/t/animation-error-makie/18405/13 "2018-12-09T15:30:43Z")

</div>

My mistake, you need to erase “-loglevel quiet” to get errors displayed. Anyway, to test the command you also need a mkv file to convert (you can use the one generated by Makie, in the error message it says in which folder you can find it).

---

<div class="post-metadata">

### Author: ![OlivierHnt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivierhnt/32/6227_2.png) [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)
#### Post date: [December 10, 2018, 6:12pm UTC](https://discourse.julialang.org/t/animation-error-makie/18405/14 "2018-12-10T18:12:13Z")

</div>

Alright, so I have been doing a lot of attempts and it seems that ffmpeg with fdk-aac works.  
However, I do have the libx264 and libvo\_aacenc unknown (I guess I must add them the same way I did for fdk-aac). Are they required by Makie ? Also the option ‘preset’ and ‘cry’ are not recognized.

Moreover, it turns out I have the following message on Julia:

```julia
ERROR: Unsatisfiable requirements detected for package ModernGL [66fc600b]:
 ModernGL [66fc600b] log:
 ├─possible versions are: [0.0.1-0.0.8, 0.1.0-0.1.1, 0.2.0-0.2.1, 1.0.0, 1.1.0] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.0.1-0.0.8, 0.1.0-0.1.1, 0.2.0-0.2.1, 1.0.0, 1.1.0]
 └─restricted by julia compatibility requirements to versions: uninstalled — no versions left

```

So I deleted Makie to reinstall it but it fails with the same error message… I assume that this is just a coincidence that it happened right after the ffmpeg configuration.

---

<div class="post-metadata">

### Author: ![OlivierHnt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivierhnt/32/6227_2.png) [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)
#### Post date: [December 21, 2018, 4:23pm UTC](https://discourse.julialang.org/t/animation-error-makie/18405/15 "2018-12-21T16:23:51Z")

</div>

I finally have some time to close this discussion. I do not know if it is obvious for everyone, but after a couple of attempts on how to configure ffmpeg the following configuration worked properly with Makie:

```julia
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-libx264 --enable-gpl --enable-libvorbis --enable-libfdk-aac --enable-nonfree

```

The simplest for the installation is to do something in the spirit of

`brew install --with-libx264 --with-gpl --with-libvorbis --with-libfdk-aac --with-nonfree`.

Thank you for the helpful comments 🙂.

---

<div class="post-metadata">

### Author: ![asinghvi17](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asinghvi17/32/8272_2.png) [@asinghvi17](https://discourse.julialang.org/u/asinghvi17)
#### Post date: [September 15, 2019, 4:04pm UTC](https://discourse.julialang.org/t/animation-error-makie/18405/16 "2019-09-15T16:04:51Z")

</div>

With Makie switching to a BinaryBuilder-provided FFMPEG, this should no longer be an issue.
