FFmpeg isn't found

Hi
I’m trying to use Juno for Atom on Windonws 10 64 using the following code

using Plots
anim = Animation()
p = plot([sin,cos], 0, π, size=(300,300))
scatter!([0], [sin,cos])
for i in 0:0.1:π
    p[3] = [i], [sin(i)]
    p[4] = [i], [cos(i)]
    frame(anim)
end
gif(anim)

But as an output I keep getting ERROR: LoadError: IOError: could not spawn ffmpeg -v 0 -i ‘C:\Users\Hugo\AppData\Local\Temp\jl_5751.tmp/%06d.png’ -vf palettegen=stats_mode=diff -y ‘C:\Users\Hugo\AppData\Local\Temp\jl_5751.tmp/palette.bmp’: no such file or directory (ENOENT)

I have downloaded ffmpeg, changed the path in the env variables but it still does not work. ffmpeg -version works in the power shell but it doesn’t in the command prompt.

Hope someone will be able to get me out of this trouble…

This showed up a while ago. You can find a workaround in this thread.

I guess I haven’t greatly understood how you solved it.
I changed my code to

using Plots
anim = Animation()
loadpath = "C:/Users/Hugo/"
p = plot([sin,cos], 0, π, size=(300,300))
scatter!([0], [sin,cos])
for i in 0:0.1:π
    p[3] = [i], [sin(i)]
    p[4] = [i], [cos(i)]    
    frame(anim)
end
gif(anim)
run( `ffmpeg -r 15 -i $loadpath"%06d.png" -vcodec libx264 -crf 25 "file.mp4"` )

but I still get

Could find no file with path 'C:/Users/Hugo/%06d.png' and index in the range 0-4
C:/Users/Hugo/%06d.png: No such file or directory
ERROR: LoadError: failed process: Process(`ffmpeg -framerate 15 -i C:/Users/Hugo/%06d.png -vcodec libx264 -crf 25 file.mp4`, ProcessExited(1)) [1]

This exact same code seemed to work for tiago so I’m wondering what’s wrong…
Sorry for requiring so much help though.

Lets say nearly the same code :wink:
Try this:

using Plots
loadpath = "C:/Users/Hugo/"
anim = Animation(loadpath,String[])
p = plot([sin,cos], 0, π, size=(300,300))
scatter!([0], [sin,cos])
for i in 0:0.1:π
    p[3] = [i], [sin(i)]
    p[4] = [i], [cos(i)]    
    frame(anim)
end
run( `ffmpeg -r 15 -i $loadpath"%06d.png" -vcodec libx264 -crf 25 "file.mp4"` )
1 Like

I think I’ve understood where I was wrong now
Thanks a lot!