← 返回
数据分析 中文

GIF

Find, search, and create GIFs with proper optimization and accessibility.
查找、搜索及创建 GIF,并提供适当的优化和无障碍支持。
ivangdavila
数据分析 clawhub v1.0.1 1 版本 99926.8 Key: 无需
★ 2
Stars
📥 1,326
下载
💾 41
安装
1
版本
#latest

概述

Requirements

Required for creating GIFs:

  • ffmpeg — video to GIF conversion

Optional:

  • gifsicle — post-optimization (reduces size 30-50%)
  • GIPHY_API_KEY — for Giphy search API
  • TENOR_API_KEY — for Tenor search API

Where to Find GIFs

SiteBest forAPI
---------------------
GiphyGeneral, trendingYes (key required)
TenorMessaging appsYes (key required)
ImgurViral/communityYes
Reddit r/gifsNiche, uniqueNo

Creating GIFs with FFmpeg

Always use palettegen (without it, colors look washed out):

ffmpeg -ss 0 -t 5 -i input.mp4 \
  -filter_complex "fps=10,scale=480:-1:flags=lanczos,split[a][b];[a]palettegen[p];[b][p]paletteuse" \
  output.gif
SettingValueWhy
---------------------
fps8-12Higher = much larger file
scale320-4801080p GIFs are massive
lanczosAlwaysBest scaling quality

Post-Optimization

If gifsicle is available:

gifsicle -O3 --lossy=80 --colors 128 input.gif -o output.gif

Reduces size 30-50% with minimal quality loss.

Video Alternative

For web, use video instead of large GIFs (80-90% smaller):

<video autoplay muted loop playsinline>
  <source src="animation.webm" type="video/webm">
  <source src="animation.mp4" type="video/mp4">
</video>

Accessibility

  • WCAG 2.2.2: Loops >5s need pause control
  • prefers-reduced-motion: Show static image instead
  • Alt text: Describe the action ("Cat jumping off table")
  • Three flashes: Nothing >3 flashes/second (seizure risk)

Common Mistakes

  • No palettegen in FFmpeg — colors look terrible
  • FPS >15 — file size explodes for no visual benefit
  • No lazy loading on web — blocks page load
  • Using huge GIF where video would work — 10x larger

API Quick Reference

Giphy search:

curl "https://api.giphy.com/v1/gifs/search?api_key=$GIPHY_API_KEY&q=thumbs+up&limit=10"

Tenor search:

curl "https://tenor.googleapis.com/v2/search?key=$TENOR_API_KEY&q=thumbs+up&limit=10"

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-29 01:56 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 440 📥 147,953
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 166 📥 60,208
data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 57,021