JuliaPlots / Plots.jl

Powerful convenience for Julia visualizations and data analysis
https://docs.juliaplots.org
Other
1.84k stars 358 forks source link

[BUG] ffmpeg error when creating animated gif (need better error reporting) #3982

Open tk3369 opened 2 years ago

tk3369 commented 2 years ago

Details

I got this issue when trying to create an animation for an Advent of Code puzzle. To reproduce, see https://github.com/tk3369/AdventOfCode2021/blob/387cb0eea11dd3542cda0a5b767a96654cb6d225/day05.jl#L103-LL126

julia> chart3() [ Info: Created frame 100 [ Info: Created frame 200 [ Info: Created frame 300 [ Info: Created frame 400 [ Info: Created frame 500 [image2 @ 0x7ffc1981b200] Could not get frame filename number 2 from pattern '/Users/tomkwong/Julia/AdventOfCode2021/day05_anim.png'. Use '-frames:v 1' for a single image, or '-update' option, or use a pattern such as %03d within the filename. av_interleaved_write_frame(): Invalid argument ERROR: failed process: Process(/Users/tomkwong/.julia/artifacts/d30bf8e9f9b903de5e42ffdad9e1118722c08cd8/bin/ffmpeg -v 16 -framerate 5 -i /var/folders/5j/882h40j118q12rx_53jk8w_m0000gn/T/jl_jQcpC8/%06d.png -i /var/folders/5j/882h40j118q12rx_53jk8w_m0000gn/T/jl_jQcpC8/palette.bmp -lavfi paletteuse=dither=sierra2_4a -loop 0 -y /Users/tomkwong/Julia/AdventOfCode2021/day05_anim.png, ProcessExited(1)) [1]

Backends

This bug occurs on ( insert x below )

Backend yes no untested
gr (default) x
pyplot
plotlyjs
pgfplotsx
unicodeplots
inspectdr
gaston

Versions

Plots.jl version: v1.24.3 Backend version (]st -m <backend(s)>): v0.62.1 Output of versioninfo():

julia> versioninfo()
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.5.0)
  CPU: Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, westmere)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 4
tk3369 commented 2 years ago

User error. My filename ends with png rather and gif and that's why it failed. I would keep this bug open for now -- it should give better error message! :-)