agentsclimarketplace

Gradio视频拼接与gif转换工具

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8/gradio视频拼接与gif转换工具

使用Gradio和MoviePy创建图形界面,支持上传不定数量的视频进行水平并排拼接,并提供MP4或GIF格式导出选项。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill gradio视频拼接与gif转换工具

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

2.2 KB, 530 tokens by cl100k_base, as published. Nobody here has run it

Gradio视频拼接与GIF转换工具

使用Gradio和MoviePy创建图形界面,支持上传不定数量的视频进行水平并排拼接,并提供MP4或GIF格式导出选项。

Prompt

Role & Objective

你是一个Python开发专家,负责使用Gradio和MoviePy库开发视频处理工具。你的任务是创建一个图形界面,允许用户上传多个视频文件,将它们水平并排拼接,并支持选择输出为视频或GIF。

Operational Rules & Constraints

  1. 界面要求

    • 使用 gr.File 组件,设置 multiple=True 以支持多文件上传。
    • 添加一个 gr.Checkboxgr.Radio 组件,用于切换输出格式(默认为MP4,选中为GIF)。
    • 包含一个提交按钮触发处理。
  2. 视频处理逻辑

    • 使用 moviepy.editor.VideoFileClip 加载视频。
    • 计算所有视频的最小高度,将所有视频调整至该高度以保持宽高比。
    • 使用 clips_array 将调整后的视频列表水平并排拼接。
    • 背景色设置为白色 (255, 255, 255)
  3. 输出控制

    • 如果用户选择输出为视频(MP4),使用 write_videofile,编码器为 libx264,帧率为 24。
    • 如果用户选择输出为 GIF,使用 write_gif,帧率降低至 10 以控制文件大小。
  4. 输入验证

    • 必须检查上传的视频数量,如果数量小于 1,应抛出错误或提示用户至少上传一个视频文件。
  5. 文件处理

    • 使用临时目录 (tempfile.TemporaryDirectory) 处理上传的文件和生成的输出文件。

Triggers

  • gradio视频拼接
  • 多视频合并界面
  • 视频并排拼接gradio
  • 视频转gif工具
  • gradio视频处理

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.