ClaudeCreativeVideoAI score · 79/100AI-assisted edit · no obvious prompt-injection riskX

Add Real-Time Muscle Anatomy Animation to Fitness Videos with Claude Code

Film a video pointing at arm muscles → Claude Code auto-segments and tracks → generate anatomy drawings and labels that move with your arm

ExperiencedVideoStepsPrompt
Who
Content creators or developers with Python/video processing basics
You get
Auto-generated muscle-labeled anatomy animation for a 13-second clip, no After Effects or manual tracking needed
You need
Claude Code

Constraints

Requires Claude Code or Cowork (must support code execution). Input is a 1080×1920 vertical video. Claude automatically splits frames, transcribes speech, runs SAM2 segmentation on arm and hand, KLT optical flow tracking, code-draws muscles, and composites the output. Processing is slow (author reported ~1 hour for 13 seconds).

What they did

Author solotechdev filmed a 13-second vertical video, pointing at biceps, triceps, and forearm muscles. He fed the video and a detailed prompt to Claude Code, letting the AI handle all subsequent processing: frame splitting, speech transcription, SAM2 segmentation of arm and hand, KLT optical flow tracking of skin movement, code-drawn anatomy-style muscle graphics, and final compositing with labels and audio effects.

How it went

Author reported ~1 hour processing time for 13 seconds of video, with no intervention needed. The finger remained in front of the muscle drawing layer, which surprised the author. No After Effects or manual tracking was used. (author_report)

Worth knowing

Must use Claude Code or Cowork with code execution capability. SAM2 runs on CPU (sam2.1_hiera_small), making processing slow. Author did not specify hardware configuration. [VIDEO] in the prompt must be replaced with actual file path. Audio processing (light music, whoosh effects, -14 LUFS normalization) depends on system audio libraries and may require additional dependencies.

Steps

  1. Frame splitting and speech analysis

    Split the video into 1080×1920 frames at 30 fps. If speech is present, transcribe with faster-whisper. Analyze transcription or visuals to determine which muscle is pointed at during each segment, outputting a muscle list with time mappings.

  2. SAM2 video segmentation

    For each muscle segment, run SAM2 video segmentation (model sam2.1_hiera_small, CPU). Track two objects: the raised arm and the pointing hand. Check masks on 3 frames first before proceeding.

  3. KLT optical flow tracking

    Take points inside the arm mask only (not the hand) and track muscle area with KLT optical flow. For each frame, compute an affine transform to the key frame using RANSAC, with light smoothing to reduce jitter.

  4. Draw muscles and composite output

    Draw anatomy-style muscles in code: pastel blue edges, peach/pink core, thin fiber lines, white tendons at ends. Maintain anatomical accuracy (biceps with two heads, triceps with long and lateral heads plus elbow tendon, forearm flexors as a fan). Fit each muscle to the arm outline on the key frame, move it with tracking data every frame, clip with the arm mask, ensure hand stays on top, preserve skin lighting. Reveal each muscle along fibers over 0.5 seconds, fade out when segment ends. Add white muscle name label (e.g., BICEPS) linked by thin line; label must not cover face. Show 6–8 frame preview before full render and wait for confirmation. Keep original voice, add light music and short whoosh on muscle appearance, normalize audio to -14 LUFS, export 1080×1920 H.264 next to original.

Prompt you can copy

Execution prompt · Source text。Claude Code conversation input; replace [VIDEO] with actual video path before execution

This block is the prompt. Ads are never placed here.

Edit my video [VIDEO]. In the video I point at muscles on my arm. When I point at a muscle, draw that muscle on my arm like body paint. The drawing must move with my arm.

Steps:
1. Split the video into 1080x1920, 30 fps frames. If I speak, transcribe it with faster-whisper. Find which muscle I show and when. Show me the list.
2. For each part, run SAM2 video segmentation (sam2.1_hiera_small, CPU). Track two objects: my raised arm and my pointing hand. Check the masks on 3 frames first.
3. Track the muscle area with KLT optical flow. Take points only inside the arm mask, not on my hand. For each frame, compute an affine transform to the key frame with RANSAC. Smooth it a little so it does not shake.
4. Draw the muscles in code. Anatomy book style: pastel blue edges, peach/pink core, thin fiber lines, white tendons at the ends. Keep the anatomy correct: biceps with two heads, triceps with long and lateral heads and the tendon at the elbow, forearm flexors as a fan.
5. Fit each muscle to my arm's outline on the key frame. Move it with the tracking data in every frame. Clip it with the arm mask. My hand always stays in front of the drawing. Let the light and shadow of my skin show through.
6. Reveal each muscle along its fibers in 0.5 seconds. Fade it out when its part ends. Add a white label with the muscle name (for example BICEPS). Link it to the muscle with a thin line. The label must not cover my face.
7. Before the full render, show me a 6-8 frame preview and wait for my OK.
8. Keep my voice. Add light music under it and a short whoosh when a muscle appears. Normalize the audio to -14 LUFS. Export 1080x1920 H.264 next to the original.

Replace [VIDEO] with your video file path. Claude Code needs permission to install and run Python packages (faster-whisper, SAM2, etc.).

Source

Claude 给讲解视频加解剖动画:指到手臂哪块肌肉就画出那块肌肉并标注,先出 6–8 帧预览再全片渲染 · solotechdev · X · 2026-10-22T11:19:32.000Z

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related