Media Server 24.2

# TrainVisualClusteringItem

Adds an item to a visual clustering database. After adding all of your visual media to the database, you can perform clustering with the action ClusterVisualItems.

Type: asynchronous

Parameter | Description | Required
--- | --- | ---
`database` | The name of the database to add the item to. The database must already exist. | Yes
`identifier` | A unique identifier for the item (maximum 254 bytes). If you do not set this parameter, Media Server generates an identifier automatically. | No
`sourcedata` | The item to add. Files must be uploaded as multipart/form-data. For more information about sending data to Media Server, see Send Actions to Media Server. | Set this or `sourcepath`
`sourcepath` | The path of the item to add. The path must be absolute, or relative to the Media Server executable file. | Set this or `sourcedata`
`nullsourcedata` | A Boolean value, default `false`, that specifies whether to discard the source data after training is complete. Setting this to `true` is equivalent to running the action NullVisualClusteringItemSourceData after training. By default, samples from the source media are stored in the Media Server training database. You can run visual clustering without the source data, but future enhancements to visual clustering might require retraining and this is not possible without the source data (you would need to supply the source media again). | No
`numparallel` | The maximum number of threads to use to complete this action (default 1). | No

## Example

The following example adds an item by sending a video file as multipart/form-data using the `sourcedata` parameter:

    curl http://localhost:14000 -F action=TrainVisualClusteringItem
                                -F database=BroadcastClips
                                -F identifier=item1
                                -F sourcedata=@video.mp4

## Response

This action is asynchronous, so Media Server always returns success accompanied by a token. You can use this token with the QueueInfo action to retrieve the status of your request.

Copyright 2024 Open Text
Version 24.2 | Last updated March 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL Media Server 24.2

Topic Title: TrainVisualClusteringItem