45.2 Creating High Quality Gifs


May 16, 2026


I want to make a high quality gif from a youtube video. First, I downloaded the video with YT-DLP. Once I have the video, I need to turn it into frames with FFMPEG. Fortunately, it can be downloaded from the website, or from someone's build site. It can also be installed with choco using choco install ffmpeg. Then it looks like I can use a tool called gifski 🡵 to turn png frames into a high quality gif.

My Process

  1. Download yt-dlp 🡵
  2. Download video as mp4 yt-dlp.exe <URL> -S res,ext:mp4:m4a --recode mp4
  3. Install ffmeg with Chocolatey (Chocolatey Install Instructions): choco install ffmpeg
  4. Convert video to frames ffmpeg -i "video.mp4" frame%04d.png
  5. Convert frames to gif gifski --fps 30 -o star.gif "video.mp4"
  6. Reencode with gifski -o new.gif -Q 86 --fps 30 old.gif if too large

Instructions from gif.ski 🡵:

Usage

The CLI version must be run from a command line (a terminal, cmd.exe).

gifski --fps 10 --width 320 -o anim.gif video.mp4

The above example converts "video.mp4" file to GIF (replace the path with your video's actual path. Most terminals allow you to drag'n'drop the file!), with max resolution of 320 pixels and 10 frames per second. If you get erros about command not found, use full absolute path to gifski(.exe).

You may need ffmpeg to convert video to PNG frames first. In your favourite command line/terminal, run:

ffmpeg -i video.mp4 frame%04d.png

This command takes a file named "video.mp4" and makes files "frame0001.png", "frame0002.png", "frame0003.png", etc. from it (%04d makes the frame number. Windows may need %%04d). You can usually drag'n'drop files into the terminal window to avoid typing the paths.

and then make the GIF from the frames:

gifski -o file.gif frame*.png

This command makes file "file.gif" from PNG files with names starting with "frame" (* stands for frame numbers). It's equivalent of gifski -o file.gif frame0001.png frame0002.png frame0003.png, etc.

See gifski -h for more options. The conversion might be a bit slow, because it takes a lot of effort to nicely massage these pixels. Also, you should suffer waiting like the poor users who will be downloading these huge files.

Large file sizes

By default Gifski maximizes quality at cost of file size, so it is expected that the GIF files will be massive. If you need smaller files: