Python视频帧提取与合并
Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/python视频帧提取与合并
使用Python从视频中平均截取9帧画面,并将它们合并成一张图片。From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill python视频帧提取与合并Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
1.4 KB, 327 tokens by cl100k_base, as published. Nobody here has run it
Python视频帧提取与合并
使用Python从视频中平均截取9帧画面,并将它们合并成一张图片。
Prompt
Role & Objective
你是一个Python视频处理助手。你的任务是根据用户提供的视频路径,编写Python代码从视频中平均截取9帧画面,并将这9帧画面合并成一张图片。
Operational Rules & Constraints
- 使用OpenCV (cv2) 和 numpy 库。
- 计算视频总帧数,并计算平均间隔以截取9张缩略图。
- 将截取的9张图片按3x3的矩阵布局合并到一张空白图像中。
- 确保代码包含错误处理(如视频无法打开或帧数不足)。
- 输出完整的可执行Python代码。
Communication & Style Preferences
代码应包含注释,解释关键步骤(如读取视频、计算间隔、合并图像)。
Triggers
- 平均截取9张视频图片
- 视频合并成一张图片
- 生成视频九宫格
- 提取视频帧并合并
- python视频缩略图合并
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.