export_gif
Converts a video into an optimized animated GIF or WebP that fits a file-size budget for PRs, issues, and READMEs by reducing frame rate, width, and quality as needed.
Instructions
Export a video as an optimized animated GIF or WebP that fits a file-size budget (default: GitHub's 10 MB image limit), for PRs, issues, and READMEs. Steps fps, width, and palette/quality down until it fits and reports the settings used.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Starting frame rate (default 12). | |
| input | Yes | Path to the source video. | |
| start | No | Start at this many seconds into the video. | |
| width | No | Starting width in px (default 960); height follows the aspect ratio. | |
| format | No | gif (plays everywhere, default) or webp (animated WebP, usually much smaller). | |
| output | No | Optional output path. Defaults under SCREENCAST_HOME/edits. | |
| duration | No | Export only this many seconds (default: to the end). | |
| maxBytes | No | File-size budget in bytes (default 10000000, under GitHub's 10 MB limit for images). Quality steps down until the file fits. | |
| overwrite | No | Allow replacing an existing file at the output path (default false). |