video-to-gif

Convert video files and screen recordings into optimized GIFs using ffmpeg.

Updated May 20, 2026
One-click install
npx skills add https://github.com/TeXmeijin/agent-skills --skill video-to-gif-texmeijin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: video-to-gif
Source: https://github.com/TeXmeijin/agent-skills/tree/main/.apm/skills/video-to-gif
Command: npx skills add https://github.com/TeXmeijin/agent-skills --skill video-to-gif-texmeijin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ffmpeg, and includes scripts (resource) components.

What problem does it solve? Screen recordings and video clips are often too large or poorly formatted to embed in documentation, READMEs, blog posts, or chat messages. This Skill converts local video files into compact, publication-ready GIFs with control over trim range, width, and frame rate. ## Core Features & Use Cases - Two-pass palette conversion: Uses ffmpeg palette generation to produce smaller, cleaner GIFs than direct conversion. - Flexible trimming and scaling: Set start time, duration, output width, and FPS to fit the target medium. - Size reduction guidance: Applies an ordered strategy (trim, reduce width, lower FPS) when output files are too large. - Use Case: You recorded a 30-second UI demo as a .mov file and need a lightweight GIF for a GitHub README. The Skill trims dead time, scales to 960px at 12fps, and outputs an optimized GIF ready to embed. ## Quick Start Convert the attached screen recording demo.mov into a lightweight GIF suitable for embedding in a README, trimming it to the key 5 seconds and keeping the file size small.

Frequently Asked Questions about video-to-gif

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a video to GIF with ffmpeg?

Use a two-pass palette workflow: first generate a palette with palettegen, then render the GIF with paletteuse. This produces smaller, cleaner GIFs than direct video-to-GIF conversion. The included script wraps both passes in a single command.

How do I reduce GIF file size for documentation?

Trim dead time at the start and end first, then reduce width to 720 or 640 pixels, then lower FPS to 10 or 8. If the GIF is still too large after trimming and scaling, use a shorter clip or switch to MP4/WebM instead.

What FPS should I use for screen recording GIFs?

For UI demos, 10-15fps is usually enough. For terminal recordings, 8-12fps is often better and produces much smaller files. The default is 12fps at 960px width.

Can I trim a video before converting it to GIF?

Yes, pass --start and --duration options to the script, for example --start 00:00:02 --duration 5. These map to ffmpeg's -ss and -t flags and are applied in both the palette and render passes.

When should I use MP4 instead of GIF?

Use MP4 or WebM when the clip is long or remains too large after reasonable trimming and scaling. GIFs are best for short clips; long recordings become impractically large even at low width and FPS.