Configuration
Here’s the completewebreel.config.json for this example:
What It Demonstrates
GIF Output Format
Set the output filename with a.gif extension:
Output Location
The GIF is saved to thevideos/ directory:
GIF Encoding Details
Webreel uses palette-based encoding optimized for screen recordings:- Frame Rate: 15fps (reduced from video’s 60fps)
- Color Palette: Optimized per-frame for best quality
- File Size: Typically 5-10x larger than MP4 for the same content
- Compatibility: Works everywhere (GitHub, Slack, email, etc.)
When to Use GIF
GIFs are ideal for:- GitHub README files and documentation
- Embedding in Markdown files
- Slack and chat messages
- Email newsletters
- Anywhere MP4 isn’t supported
When to Use MP4
Prefer MP4 for:- Long recordings (GIFs get very large)
- High-fidelity output (MP4 has better compression)
- Social media (Twitter, LinkedIn support MP4)
- Website embeds with
<video>tags
File Size Considerations
GIFs are significantly larger than MP4:- 5-second recording: ~2-4 MB (GIF) vs ~200-400 KB (MP4)
- 30-second recording: ~15-30 MB (GIF) vs ~1-2 MB (MP4)
Reducing GIF File Size
To create smaller GIFs:-
Use smaller viewports
-
Reduce zoom
-
Keep recordings short
- Aim for under 10 seconds
- Focus on a single interaction
-
Minimize color complexity
- Simple UIs compress better
- Avoid gradient backgrounds
Embedding GIFs
In Markdown:Looping Behavior
GIFs loop infinitely by default. This works well for short demonstrations but can be distracting for longer recordings. For one-time playback, use MP4 with theloop attribute:
Running the Example
videos/gif-output.gif.
Next Steps
- WebM Output - Export as WebM video
- Screenshots - Capture static PNGs
- Hello World - Default MP4 output