> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/datasets/annotate/annotate/annotate-video-segments.md).

# Annotate Video Segments

Mark the start and end of actions in a video.

A segment labels a time range in a video with an action class. In an Action Recognition Project, use segments to show when each action happens.

[Auto Label](/datasets/annotate/annotate/ai-labeling/auto-label.md#auto-label-action-recognition-videos) can add segments to a batch of videos for you.

For example, label `opening-box` from the first movement of the lid until the box is open. Leave out the time spent walking toward the box or standing beside it afterward.

When you start annotating a video in an Action Recognition Project, you see this annotation editor.

<figure><img src="https://2252499186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNVfRxNsvCh4GOyqrjmzX%2Fuploads%2Fgit-blob-e0039baff1b1ba51d730366c8388c2a3dcef1019%2Faction-recognition-video-editor.png?alt=media" alt="Action Recognition video annotation editor with a video and timeline"><figcaption><p>The editor shows the video, timeline, action classes, and save status.</p></figcaption></figure>

{% stepper %}
{% step %}

### Add a segment

Drag across the row labeled "Click or drag here to start a segment in a new class" from the start of the action to its end. Select an existing class or create `opening-box` in the class field that opens.

The segment appears as a colored bar in that class's row. Changes save automatically. Wait for "Saved" in the header before leaving the video.

<figure><img src="https://2252499186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNVfRxNsvCh4GOyqrjmzX%2Fuploads%2Fgit-blob-d6acf88fb500550bf11b5b2bff87dba701cf746d%2Faction-recognition-single-segment.png?alt=media" alt="Action Recognition video annotation editor with a preparing segment on the timeline"><figcaption><p>Drag across the timeline to add a segment and assign its class.</p></figcaption></figure>
{% endstep %}

{% step %}

### Adjust the start and end

Select the segment and play through the action. Drag either edge of the bar to adjust its time range. For frame-by-frame adjustments, move the playhead to the desired frame, right-click the segment, and choose "Set In" for the start or "Set Out" for the end.

For `opening-box`, check that the segment begins when the lid starts moving and ends when it is open. Wait for "Saved" after your edits.

<figure><img src="https://2252499186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNVfRxNsvCh4GOyqrjmzX%2Fuploads%2Fgit-blob-61432cdc2d781f845a925a47e6df357213da2d9d%2Faction-recognition-two-segments.png?alt=media" alt="Action Recognition video annotation editor with preparing and packaging segments on separate timeline rows"><figcaption><p>Each action class has its own row, so a video can contain more than one segment.</p></figcaption></figure>
{% endstep %}
{% endstepper %}
