Video Face Swap

Professional AI face swapping for videos and portraits with YouTube support, auto-trimming, and HD options.

Install
cmdop skills install agensi-video-face-swap

Video Face Swap is a skill that lets an AI agent perform face replacement on videos using the verging.ai API. It accepts source material from local files, direct MP4 URLs, YouTube links, or Bilibili links, so an agent does not need separate download logic for common video platforms.

Before submitting a job, the skill trims video segments locally using FFmpeg, which reduces the amount of footage uploaded and conserves API credits. The full pipeline — dependency checking, file upload to R2 storage, job creation, and status polling — is managed internally, so the agent issues a single instruction rather than coordinating multiple external services.

Jobs progress through states from PENDING to COMPLETED, with real-time feedback available throughout. Results can be returned as a URL or downloaded directly to a local directory. Standard and HD output modes are available depending on quality requirements.

The skill is useful in situations where an agent would otherwise need to orchestrate presigned URL generation, binary file handling, duration calculations, and external command-line tools such as yt-dlp and FFmpeg — operations that fall outside what a language model can do alone. It does not expose any MCP tools; it is a self-contained skill invoked through its own interface.

Use cases

  • Swap faces in a YouTube clip by providing the URL and a source portrait image
  • Trim a specific segment from a long video before submitting it for face replacement
  • Download a Bilibili video and apply face replacement in a single agent instruction
  • Process a local MP4 file with face swapping and save the result to disk
  • Toggle HD mode for higher-fidelity output on portrait-heavy footage
  • Poll job status and retrieve the result URL once processing completes

When to use it

  • The agent needs to apply face replacement to video content from YouTube, Bilibili, or direct MP4 links
  • Trimming a specific time segment before processing is required to save upload bandwidth or API credits
  • The workflow requires automated dependency checking and upload management without manual orchestration
  • HD output quality is needed and toggling between quality modes must be handled programmatically

When not to use it

  • The use case involves image-only face swapping rather than video
  • The target platform is not YouTube, Bilibili, or a direct MP4 URL and custom source handling is needed
  • No verging.ai API access or credits are available
  • yt-dlp and FFmpeg cannot be installed in the execution environment, as the skill depends on both
  • The project requires a transport-agnostic MCP server interface rather than a skill invocation model