Log in
TechniqueBy HypernaturalVersion 3, updated

H3 Max: recast a person in a take

hn/h3-max-recast

Swap a person in an existing video take for someone else with MiniMax H3 Max recast (video to video): the original performance, timing, camera and sound kept exactly, the face and body taken from reference pictures. Use when the whole original take is usable and only who is in it changes; to change the performance too, swap the still and re-animate instead (guide-recast-a-person).

SKILL.md

Give it a source clip and one reference picture per new person; get the same clip with those people replaced, the performance kept frame for frame and the source's own sound underneath. It's the route that keeps an actor's exact timing and acting. When the take itself has to change (new action, new framing), swap the person in the still and re-animate instead; guide-recast-a-person weighs the two.

Inputs

  • The source clip, 5 to 30 s, with no single shot in it over 15 s. Shorter clips are padded (below) and the result trimmed back.
  • Reference pictures, 1 to 4, one photo per new person; a product the take should carry can be one too. Use a single view cut from a character sheet (python-split-character-sheet), the front view unless the person is seen from behind. Each must be 256 to 2,048 px a side with an aspect between 0.4 and 2.5: pad with the edge colour, never crop.
  • Who is recast and who stays, decided with the person before rendering.

Run it

  1. Measure the source: exec ffprobe -v error -show_entries format=duration -of csv=p=0 <job>/shots/shot09.mp4.

  2. If it is under 5 s, freeze-pad it to 5 s: the last frame held, silence after the sound. With PAD = 5 − duration + 0.05:

    exec ffmpeg -v error -y -i <job>/shots/shot09.mp4 \
      -vf "tpad=stop_mode=clone:stop_duration=PAD" -af apad -t 5.000 \
      -c:v libx264 -crf 14 -pix_fmt yuv420p -c:a aac <job>/recast/shot09_padded.mp4
    
  3. Call describe("fal/minimax/h3-max/recast") before the first run in a job, then:

    run("fal/minimax/h3-max/recast", {
      "video_url": "<job>/recast/shot09_padded.mp4",
      "reference_image_urls": ["<job>/refs/nora_front.jpg", "<job>/refs/tumbler_hazed.jpg"],
      "prompt": "<who is recast, who stays; see below>",
      "resolution": "1080P",
      "seed": 9100
    }, into="<job>/recast/raw", unit="shot09_recast", tag="shot09")
    
    • resolution: 768P or 1080P (the default).
    • Run 2 takes with different seeds (9100, 9101).
    • enhance_realism exists (default false); untested here.
  4. Trim each render back to the source's length plus a 0.5 s tail, keeping the raw one:

    exec ffmpeg -v error -y -i <job>/recast/raw/shot09_recast_a.mp4 -t <seconds + 0.5> \
      -c:v libx264 -crf 14 -pix_fmt yuv420p -c:a aac <job>/recast/shot09_recast_a.mp4
    

Prompt

Free text, at most 2,000 characters, no <Subject N> labels: the grammar note and a worked example are in h3-prompt-format (references/recast.md). The endpoint has no field for which person to replace, and by default it replaces the main people left to right, so the prompt must:

  • name each person to recast by what the frame shows (wardrobe, position) and say whom they become: "she becomes the woman in reference image 1" (reference image N is the Nth picture sent);
  • say who is not recast and keeps their own face, hair and clothes;
  • say what else stays: the wardrobe, pose, every movement and its timing, the set, the light, the camera.

What you get

An MP4 of the padded length with the source's sound, the named people replaced. The untrimmed render stays in raw/.

Tips and traps

  • Without a "who stays" sentence, a second person in frame can be recast too.
  • The output keeps the source's sound, so a recast person still has the old voice: re-voicing and lip sync are separate steps (guide-recast-a-person).
  • Videos always go up as files, never inline; run uploads the local path.
  • It carries a feature of the old person over (a mustache) even when the prompt says "clean-shaven, no mustache". Prompting doesn't fix it; remove it after with flux-3-edit-video-remove-a-detail.
  • It can miss a small person in the background. Feed the recast take back in with only that person's reference and "the other person is not recast".
  • It can garble handwritten on-screen text. Check every text frame against the source; re-render that window on another seed with the text spelled out letter for letter.

Check it

  • Watch it beside the source: the same timing and gestures, the right person replaced, the others untouched.
  • Look at a frame every 0.75 s for traces of the old person (hair, jewellery, a reflection).
  • Confirm the trimmed length (ffprobe-inspect-media), then put it to the person with review_approve, the source as original.

FAQs

Swap a person in an existing video take for someone else with MiniMax H3 Max recast (video to video): the original performance, timing, camera and sound kept exactly, the face and body taken from reference pictures. Use when the whole original take is usable and only who is in it changes; to change the performance too, swap the still and re-animate instead (guide-recast-a-person).

Install Hypernatural Desktop, a free Mac app, and connect it to Claude Code, Codex or Claude Desktop. Then describe the video you want and your agent finds the skill itself, or paste this page's link (https://hypernatural.ai/skill/hn/h3-max-recast) and it installs hn/h3-max-recast and follows it.

It runs MiniMax H3 Max. Hypernatural Desktop has every one of them built in, so there are no API keys to set up, though you can bring your own.

The skill is free. You only pay for the AI generations it runs, and your agent shows you the price of every batch before it spends anything. Editing, captions and titles run on your Mac at no cost.

Yes. Ask your agent to adjust it for your job, or to save its own version. You can publish your version under your own handle so anyone can install it.

Go make something cool.

Install the app, open your agent, describe the video. That's the whole onboarding.

Sticker HypernaturalSticker BannerSticker TVBoy