Media

GET /api/media/videofileinput/play

Loads a media file into a Video File Input and starts playback.

Parameters:

Parameter Required Description
videofileinput Yes Name of the Video File Input component
sourceuri Yes File path (absolute or relative) to the media file

Behavior:

  • If the player is Playing or Paused, it stops first, then loads and plays the new file
  • If Stopped or NoMedia, it loads and plays immediately
  • If Parsing, returns an error

Response:

  • 200 OKOK - Request forwarded to Composer. Resolved file path: {path}
  • 400 Bad Request — Missing parameters
  • 404 Not Found — Input or file not found

GET /api/cavjumptocuepoint

Jumps a CAV Player to a specific cue point.

Selecting the target object (exactly one of these is required):

Parameter Description
target Object GUID
targetname Object name (must be unique)
targettype Object type name (must be unique)

Additional parameters:

Parameter Required Description
cuepointid Yes Cue point identifier string

Example:

/api/cavjumptocuepoint?targetname=CAV Player 1&cuepointid=chapter1

Response:

  • 200 OKJumpToCuePoint {id} on {name} performed successfully!
  • 400 Bad Request — Missing parameters, target not a CAV player, cue point not found, or jump not allowed

GET /api/cavgetcuepoints

Returns all cue points from a CAV Player as JSON.

Selecting the target object (exactly one of these is required):

Parameter Description
target Object GUID
targetname Object name (must be unique)
targettype Object type name (must be unique)

Example:

/api/cavgetcuepoints?targetname=CAV Player 1

Response:

  • 200 OK — JSON:
{
  "Target": "CavPlayerInput1",
  "Count": 3,
  "CuePoints": [
    { "Id": "intro", "Frame": 0 },
    { "Id": "chapter1", "Frame": 150 },
    { "Id": "outro", "Frame": 900 }
  ]
}
  • 400 Bad Request — Missing parameters, target not a CAV player, or no source loaded

GET /api/facedetect/getimage

Returns the best face detection result as a JPEG image.

Parameters:

Parameter Required Description
target Yes Face detector component GUID

Response:

  • 200 OK — JPEG image data (Content-Type: image/jpeg)
  • 200 OK — Error message if detector not found (text)

GET /api/image/get

Returns a single JPEG snapshot of a rendered image source — either a Scene or an AbstractInput (any input that has produced a RenderedCudaBgraImage).

Selecting the source (provide at most one — selectors are checked in this priority order):

Parameter Description
target NamedModel GUID — matches a Scene or an AbstractInput
targetname NamedModel name — matches a Scene or an AbstractInput
scene Scene name (legacy; selects a Scene only)

If no selector is supplied, the topmost scene is used (falling back to active scene, then first scene in the project).

Additional parameters:

Parameter Required Description
quality No JPEG quality 1–100 (default: 75).
width No Output width in pixels. 0 = original.
height No Output height in pixels. 0 = original (aspect preserved when only one dimension is set).

Response:

  • 200 OK — JPEG image data (Content-Type: image/jpeg)
  • 204 No Content — Source resolved but no image has been rendered yet (e.g. an input that hasn't produced its first frame)

GET /api/image/stream

Opens a long-lived MJPEG (multipart/x-mixed-replace) stream of a rendered image source. Each connection spawns its own worker thread so the VideoWorker is never blocked by the streaming loop, and each connection gets its own JPEG compressor to avoid cross-connection contention. The connection stays open until the client disconnects or the server shuts down. The source is re-resolved on every tick, so renaming or replacing the underlying NamedModel takes effect on the next frame without restarting the stream.

Selecting the source (same selectors as /api/image/get):

Parameter Description
target NamedModel GUID — Scene or AbstractInput
targetname NamedModel name — Scene or AbstractInput
scene Scene name (legacy; default: topmost scene)

Additional parameters:

Parameter Required Description
quality No JPEG quality 1–100 (default: 75).
width No Output width in pixels. 0 = original.
height No Output height in pixels. 0 = original (aspect preserved when only one dimension is set).
fps No Target frames per second 1–30 (default: 5).

Response: 200 OKContent-Type: multipart/x-mixed-replace; boundary=frame with JPEG frames at the requested cadence. Frames are skipped silently when the source isn't currently rendering, and the stream resumes as soon as it is.


GET /api/image/preview

Serves an HTML page with an embedded MJPEG viewer, scene selector, quality/size/FPS controls, and a collapsible performance sidebar. Styled to match the Composer Desktop dark theme.

Response: 200 OKtext/html