I downloaded Makie and I tried to run one of the given example:
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:
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)
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!
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
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).
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:
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.
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: