pexels-footage
它能做什么
这项技能从 Pexels 查找并下载免版税的照片和视频片段。适合需要真实素材用于视频或帖子的创作者。
适用场景
- ✓当你需要真实的照片或视频片段,而不是 AI 生成的图片时。
- ✓当你需要特定画面比例的图库素材,例如竖版或宽屏时。
- ✓当你为帖子或视频项目收集视觉素材的时候。
技能链接
https://github.com/TeamWiseFlow/xiaobei/blob/master/skills/pexels-footage/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请从 Pexels 下载三段竖版的日落视频,每段大约十秒,用于我的短视频。”
每周 5 个新技能,1 分钟读完。
工作原理
它根据你提供的关键词在 Pexels 中搜索,按画面比例和时长筛选,然后把文件保存到你选择的文件夹。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Pexels Footage — 版权免费图片/视频素材下载
Use this skill when:
- You need real photos or video clips (not AI-generated) as source material
- User wants professional-looking footage or images from Pexels
- Preparing visual assets for content creation
Prerequisites: PEXELS_API_KEY must be set. Register free at https://www.pexels.com/api/
Usage
通过 PATH 调用 wrapper,无需拼接脚本路径。
下载图片
pexels-footage \
--type image \
--terms "sunset ocean,mountain landscape,forest path" \
--aspect 16:9 \
--output-dir ./assets/images \
[--max-clips 15]
下载视频
pexels-footage \
--type video \
--terms "sunset ocean" \
--aspect 9:16 \
--output-dir ./video_assets/footage \
--min-duration 5 \
--max-duration 30
重要:视频下载一次只允许下载一个(脚本已强制 --max-clips=1),不允许批量下载。下载时应根据 content-check 报告的时长缺口,通过 --min-duration 和 --max-duration 精确匹配所需时长,不要下载远超需求的素材。
Options
| Option | Default | Description |
|---|---|---|
--terms |
required | Comma-separated search keywords (one per scene) |
--type |
video |
image or video |
--aspect |
9:16 |
9:16 (portrait) | 16:9 (landscape) | 1:1 (square) |
--output-dir |
required | Directory to save downloaded files |
--min-duration |
5 |
Minimum clip duration in seconds (video only) |
--max-duration |
none | Maximum clip duration in seconds (video only). 强烈建议设置,避免下载过长的素材 |
--max-clips |
1 (video) / 15 (image) |
Maximum total files to download. 视频类型强制为 1 |
Output
图片输出
✅ Downloaded 12 images to ./assets/images/
pexels-sunset-ocean-abc123.jpg (1920x1280)
pexels-mountain-def456.jpg (2048x1365)
...
Returns JSON to stdout:
{
"ok": true,
"images": ["path1.jpg", "path2.jpg"],
"total": 12,
"output_dir": "./assets/images"
}
视频输出
{
"ok": true,
"clips": ["path1.mp4", "path2.mp4"],
"total": 12,
"output_dir": "./video_assets/footage"
}
Environment Variables
| Variable | Description |
|---|---|
PEXELS_API_KEY |
Pexels API key (required) |
Error Handling
| Error | Action |
|---|---|
PEXELS_API_KEY not set |
Check environment variables |
| No results found for term | Try broader/simpler keywords (English works best) |
| Download fails | Retry once; skip if fails again |
| Rate limit (HTTP 429) | Wait 60s, then retry |
常见问题
需要账户吗?
需要。你需要在环境中设置免费的 Pexels API 密钥。
它能一次下载很多视频吗?
不能。这项技能每次运行只下载一个视频,所以你应该选择符合所需时长的素材。
支持哪些画面比例?
这项技能支持 9 比 16 的竖版、16 比 9 的横版和 1 比 1 的正方形。
详情
作者的原始描述
Search and download copyright-free images and video clips from Pexels API. Supports both photo search (--type image) and video search (--type video, default).
repo: TeamWiseFlow/xiaobei
热度
- GitHub 星标
- 8.7k
- 排名
- #12335
- 许可证
- —
- 更新时间
- 2026/10/29
评论
- …