> ## Documentation Index
> Fetch the complete documentation index at: https://avala.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Video Annotation

> Annotate video data frame by frame with tracking

This tutorial covers annotating video data in Avala, including frame navigation, drawing annotations, and tracking objects across frames.

## What You'll Learn

* How to open and navigate video data in the viewer
* How to draw annotations on video frames
* How to track objects across frames with interpolation
* How to review and export video annotations

## Prerequisites

* A dataset containing video data (MP4, MOV, or image sequences)
* A project created with the appropriate task type (bounding box, polygon, etc.)
* Labels defined in your project taxonomy

## Step 1: Open the Video Viewer

1. Navigate to your dataset in [Avala](https://avala.ai)
2. Click **Sequences** to see your video sequences
3. Click on a sequence to open the video viewer
4. The interface displays:
   * **Canvas**: The current video frame with annotation overlay
   * **Timeline**: Scrubber bar showing all frames
   * **Object list**: Panel listing all annotated objects
   * **Toolbar**: Annotation tools along the top or side

## Step 2: Navigate Frames

### Playback Controls

Use the playback controls below the canvas:

* **Play / Pause**: Click the play button or press `Space`
* **Step forward**: Press `→` to advance one frame
* **Step backward**: Press `←` to go back one frame
* **Skip forward**: Press `Shift + →` to skip 10 frames
* **Skip backward**: Press `Shift + ←` to go back 10 frames
* **Jump to start**: Press `Home`
* **Jump to end**: Press `End`

### Timeline Scrubber

Click anywhere on the timeline to jump directly to that frame. Keyframes for tracked objects are marked on the timeline with colored indicators.

<Tip>
  The frame counter in the bottom-left shows the current frame number and total frame count. Use this to coordinate with teammates on specific frames.
</Tip>

## Step 3: Draw Annotations on Frames

### Bounding Boxes

1. Select the **Box tool** from the toolbar (or press `B`)
2. Click and drag on the canvas to draw a bounding box around the object
3. Release to complete the box
4. Select a label from the dropdown
5. Adjust the box by dragging its edges or corners

### Polygons

1. Select the **Polygon tool** (or press `P`)
2. Click to place vertices around the object outline
3. Close the polygon by clicking the first vertex or pressing `Enter`
4. Assign a label

### Other Tools

All annotation tools available in your project work on video frames. See the [Annotation Tools](/docs/annotation/guides/annotation-tools) guide for the full reference.

## Step 4: Track Objects Across Frames

Object tracking lets you follow the same object through multiple frames without re-drawing it on every frame.

### Creating a Tracked Object

1. Draw an annotation on the current frame (this becomes the first **keyframe**)
2. The object is assigned a unique tracking ID
3. Navigate forward to a later frame
4. The annotation persists from the previous keyframe
5. Adjust the position or shape to match the object's new location (this creates a new keyframe)
6. Avala interpolates the annotation for all frames between keyframes

### Interpolation

Between two keyframes, Avala linearly interpolates the annotation properties:

* **Position**: Smoothly transitions between keyframe locations
* **Size**: Gradually scales between keyframe dimensions
* **Rotation**: Interpolates rotation angle

Interpolated frames are shown with a lighter indicator on the timeline, while keyframes are shown with a solid marker.

### Managing Keyframes

| Action             | How                                                             |
| ------------------ | --------------------------------------------------------------- |
| Add a keyframe     | Navigate to a frame and adjust the annotation                   |
| Delete a keyframe  | Right-click the keyframe marker and select **Delete Keyframe**  |
| View all keyframes | Click the object in the object list to see its keyframe summary |

<Tip>
  You do not need to create a keyframe on every frame. Place keyframes where the object changes direction, speed, or size, and let interpolation handle the in-between frames.
</Tip>

## Step 5: Edit Tracked Objects

### Adjusting an Object

1. Select the object on the canvas or in the object list
2. Modify its position, size, or label
3. Changes on an interpolated frame automatically create a new keyframe

### Marking Occlusion

When an object is temporarily hidden:

1. Navigate to the frame where the object becomes occluded
2. Select the object and toggle the **Occluded** attribute
3. Navigate to where the object reappears and adjust its position
4. Interpolation handles the transition

### Deleting a Tracked Object

* **Delete on one frame**: Right-click → **Remove from this frame** (ends the track at this frame)
* **Delete entirely**: Select the object → press `Delete` → confirm to remove across all frames

## Step 6: Review and Export

1. Play through the entire sequence to verify annotations
2. Check that tracked objects maintain correct IDs throughout
3. Verify interpolated frames for accuracy
4. Submit for review when satisfied
5. Export annotations in your preferred format (COCO, Avala Format, etc.)

## Keyboard Shortcuts

| Shortcut                  | Action                           |
| ------------------------- | -------------------------------- |
| `Space`                   | Play / Pause                     |
| `←` / `→`                 | Previous / Next frame            |
| `Shift + ←` / `Shift + →` | Skip 10 frames                   |
| `Home` / `End`            | Jump to start / end              |
| `B`                       | Box tool                         |
| `P`                       | Polygon tool                     |
| `V`                       | Select / Move tool               |
| `Delete`                  | Delete selected annotation       |
| `Ctrl+Z` / `⌘Z`           | Undo                             |
| `Ctrl+Shift+Z` / `⌘⇧Z`    | Redo                             |
| `Ctrl+S` / `⌘S`           | Save                             |
| `Escape`                  | Cancel current action / Deselect |

## Tips for Efficient Video Annotation

* **Start with keyframes at transitions**: Place keyframes where objects change direction or speed, not on every frame
* **Use playback to verify**: Play the sequence at normal speed to catch interpolation errors
* **Annotate one object at a time**: Track a single object through the full sequence before starting the next
* **Use the object list**: Keep track of all objects and their frame ranges in the side panel
* **Leverage shortcuts**: Frame stepping with arrow keys is much faster than clicking the timeline
* **Save frequently**: Press `Ctrl+S` regularly to avoid losing work

## Next Steps

* Explore [Annotation Tools](/docs/annotation/guides/annotation-tools) for the full tool reference
* Learn about [AI-Assisted Annotation](/docs/annotation/tutorials/ai-assisted) to speed up your workflow
* Check [Keyboard Shortcuts](/docs/annotation/reference/keyboard-shortcuts) for the complete shortcut list
