Video Face Swap · skill pública de Open Skill
Video Face Swap
Video Face Swap es una Open Skill pública en Digen. Ábrela para ver qué crea este flujo.
Film
37 3 24
https://d7qlwi7tl2u27.cloudfront.net/skill-covers/prod/4076746/2026-09-27/9uk9sd3q.jpg
# Video Face Swap
Replace a character's face in an uploaded video with a reference face image, keeping everything else (pose, background, lighting, clothes, motion) as close to the original as possible. Optionally also replace the character's voice with a reference voice, and/or add background music.
## When to use
- User uploads a video + a reference face image and wants the character's face changed to match the reference.
- User wants to redo the swap with a different reference face, or re-render the clip.
- User also wants the character's voice/audio swapped to match a reference voice.
- User also wants background music added to the output clip.
## Inputs the user should provide
- The **video** to edit (uploaded asset).
- A **reference face image** (the face to put onto the character).
- A **clear still frame** of the character from the video (a screenshot/frame). The platform cannot auto-extract frames from a video, so this still is required. If the user hasn't provided one, ask them to upload a clear frame of the character before proceeding.
- (Optional, for voice swap) A **reference voice audio** (the voice to put onto the character). If the user wants the voice changed but hasn't provided one, ask for it.
- (Optional, for music) A **music style/mood** description (e.g. "tense electronic", "soft piano"). If the user wants background music but hasn't described it, ask for a style or pick a fitting one.
## Steps
1. First use `write_todos` to list the steps and update it as you progress.
2. **Analyze the video** with `recognize_video(video_url=<video asset URL>, prompt="Describe the main character's appearance, pose, clothing, background, camera angle, lighting, and the action/motion happening in the clip.")`. Capture these details so the output stays consistent.
3. **Face-swap the still** with `generate_image(model='i2i', input_urls=[<reference face image>, <video still frame>], prompt="Replace the character's face in the second image with the face from the first reference image. Keep the pose, body, clothing, background, lighting, camera angle, and overall composition exactly the same — only the face changes to match the reference.")`. Pass `name='face-swapped still'` and `entity_type='storyboard_images'`.
4. **Verify the swap** with `recognize_image(image_url=<edited still>, prompt="Confirm the face now matches the reference face while the rest of the scene is unchanged.")`. If the face didn't swap correctly or the scene drifted, redo step 3 with a clearer prompt.
5. **Re-render the clip** with `generate_video(model='i2v', input_urls=[<edited still>], prompt="Recreate the original clip's motion and action from this still, keeping the character, face, clothing, background, and lighting exactly as shown. Reproduce the movement described in the analysis.")`. Match the original video's `orientation` and `resolution`. Pass `name='face-swapped clip'` and `entity_type='final_videos'`.
6. **(Optional) Voice swap** — only if the user provided a reference voice audio and wants the voice changed:
- **Transcribe the original dialogue** with `transcribe_audio(audio_url=<original video asset URL>)` to get the spoken lines.
- **Generate the new voiceover** with `generate_tts(model='tts.clone', reference_audio_url=<reference voice audio>, text=<transcribed dialogue>)`. Pass `name='swapped voice'` and `entity_type='voiceovers'`.
7. **(Optional) Background music** — only if the user wants music added:
- **Generate the music** with `generate_music(prompt=<music style/mood description>)`. Pass `name='background music'` and `entity_type='music'`.
8. **Mix the final clip** — combine the re-rendered clip with any generated audio (voice and/or music):
- If only voice: `mix_clips(clips=[{video: {url: <face-swapped clip>}, audio: {url: <swapped voice>}}])`.
- If only music: `mix_clips(clips=[{video: {url: <face-swapped clip>}, audio: {url: <background music>}}])`.
- If both: `mix_clips(clips=[{video: {url: <face-swapped clip