> For the complete documentation index, see [llms.txt](https://help.imotions.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.imotions.com/lab/study-setup-and-design/other-tools/automated-annotation-of-video-stimuli-based-on-scene-changes.md).

# Automated Annotation of Video Stimuli Based on Scene Changes

Detect scene changes in video stimuli automatically, create Video Segments annotations, and optionally generate segment descriptions with a local VLM.

This article provides information about the iMotions Video Segment Detection that is used for detecting video segments based on video scene changes and creating annotations for them. This feature analyzes your videos and automatically identifies scenes, which are then marked as annotation segments for the video stimulus.

## Overview and Recommended Usage

iMotions Video Segment Detection can be applied to the following stimulus types:

* Video
* Screen Recordings
* Web Site Recordings
* Scene Recordings

A video segment is defined as a continuous recording within a video. Abrupt changes in the frame content are detected as the end of one segment and the start of the next segment.

Video Segment Detection works best with commercials, movies, trailers, or other videos that contain sharp cuts, edits, or changes in perspective between video segments. Note: Currently, slow transitions such as sliding clips, morphing, or gradual fades between clips are not detected as scene changes and might not be detected.

Videos that involve ‘live camera recordings’, such as Scene Recordings, are less optimal for Video Segment Detection, since the recording will be one long segment without any cuts or significant changes between video frames.

## Applying Video Segment Detection

1. Select a study that contains video/recording stimuli.
2. Select the video/recording stimuli from the Stimulus Bar (along the top of the main window).
3. Click the "Detect Video Segments" button to start Video Segment Detection processing for the selected video.
4. After processing, a new annotation - named "Video Segments" is created.
5. If this annotation already exists, a new annotation - named "Video Segments (N)" is created, where N is a number indicating the order it was created.

![A video stimulus selected in the stimulus bar, with its details](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-c591fab725c9c0e9ca5fc23385d583bb943033b4%2Flab_library_video-details_detect-video-segments.png?alt=media)

## Viewing Video Segments

After the Video Segment Detection is finished processing, the detected result will be shown as an annotation named "Video Segments" and can be found in the Replay window in the Annotation panel.

![](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-c6a47dad73938a8da77adf668ba8389f2f1f569c%2F639e4d4998_image-6JQ6ULLA.webp?alt=media)

## Automated Video Segment Description (Optional)

As an optional and extended feature it is also possible to let a small vision language model (VLM) process the video segments and generate a descriptive text of the segment video content. The generated segment description will be added to the annotation segments comment field. An example is seen below with mouse over currently shown segment.

Note: The VLM is running locally and no data is sent to any online services.

![](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-183731dde71090a5462261971abfbb2065f91b8f%2Fb0e381f688_image-5A5IEATD.webp?alt=media)

### Enabling Video Segment Description

To enable the automated video segment description creation as part of the Video Segment Detection process, use the following steps:

1. Open the Global Settings and select the "Package" tab.
2. Enable the "Video Segment Description" group.
3. Click the "Install iMotions Video Processing v.X.Y.Z" button, if the extra Video Processing package is not already installed or needs to be updated. The installation might request you to restart your PC.
4. Click “OK” in the Global Settings dialog to accept changes.

Hereafter descriptive text will be generated from the detected segments, as part of the Video Segment Detection.

Note: The Video Segment Description creation requires more processing time, so be patient when waiting for the results.

![The Packages tab of Global Settings with Video Segment Description selected and its prompt](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-ebf0424e9adcfe34d89e893ae5e3f0883926c06c%2Flab_global-settings_packages_video-segment-description.png?alt=media)

### Video Segment Description prompt

It is possible to change the VLM prompt, used to generate the segment description, to fit custom needs. Feel free to experiment with the prompt to create alternative segment texts.

The prompt is changed in the "Global Settings | Package | Video Segment Description" view.

You can return to the default prompt using the "Set default" button.

### Disabling Video Segment Description

If it is undesired to process segment descriptions when the Video Segment Detection is processing it is possible to disable this feature:

Go back to "Global Settings | Package" tab.

Uncheck the "Video Segment Description" group.

Now the Video Segment Description is not generated and the Video Segment Detection process will run significantly faster.

### Disclaimer and VLM model

As the Video Segment Description is generated by a small VLM the output text is not guaranteed always to be accurate.

The model used is selected for its small size and ability to run on consumer PCs.

Please refer to the model’s description page for more info about the model’s capabilities: [SmolVLM2](https://huggingface.co/blog/smolvlm2).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.imotions.com/lab/study-setup-and-design/other-tools/automated-annotation-of-video-stimuli-based-on-scene-changes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
