aliases | category | classification | date | date_modified | draft | id | image | links | local_archive_links | pinned | series | tags | title | type | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
video |
public |
2024-05-17 13:21:59 -0700 |
2024-05-17 13:21:59 -0700 |
false |
20240517202159 |
false |
false |
|
Create Full Colour GIF from Video |
tech-note |
I follow this process when I record a clip of my screen using GNOME's built in screen clipping software.
I find I get the best quality if I generate a colour palette first, as below.
ffmpeg -i input.mp4 -filter:v "fps=15,scale=640:-1:flags=lanczos,palettegen" palette.png
Next, create the GIF and reference the palette. ffmpeg
options are one of the deep mysteries of the universe, but this usually works well for me.
ffmpeg -i input.mp4 -i palette.png -filter_complex "fps=15,scale=640:-1:flags=lanczos[x];[x][1:v]paletteuse" -quality:v 3 output.gif