You need to enable JavaScript to run this app.
Lake AI Service

Lake AI Service

Copy page
Download PDF
Video analysis
Video scene segmentation
Copy page
Download PDF
Video scene segmentation

The video scene segmentation operator uses a multimodal large model to perform shot/scene segmentation, global character recognition, scene-level character association, and character image extraction on the input video. The operator outputs scene summary results, a character registry, sliced videos for each scene, and image files archived by character, facilitating subsequent retrieval, editing, and content understanding.

Operator introduction

Operator ID: las_video_scene_seg

Core capabilities

  • Supports scene segmentation based on VLM, and also supports equal-duration segmentation when min_segment_duration == max_segment_duration.
  • Supports global character extraction and deduplication aggregation, generating a character registry.
  • Supports character association within scenes, outputting the time intervals when characters appear in scenes, key frame timestamps, and bbox information.
  • Supports automatic extraction of independent video files for each scene.
  • Supports extracting and filtering representative images for each character, outputting them archived by character.
  • Supports outputting token usage and LLM request counts to facilitate cost evaluation.

Effect demonstration


[Input video and output segmented video]
  • Input video
  • Output segmented video: Example 1
  • Output segmented video: Example 2
  • Output segmented video: Example 3

[Output character images]
  • Character 1
    Image
    Image
    Image
  • Character 2
    Image
    Image
    Image
  • Scene storyboard image
    • Hotel corridor
      Image
    • Command center
      Image
    • Residential entrance
      Image
  • Prop image
    • Shoulder bag
      Image
    • Walkie-talkie
      Image
    • Smartphone
      Image

The above are sample results for some outputs.


[Segmented result files and various registries]
  • Segmentation results
    segments.json
    Unknown size
  • Character registry
    characters_registry.json
    Unknown size
  • Segmentation registry
    shot_registry.json
    Unknown size
  • Scene registry
    scene_registry.json
    Unknown size
  • Prop registry
    prop_registry.json
    Unknown size
Note: The video scene segmentation operator is continuously being updated. The above result files are for illustration only. The actual output fields of each file are subject to the operator's output.

Supported regions

  • Beijing: cn-beijing
  • Shanghai: cn-shanghai
  • Guangzhou: cn-guangzhou

Operator performance

Sub-item
Performance impact description

Maximum RPM

600

Maximum concurrency

10

Processing time

  • Total processing time is mainly affected by video duration, frame extraction rate, number of characters, number of scenes, and number of VLM calls.
  • The operator relies on VLM calls; the longer the video, the more characters, and the more complex the scenes, the higher the overall processing time.

Input and output requirements

Input requirements

Subdivision

Detailed requirements

Supported input data modalities

  • Video

Input format: Video

  • Size: The current version limits video duration to within 20 minutes.

Input path requirements

Provide operator input data via the request parameters video_url and reference_images. Currently, public URL and TOS path are supported.

  • Public URL: A publicly accessible URL, in the format http/https.
    • Public URLs that require login status or additional header authentication are not supported; temporary URLs must be valid during task execution.
  • TOS path: After uploading the data to be processed to a TOS Bucket under the same primary account and region as the current LAS service, you can provide the TOS path in the format tos://bucket_name/demo.
    • The TOS object must exist and have read permissions.

Output requirements

Subdivision

Detailed requirements

