> gif & images

This category covers turning video into still images and animated GIFs, and going the other direction to build clips from image sequences. Common tasks: exporting a shareable GIF at a controlled size and frame rate, grabbing a poster/thumbnail frame at a timestamp, sampling frames for datasets or previews, and assembling slideshows or contact-sheet grids. The recurring theme is the -vf filtergraph (fps, scale, select, tile) plus GIF palette handling, which is where quality and file size are won or lost.

// gif & images

6 commands

// faq

How do I make a high-quality GIF from a video with ffmpeg?

Use the two-pass palette method: run palettegen to build an optimal 256-color palette.png, then paletteuse to map frames against it. This avoids the banding and dithering noise of a single-pass GIF export and usually produces a smaller file.

Why is my ffmpeg GIF so huge or low quality?

A one-line GIF export uses an auto-picked, non-optimized palette and every frame you feed it. Drop the frame rate with fps=10, scale down (scale=320:-1), and switch to the palettegen/paletteuse workflow — together those cut size dramatically while improving color.

How do I extract a single frame at a specific time?

Put -ss before -i for a fast input seek, then -frames:v 1 to grab one frame (e.g. ffmpeg -ss 00:00:05 -i input.mp4 -frames:v 1 out.jpg). Because this re-encodes the frame, ffmpeg jumps to the nearest keyframe and then decodes up to the exact timestamp (accurate_seek is on by default), so it's both fast and frame-accurate — output seeking (-ss after -i) is only slower here. The nearest-keyframe limitation applies only to stream copy (-c copy).