Media Server 12.13

# TrainVideoMatchClip

Trains Media Server to recognize a video clip.

Type: asynchronous

Parameter | Description | Required
--- | --- | ---
`database` | The name of the database to add the video clip to. The database must already exist. | Yes
`identifier` | A unique identifier for the clip (maximum 254 bytes). If you do not set this parameter, Media Server generates an identifier automatically. | No
`metadata` | A comma-separated list of metadata key-value pairs to add to the clip. Separate keys from values using a colon (`:`). To include a comma or colon in a key name or value, you must enclose the key name or value in quotation marks (`"`) and escape any quotation marks that occur within the string with a backslash (`\`). | No
`nullvideodata` | A Boolean value (default false) that specifies whether to discard the video data when training is complete, rather than storing it in the database. | No
`trainingoptions` | A comma-separated list of training options to apply to the clip. Separate training options from their values using a colon (`:`). You can set the training option `maximumduration` to limit the amount of video used for training. For example, if you set `maximumduration:30s` then Media Server uses only the first 30 seconds of the video. This is usually sufficient for Media Server to identify a match. You cannot specify a value smaller than `10s`. | No
`videodata` | The video data. Files must be uploaded as multipart/form-data. For more information about sending data to Media Server, refer to the Media Server Administration Guide. | Set this or `videopath`
`videopath` | The path of the file that contains the video clip. The path must be absolute, or relative to the Media Server executable file. | Set this or `videodata`

## Example

The following example trains Media Server by sending the path of the video clip:

    curl http://localhost:14000 -F action=TrainVideoMatchClip
                                -F database=movies
                                -F videopath=clip.mp4
                                -F trainingoptions=maximumduration:45s

Alternatively, you can train Media Server by sending the video data, for example:

    curl http://localhost:14000 -F action=TrainVideoMatchClip
                                -F database=movies
                                -F videodata=@clip.mp4
                                -F trainingoptions=maximumduration:45s

## 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 2022 Micro Focus or one of its affiliates
Version 12.13 | Last updated October 2022

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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Media Server 12.13

Topic Title: TrainVideoMatchClip