faceswap
使用 AI 替換影片中的臉孔
手動替換影片中的臉孔既緩慢又需要專業軟體。此技能透過 verging.ai API 自動化整個工作流程,接受本地檔案或 YouTube/Bilibili 網址作為輸入,並直接交付結果。
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「faceswap」。 Run /faceswap with video ./video.mp4 and face ./face.jpg
預期結果:
- Checking video duration: 22 seconds
- Credits needed: 22 (normal mode)
- Uploading video to cloud storage...
- Job created: job_id=295
- Progress: 25%... 50%... 75%... 100%
- Result: https://img.panpan8.com/face-swap/2026-05-31/result.mp4
正在使用「faceswap」。 Swap the face in a YouTube clip from 10-25 seconds in HD mode
預期結果:
- Downloading video from YouTube...
- Trimming to 10-25 seconds...
- Uploading trimmed video (15 seconds, HD = 45 credits)...
- Job created: job_id=296
- Status: COMPLETED after 45 seconds
- Result downloaded to: ./result_hd.mp4
安全審計
中風險The skill is a documentation/instruction file (no executable code) that guides an AI assistant to run shell commands (yt-dlp, ffmpeg, curl) and make API calls to verging.ai. All 82 static findings are false positives in context: backtick patterns are markdown code examples, URLs are legitimate API endpoints, API key references are standard authentication documentation, and temp directory access is standard media processing. The combination of network + credentials + external commands is expected for this use case. No malicious intent detected. Risk level is medium due to the breadth of system access required.
中風險問題 (1)
低風險問題 (4)
風險因素
⚙️ 外部命令 (5)
🌐 網路存取 (5)
🔑 環境變數 (3)
📁 檔案系統存取 (3)
品質評分
你能建構什麼
內容創作者快速編輯
在短片中替換臉孔以製作社群媒體內容,無需開啟影片編輯器。
YouTube 影片臉孔替換
提供 YouTube 網址和臉孔圖片,即可自動下載替換後的結果。
批次臉孔替換自動化
使用 CLI 指令搭配不同輸入重複執行,以依序處理多部影片。
試試這些提示
Run /faceswap with video ./video.mp4 and face image ./face.jpg to swap the face.
Run /faceswap with video https://youtube.com/watch?v=xxx, face https://example.com/face.jpg, trimming from 10 to 25 seconds in HD mode and auto-downloading the result.
Run /faceswap with video ./input.mp4, a remote face image URL, and save the output to /tmp/result.mp4.
First check my verging.ai credit balance, then run /faceswap with the provided video and face URL, trim to 15 seconds, use HD mode, and download the result.
最佳實務
- 在執行技能前先設定 VERGING_API_KEY 環境變數,以避免在指令中傳遞金鑰
- 將影片裁剪至所需的最短片段,以減少額度消耗
- 預覽時使用普通模式,僅在最終輸出時使用 HD 模式以節省額度
- 處理完畢後清理 /tmp/verging-faceswap/,以避免在磁碟上留下媒體檔案
避免
- 請勿直接在指令列中傳遞 API 金鑰,以免出現在 shell 歷史記錄或行程列表中
- 請勿對 upload-video 端點使用 JSON 主體(-d);它需要 multipart 表單資料(-F)
- 請勿嘗試透過 /upload-video 單獨上傳臉孔圖片;create-job 端點可直接接受 swap_image=@path