Using Videos as Training Data

Often, the visual data you want to analyze comes in the form of video. It could be security camera footage, YouTube videos, or webcam recordings. We know how to use Roboflow with images, but how does it work with video?
For most computer vision models, the best way to work with video is to treat it as a sequence of individual images. You can split a video into frames and process each frame independently. The same approach can be used to extract training data from videos.
In this guide, we will walk you through the complete process of processing video in Roboflow to train models. You will learn how to:
- Extract training frames at the optimal sampling rate directly in your browser.
- Accelerate manual annotation using time-saving tracking tools like Repeat Previous.
- Use Roboflow Agent with Auto Label to automatically annotate frames using text prompts.
- Build with Roboflow Agent to create video-processing workflows using natural language.
How to Extract Video Frames
While you can use cryptic command-line tools like ffmpeg (opens in a new tab) to extract video frames, the easiest way to do so is with Roboflow.
Simply upload a video (here's an example you can use (opens in a new tab)) to your Roboflow project through the platform. You can then select a frame sampling rate. The higher the sampling rate, the more images you'll extract from the video, but the extracted frames are also more likely to be similar to one another.
Processing a video in Roboflow to extract frames for annotation.
Experiment to find a frame sampling rate that strikes a good balance between providing enough training data for your model to learn from and avoiding unnecessary work for your annotators.
How to Annotate Video Frames
Once you have extracted the video frames, you can use the full range of features available in Roboflow Annotate, including Label Assist (opens in a new tab). Label Assist uses pretrained models like RF-DETR (opens in a new tab), or your own trained models to automatically generate annotations, reducing the amount of manual labeling required.
Another feature that is particularly useful when working with video is Repeat Previous.
Annotating consecutive video frames using the Repeat Previous tool.
The Repeat Previous tool copies the annotation from the last image you annotated. Since the same objects often appear across multiple video frames, this allows you to track objects over time by making small adjustments to the previous annotation instead of starting from scratch, speeding up the annotation process.
How to Use Roboflow Agent and Auto Label for Video Annotation
Roboflow Agent is an AI agent within Roboflow that lets you build computer vision workflows, manage datasets, and perform other computer vision tasks using natural language instead of writing extensive code. You can access it directly from the Roboflow app home page.
You can use Roboflow Agent with Auto Label to annotate video training data using AI instead of manually labeling each frame. This makes it easier to generate datasets from videos for training computer vision models.
For example, you can prompt Roboflow Agent to take a short video that you provide and use Roboflow Auto Label to automatically annotate the video frames and create a dataset for training an object detection model, as shown below.

Roboflow Agent will then instruct you to upload a sample video to use for creating the training dataset.
Once you upload a sample video, Agent extracts representative frames, uses Auto Label to detect and annotate objects of interest, and prepares the dataset for training.
Roboflow Agent extracted frames from the video and generated car bounding boxes using Auto Label for review.
Roboflow Auto Label uses foundation models such as Gemini, GPT, and SAM 3, alongside custom-trained Roboflow models and Workflows, to automatically annotate images for tasks such as object detection, instance segmentation, classification, and keypoint detection.
Roboflow Agent also provides a link to your project, where you can review, edit, and approve the annotations generated by Auto Label on the extracted frames. You can make any necessary adjustments before adding the annotated images to your dataset and assigning them to the training, validation, and test sets.
Roboflow Agent provides a project link where you can review and approve the Auto Label annotations.
You can continue expanding your dataset by dragging and dropping additional images or videos into the Agent chat. Then, prompt Roboflow Agent to use Auto Label to annotate the newly added media, allowing you to iteratively improve your dataset.

When the Answer Depends on Motion: Action Recognition
Labeling individual frames works when each frame answers the question on its own: is there a car, a box, or a missing helmet. Some questions only make sense over time, such as whether a worker completed each assembly step, when a forklift started unloading, or whether a player dribbled before shooting. For those, Roboflow has an Action Recognition project type.
In an Action Recognition project, you upload whole videos and label segments on a timeline, marking when each action starts and ends instead of drawing boxes on frames. You then train Meta's V-JEPA 2.1 or NVIDIA Cosmos 3 Edge on the labeled videos. The trained model watches a video and returns a timeline of actions, each with a start frame, an end frame, and a confidence score. See how to train, evaluate, and deploy action recognition models to get started.
What’s Next After Annotating Visual Data?
Once you’re satisfied with your dataset, you can either prompt Roboflow Agent to train an object detection model or open your project in the side panel and click the Train button.

Once trained, you can also use this model to automatically annotate additional training data with Label Assist (opens in a new tab).
Roboflow Agent provides training details, including model performance metrics and evaluation results, directly in the chat. It also sends you an email notification once your model has finished training.
You can also prompt Roboflow Agent to create complete workflows. For example, you can ask it to build a workflow using your newly trained model to visualize car detections and their confidence scores, as shown below. Roboflow Agent also provides an interface to test the workflow directly.
Roboflow Agent trained an RF-DETR Small model, provided evaluation metrics, and deployed a workflow using the trained model to visualize car detections. (Try the workflow)
Once your video frames are annotated and your model is trained, you can integrate it into your application using a Roboflow Workflow to generate predictions in real-world scenarios. All available integration options can be found under the Integrate Workflow button, as shown below:

To learn more, check out this blog on video annotation, which provides a detailed explanation of the process.