Output data modalities

  • Video (segmented video clips)
  • Text (character registry
  • Image (segmentation screenshots, character representative images

Output path: TOS

Specify the storage path for the operator output results via the request parameter output_tos_path. Currently, only TOS paths are supported.

  • TOS path: Under the same primary account and region as the LAS service, a TOS Bucket directory with write permissions. Format: tos://bucket/output/.

Billing information
  • Billing standards

    Detailed items
    Billing standards description

    Billing item

    Billing is based on usage calculated from the duration of the input video.

    Billing type

    Usage-based billing, unit: CNY/minute, billed hourly based on actual usage.

    Unit price

    1.5 CNY/minute

  • Billing details
    Billing formula: Total cost = unit price * usage

Cautions and prerequisites

Details

Caution and prerequisites

Costs

Before calling an operator, you need to understand the model invocation costs associated with using the operator. For details, see Large model invocation billing.

Authentication (API Key)

Before calling an operator, you need to generate an API Key for operator invocation. It is recommended to configure the API Key as an environment variable to ensure safer operator calls. For details, see Obtain and configure API Key.

BaseURL

Before calling an operator, you need to determine the BaseURL for operator invocation based on the region where your current LAS service is deployed. This is used to configure the path parameter values for operator calls.
For details, see Obtain the Base URL. The Examples below are for reference only; when making actual calls, replace the path values with those corresponding to your region.

Rest API call

API usage instructions

The API for this operator is an asynchronous task interface. You need to submit a task via the submit interface, then use the Poll interface to check the task status and obtain the operator processing result. Meanwhile, this operator supports asynchronous callback capability (Callback). You can set the callback parameter callback.url when initiating the operator task. LAS will send an HTTP POST notification to this URL. For guidance on using asynchronous callbacks, refer to Asynchronous callback API.

Submit

Interface description

Submitting an asynchronous task using the video scene segmentation operator supports scene segmentation, character extraction, scene slicing, and result upload.

Request parameters

Parameter
Type
Required
Example value
Description
operator_id
string
Yes
las_video_scene_seg
Operator ID
operator_version
string
Yes
v1
Operator version
data
VideoSceneSegUserReqParams
Yes
Request parameters for video scene segmentation and character localization
callback
Callback
No
Task status callback configuration. After configuring callback.url, a POST request will be sent to this address when the task status changes; if not configured, you can query the task status and result through Poll.

Response parameters

Parameter
Type
Example value
Description
metadata
metadata
Request metadata
task_id
string
task-xxx
Task ID in asynchronous mode, used for job status queries.
task_status
string
PENDING
Task status in asynchronous mode.
  • PENDING, request received
  • RUNNING, running
  • COMPLETED, completed
  • FAILED, failed
  • TIMEOUT, timed out
business_code
string
0
Business code.
error_msg
string
If an exception occurs, detailed error information will be returned.

Example

Request example

# Please set OUTPUT_TOS_PATH to a tos path writable by this account
export OUTPUT_TOS_PATH="tos://path/to/scene_seg_results"

curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/submit" --header "Content-Type: application/json" --header "Authorization: Bearer $LAS_API_KEY" --data '{
    "operator_id": "las_video_scene_seg",
    "operator_version": "v1",
    "data": {
        "video_url": "https://las-ai-qa-online.tos-cn-beijing.volces.com/operator_cards_serving/public/qa/las_video_scene_seg/v1/sample_video.mp4",
        "output_tos_path": "$OUTPUT_TOS_PATH",
        "min_segment_duration": 4.0,
        "max_segment_duration": 10.0,
        "seg_mode": "precise"
    }
}'

Response example

{
    "metadata": {
        "task_id": "task-20260323153012-abc123",
        "task_status": "PENDING",
        "business_code": "0",
        "error_msg": ""
    }
}

Poll

Interface description

Submitting an asynchronous task using the video scene segmentation operator supports scene segmentation, character extraction, scene slicing, and result upload.

Request parameters

Parameter

Type

Required

Example value

Description

operator_id

string

Yes

las_video_scene_seg

Operator ID

operator_version

string

Yes

v1

Operator version

task_id

string

Yes

task-xxx

Task ID

Response parameters

Parameter
Type
Example value
Description
metadata
metadata
Request metadata
data
VideoSceneSegResponse
Returned data

Example

Request example

curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/poll" --header "Content-Type: application/json" --header "Authorization: Bearer $LAS_API_KEY" --data '{
    "operator_id": "las_video_scene_seg",
    "operator_version": "v1",
    "task_id": "task-20260323153012-abc123"
}'

Response example

{
    "metadata": {
        "task_id": "task-20260323153012-abc123",
        "task_status": "COMPLETED",
        "submit_time": "2026-07-21T16:04:06+08:00",
        "end_time": "2026-07-21T16:04:06+08:00",
        "business_code": "0",
        "error_msg": ""
    },
    "data": {
        "video_duration": 98.4,
        "segment_count": 12,
        "character_count": 5,
        "segments_url": "tos://path/to/scene_seg_results/9f4b7c3d12ab_20260323_153012/segments.json",
        "characters_registry_url": "tos://path/to/scene_seg_results/9f4b7c3d12ab_20260323_153012/characters_registry.json"
    }
}

Error code

HttpCode

Error code

Error message

Description

400

Url.Invalid

The url is invalid.

The video URL is invalid.

400

Video.Invalid

The video file is invalid.

The video file is invalid or cannot be parsed.

400

Video.DownloadFailed

Video download failed.

Video download failed.

400

Video.FormatUnsupported

Video format not supported.

Video format not supported.

400

Parameter.Invalid

The parameter is invalid.

The parameter is invalid, for example, the range of min_segment_duration / max_segment_duration is incorrect, min_segment_duration > max_segment_duration, or the format of output_tos_path is invalid, and so on.

400

Video.Timeout

Video processing timeout.

Video processing timeout.

400

Video.ModelFailed

VLM call failed.

VLM call failed, resulting in scene segmentation or character recognition failure.

400

Video.FrameExtractionFailed

Frame extraction failed.

Frame extraction failed.

400

Video.UploadFailed

Video upload failed.

Failed to upload scene video, JSON result, or character image.

400

Tos.AccessFailed

TOS access failed.

TOS access failed.

401

Authorization.Missing

Missing Authorization.

Authorization is missing.

401

ApiKey.InValid

The api key is invalid.

The API is invalid.

500

Internal.ServerError

Internal server error.

Internal server error, for example, no scenes could be segmented, no characters were recognized, or character image extraction failed, and so on.

Last updated: 2026.07.28 16:49:35