0

I'm trying to use FFmpeg to convert a bunch of Png's into a gif, while setting the duration of each frame and while using an optimal palette (and other parameters, such as dither) on a single command.

I was reading FFmpeg's page, but the examples are using two commands and a temporary palette.png file.


Here's what I got, without using palettegen and paletteuse:

-vsync 2 -safe 0 -f concat -i "concat.txt" -y "example.gif"

The concat.txt file contains each frame path and duration, like:

file 'C:\0.png'  
duration 0.066 

It outputs a gif with a default palette as expected.


So, my question is how can I use palettegen and paletteuse on the same command, without a temporary file?

1
  • Oh c'mon. How is this question a duplicate of the other two questions? Commented Dec 10, 2017 at 15:05

1 Answer 1

1

Okay, It's working now with this command from another SuperUser answer:

-vsync 2 -safe 0 -f concat -i "concat.txt" 
-lavfi palettegen=stats_mode=single[pal],[0:v][pal]paletteuse=new=1 -y "example.gif"

Not the answer you're looking for? Browse other questions tagged .