gif animation.jl
Change palette from png to gif to avoid png encoding bug in ffmpeg
This commit is contained in:
parent
19192b622b
commit
acf6e86c0f
@ -72,9 +72,9 @@ function buildanimation(animdir::AbstractString, fn::AbstractString,
|
||||
|
||||
if is_animated_gif
|
||||
# generate a colorpalette first so ffmpeg does not have to guess it
|
||||
run(`ffmpeg -v 0 -i $(animdir)/%06d.png -vf palettegen -y palette.png`)
|
||||
run(`ffmpeg -v 0 -i $(animdir)/%06d.png -vf palettegen -y palette.gif`)
|
||||
# then apply the palette to get better results
|
||||
run(`ffmpeg -v 0 -framerate $fps -loop $loop -i $(animdir)/%06d.png -i palette.png -lavfi paletteuse -y $fn`)
|
||||
run(`ffmpeg -v 0 -framerate $fps -loop $loop -i $(animdir)/%06d.png -i palette.gif -lavfi paletteuse -y $fn`)
|
||||
else
|
||||
run(`ffmpeg -v 0 -framerate $fps -loop $loop -i $(animdir)/%06d.png -pix_fmt yuv420p -y $fn`)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user