Communitygithub.com

openclip-video-editing

從 AI 代理程式直接編輯影片:修剪、裁切、重新構圖為 9:16 或 1:1、調整大小、旋轉、翻轉、壓縮至目標大小或靜音。只需 OpenClip 帳戶即可免費使用,無需訂閱。

openclip-video-editing 是什麼?

這個技能讓 AI 代理程式(如 Claude Code、Cursor、Claude Desktop)能夠透過 MCP(Model Context Protocol)伺服器執行常見的影片編輯操作,全部免費。每次呼叫 `edit_video` 工具只能執行一個操作(修剪、裁切、旋轉、調整大小、壓縮或靜音),但可以鏈式呼叫將一個操作的輸出餵給下一個操作。使用前需要建立 OpenClip 帳戶並授權 MCP 連線(透過 OAuth 或 API Token),然後透過 `create_upload` 上傳檔案、取得上傳 URL、將檔案 PUT 上去,再將傳回的 ID 傳給 `edit_video` 的 `video` 參數。操作是非同步的—`edit_video` 會立即回傳一個 `tool_job` 識別碼,你需要以 5 到 10 秒的間隔輪詢 `get_tool_job_status`,直到狀態變成 `completed`(此時會得到永久 CDN 輸出 URL)或 `failed`。支援的平台包括 Claude Code、Claude Desktop/Web 和 Cursor,也支援純 MCP 標頭用戶端。仰賴外部 MCP 伺服器 openclip.app。

相容平台✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/OpenClip-App/agent-skills/tree/main/skills/openclip-video-editing

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

OpenClip:影片編輯

edit_video 每次對一個影片檔案執行一個操作:裁切、修剪、旋轉、調整大小、 壓縮或靜音。免費,需要一個 OpenClip 帳戶,但無需訂閱,也不扣點數。

鏈式呼叫以結合多個操作:將一個呼叫的輸出餵給下一個。

設定(一次性)

OpenClip 是一個遠端 MCP 伺服器,位於 https://openclip.app/mcp。當 OAuth 提示出現時,使用你的 OpenClip 帳戶登入,不需要複製 API 金鑰。

  • Claude Code: claude mcp add --transport http openclip https://openclip.app/mcp,然後執行 /mcp 來授權。
  • Claude Desktop / Web: 設定 → 連線 →「新增自訂連線」,貼上 URL,然後登入。
  • Cursor(.cursor/mcp.json):{ "mcpServers": { "openclip": { "url": "https://openclip.app/mcp" } } }
  • 僅限標頭的用戶端: 在 openclip.app/settings/connect 產生一個 MCP Token,然後連線到 https://openclip.app/mcp/key,並加上 Authorization: Bearer <token> 標頭。

基本檢查:呼叫 get_account。

取得檔案

  1. create_upload(filename, content_type) 會回傳一個 id 和一個 upload_url。
  2. 將原始位元組 PUT 到 upload_url。
  3. 將回傳的 id 作為 video 參數傳遞。

請勿呼叫 complete_upload。 那會啟動付費的裁剪管道。免費工具是直接讀取已上傳的檔案。list_videos 中已有的影片也可以當作輸入。

操作

每次呼叫都是 edit_video(video, operation, ...params)。

  • crop:可以是 aspect("1:1"、"9:16"、"4:5"、"16:9")或明確的 x、y、width、height。使用 aspect: "9:16" 將橫向素材重新構圖,適合 TikTok、Reels 和 Shorts。
  • trim:start_ms 和 end_ms,兩個都必須提供。時間單位為毫秒。
  • rotate:degrees(90、180、270)和/或 flip(none、horizontal、vertical)。
  • resize:width 和 height,單位為像素。
  • compress:可以是 target_mb(以目標檔案大小為依據)或 crf(18 到 32,數值越低品質越好、檔案越大)。當使用者指定大小限制時,使用 target_mb。
  • mute:無參數,移除音軌。

輪詢

edit_video 會回傳一個 tool_job 哈希 ID,狀態為 status: "queued"。每隔 5 到 10 秒輪詢 get_tool_job_status(tool_job):

  • queued / processing:仍在處理中,繼續輪詢。
  • completed:回傳永久的 CDN outputs URL 以及 result_meta。
  • failed:回傳 error。

永遠不要假設呼叫會同步完成。

規則

  • 每次呼叫只執行一個操作。若要修剪然後重新構圖,請先執行修剪,然後將其輸出傳遞給裁切呼叫。
  • 時間單位一律為毫秒,而非秒。
  • 輸出 URL 是永久的 CDN 連結,不會簽章或過期。
  • 免費使用每日有速率限制,並有單一檔案大小上限。錯誤訊息會說明如何解除限制。

範例提示到動作的對應

  • 「把這段剪成前 30 秒」 → create_upload、PUT 位元組、edit_video(video, operation="trim", start_ms=0, end_ms=30000)、輪詢。
  • 「把這個變成直向,適合 TikTok」 → edit_video(video, operation="crop", aspect="9:16")、輪詢。
  • 「這個檔案 400MB,把它壓到 50 以下」 → edit_video(video, operation="compress", target_mb=50)、輪詢。
  • 「移除音訊」 → edit_video(video, operation="mute")、輪詢。
  • 「修剪到中間那一分鐘,然後把它變成正方形」 → 修剪、輪詢,然後對輸出進行裁切,aspect="1:1"、再次輪詢。

相關

格式轉換(mp4、gif、mp3)請使用 convert_media,請參考 openclip-convert 技能。將長影片轉換為排名短片段是付費管道,請參考 openclip-clipping。

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

OpenClip-App/agent-skills

OpenClip agent skill for clipping long-form into short-form social clips.

OpenClip-App/agent-skills

OpenClip clipping: long video → short vertical clips ranked by virality score.

OpenClip-App/agent-skills

OpenClip captions: burn styled animated captions into short clips.

openclip-convert

Convert and compress media from your agent with OpenClip - video to mp4, webm, mov, mkv, or gif, and audio to mp3, aac, wav, or flac. FREE with just an OpenClip account, no subscription. Use when asked to

openclip-remove-background

Remove the background from an image with OpenClip and get back a transparent PNG. FREE with just an OpenClip account, no subscription. Use when asked to

openclip-repurpose

Turn one long video into a full batch of platform-ready short clips for TikTok, Reels, and YouTube Shorts with OpenClip - find the moments, reframe to vertical, burn in captions, and write the post copy for each. Use when asked to

openclip-thumbnails

Pull still frames out of a video as thumbnail images with OpenClip, then compress, resize, crop, or reformat them to jpg, png, or webp. FREE with just an OpenClip account, no subscription. Use when asked for

openclip-transcription

Transcribe video or audio to JSON, SRT, and VTT with speaker diarization and time codes, using OpenClip. FREE with just an OpenClip account, no subscription. Use when asked to

openclip-ugc-ads

Generate short vertical UGC-style ad clips from a structured creative brief with OpenClip, picking from a roster of AI creators. Use when asked to

相關技能