video-content-replace

Replaces content elements in a video (people, scenes, clothing) while preserving the original camera movement and motion. Two modes are supported: text-driven and reference-image-driven; providing a reference image automatically triggers the image-driven mode.

meitu video-content-replace

Usage Examples

# Text-driven replacement (required parameters only)
meitu video-content-replace \
  --video_url ./sample.mp4 \
  --prompt "Change the person's outfit to a red dress" \
  --json

# Reference-image-driven replacement
meitu video-content-replace \
  --video_url ./sample.mp4 \
  --image_url ./ref_outfit.jpg \
  --prompt "Replace with the outfit from the reference image" \
  --json

# Specify a model with result download
meitu video-content-replace \
  --video_url ./sample.mp4 \
  --image_url ./ref_scene.jpg \
  --prompt "Replace the background with the scene from the reference image" \
  --model molasses \
  --json \
  --download-dir ./output

Parameters

ParameterRequiredDescription
--video_urlYesType: string; original video (mp4/mov; max 100 MB; side length 340-3850 px; duration 3-30 s)
--promptYesType: string; description of the replacement content
--image_urlNoType: string; optional reference image (providing it switches to image-driven mode)
--modelNoType: string; default: auto; options: auto / molasses
--download-dirNoType: string; downloads result files to the specified local directory
--outputNoType: string[]; specifies output file paths, mapped in order to data.result.urls
--jsonNoOutputs results in JSON format for script or agent parsing