Skip to content

Latest commit

 

History

History
40 lines (35 loc) · 975 Bytes

create-full-colour-gif-from-video.md

File metadata and controls

40 lines (35 loc) · 975 Bytes
aliases category classification date date_modified draft id image links local_archive_links pinned print series tags title type
create-full-colour-gif-from-video
video
public
2024-05-17 13:21:59 -0700
2024-05-17 13:21:59 -0700
false
20240517202159
false
false
ffmpeg
gif
mp4
webm
palette
gnome
screenclip
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