# People Counter IN/OUT for Video and CCTV

> Count people entering and leaving a room or shop using a video file, webcam, or security camera feed.

People Counter IN/OUT for Video and CCTV is a free AI agent skill on Agensi by Nawaf Rayhan, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Nawaf Rayhan](https://www.agensi.io/creators/nawaf-rayhan)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-12-05
- Security: scan passed (2026-12-04); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/people-counter-in-out-for-video-and-cctv
- Tags: ai-agents, python, object-detection, yolo, security, retail

## What it does

- Counts every person who crosses a specific line in a video or camera feed
- Tracks individuals with unique IDs to avoid counting the same person twice
- Calculates total entries, total exits, and current occupancy automatically
- Identifies the peak crowd size and the exact times the area was busiest
- Creates an annotated video showing exactly when and where people were detected
- Works with saved video files, live webcams, or security camera streams

## Who it's for

- **Shop owners wanting to track store traffic:** Count how many customers enter and leave your shop without buying expensive hardware. Try: "Count people entering my shop from the file entrance_tuesday.mp4."
- **Event planners managing venue capacity:** Monitor how many people are inside your event in real-time to stay within safety limits. Try: "Check the occupancy for the lobby using my webcam. Stop after 10 minutes."
- **Security teams monitoring foot traffic:** Get a list of exactly when people crossed into or out of a specific area. Try: "Analyze the RTSP camera stream for the back gate and tell me the peak crowd size."

## About this skill

This skill helps you count people moving through a specific area in a video or live camera feed. It is built for anyone who needs to know how many people entered or exited a room, shop, or gate without manually watching hours of footage.

### How it works
1. You provide a video file, a link to a security camera stream, or access to a webcam.
2. Your AI agent sets up a virtual line across the entrance or path in the video.
3. The skill tracks every person, giving them a unique ID so they are not counted twice.
4. You receive a summary of total entries, exits, and the highest number of people seen at once.
5. You can also get a new version of the video with boxes and labels drawn over the people so you can verify the count.

### Frameworks & tools
This skill uses Python scripts along with the YOLO and ByteTrack systems to recognize and follow people. It works with standard video files, webcams, and common security camera streams.

### Why this beats prompting it yourself
A regular AI chat can describe a single image, but it cannot watch a whole video and keep track of individual people moving over time. This skill uses specialized tracking logic to ensure that if someone stands still or walks behind an object, they are still remembered as the same person, leading to much more accurate totals than a simple guess.

### Use cases
- Tracking how many customers visit a retail store during different hours of the day.
- Monitoring real-time occupancy for a gallery or office to prevent overcrowding.
- Analyzing foot traffic at a trade show booth to see which times were the busiest.
- Checking a security feed to see exactly what time someone entered a restricted zone.

### Known limitations
The skill works best with cameras mounted overhead or at an angle. It may struggle to count people accurately in extremely crowded areas where people are blocking each other from view.

## Requires

- Python
- Optional: NVIDIA GPU (faster)
- Optional: RTSP/IP camera

The first run downloads the YOLO11 model (about 5 MB) from Ultralytics. After that it runs fully offline.

## Technical details

Built with Python using Ultralytics YOLOv11 and ByteTrack for robust object tracking. Supports local execution on CPU or GPU (CUDA). Handles MP4, webcam indices, and RTSP streams. Outputs data to JSON and generates annotated MP4 files using OpenCV. Requirements include ultralytics and opencv-python.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the People Counter IN/OUT for Video and CCTV skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific information will I get after the skill processes my video?

The skill tracks movement across a virtual line to count how many people enter or exit a room or shop. It provides a summary of total entries, exits, the current number of people inside, and the busiest times recorded.

### What do I need to provide for this to work?

You only need to provide a video file, a link to a security camera stream (RTSP), or access to a webcam. The skill uses built-in tracking scripts to process the footage and generate the results for you.

### How do I tell my AI agent to start counting?

You can ask your agent to count people in a specific video file or live feed. Be sure to tell the agent where the entrance is in the frame and which direction should be counted as an entry versus an exit.

### Are there any situations where the count might be inaccurate?

The skill works best when the camera is mounted overhead or at an angle. It may not be as accurate in very crowded spaces where people are walking closely together and blocking the camera's view of one another.

### In what format will I receive the final report?

The skill produces a summary report in a data format called JSON which lists totals and specific events. You can also request a new version of the video that has boxes and labels drawn over the people so you can visually verify the count.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
