Skip to main content
Vidu S2-Editing edits your live webcam video with one reference image. Choose an edit type to tell the model what to take from the image: its visual style, a garment, a character, or a background. Publish your webcam and start an edit. The model returns edited video in real time. While the edit runs, you can change the image, the edit type, or both, without restarting it. When you end the edit, the session stays open, so you can start another one. The schema lists the model’s commands and messages. The prompt guide helps you choose images for each edit type. The tutorial builds a browser app. The base wire protocol is the same as every other Reactor model: open a session with the Reactor class, send named commands, and receive messages. The model name is reactor/vidu-s2-editing. The examples use the base SDK.
Usage is billed per session-minute while the session is ready, including time between edits. Disconnect when you are done. See Billing for how billing maps to rates.

At a glance

Key features

Live camera in, edited video out

Publish your camera and watch the edit in real time. There is nothing to render ahead of time.

Four edit types

Restyle the whole scene, try on a garment, replace yourself with a character, or replace the background, all from one reference image.

Switch mid-edit

Change the reference image, the edit type, or both with switch_reference. The picture changes within a few seconds and the edit keeps running.

Quick start

Connect with the base SDK, publish your camera, and start an edit:
See Authentication to connect your app, Tracks to publish a camera from each SDK, and the tutorial for a full browser app.

How it works

  1. Connect. The first session_state message reports phase idle. The camera and main_video tracks exist from the start, so you can attach a player and publish your camera right away. Until an edit is running, main_video shows a neutral dark frame.
  2. Publish your camera. The model edits nothing until your camera reaches it. Publish camera before or right after start_edit.
  3. Start an edit. Call start_edit with a reference image and an edit type. The phase moves through starting and warming_up to live. camera_forwarding turns true once your camera reaches the model. video_receiving turns true when edited frames arrive. Use these fields to show progress. The first edited frame can arrive after the phase becomes live.
  4. Switch. Call switch_reference to change the image, the edit type, or both. The picture changes within a few seconds.
  5. End the edit. Call end_edit, or let the edit end at its time limit. The session stays open, so start_edit works again.