> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-mdt/features/bodycam.md).

# Bodycam

Wearable bodycams — recording, live supervisor viewing, the storage model, and Discord footage records.

Officers carry a **bodycam item**; using it toggles recording (with a put-on-shirt animation on activation). Supervisors can watch any recording officer **live**, and finished recordings post a footage record to Discord. Config: `config/bodycam.lua`.

## Operating the camera

* **Use the `bodycam` item** — toggles recording. Requires the item definition in your inventory (see [Inventory Items](/mango5m-docs/resources/mango-mdt/configuration/inventory-items.md)).
* **`/bodycam`** — command fallback/alternative; `/bodycam off` powers the unit down from standby. With `RequireItem = true` (default) the command checks the player actually carries the item.
* **`/givebodycam <serverId>`** — admin helper to hand a camera over (`bodycam.manage`, or server console).

A REC/standby/uploading indicator chip shows on the officer's HUD while the unit is on. Its default position is config (`IndicatorPosition`), and players who use the MDT's **Move HUD cards** feature can drag it wherever suits their layout.

## States

`standby` → `recording` → (stop) → `uploading` (8 s, configurable) → footage row `uploaded`, unit back to `standby`.

Each unit gets a stable cosmetic serial (`BC-4F7A21`; prefix configurable).

## Live viewing

Supervisors with `bodycam.viewall` open a recording officer's **live feed** from the Bodycam page — first-person from the officer's chest (mid-torso mount), with a CCTV-style grain over it. Nearby officers stream frame-perfectly off the real ped; distant ones are tracked by position polling (`TrackInterval`).

Permissions: `bodycam.view` (own footage), `bodycam.viewall` (everyone's + live feeds), `bodycam.manage` (admin).

## Storage model

Footage weight is simulated for the storage bar: `MBPerMinute = 18.0` against a per-officer `StorageQuotaMB = 4096`.

```lua
OverwriteWhenFull = true,
```

With overwrite on (default), an officer passing their quota has their **oldest uploaded recordings deleted automatically** — a ring buffer, so a camera can always keep recording. Set `false` to let the bar fill and hold instead.

## Thumbnails and Discord export

* With **screenshot-basic** running and a Fivemanage key configured, the officer's client captures a still shortly after recording starts (`ThumbDelay`) — it becomes the unit's snapshot on profiles and footage rows.
* When a recording finishes uploading, its record posts to the bodycam **Discord webhook** as a rich embed: officer, unit serial, duration, footage size, location, linked case, and the Fivemanage-hosted still.

{% code title="config/bodycam.lua" %}

```lua
Config.DiscordWebhooks = Config.DiscordWebhooks or {}
Config.DiscordWebhooks.bodycam = 'https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE'
```

{% endcode %}

Leave the webhook blank to disable the export.

{% hint style="info" %}
**What the export contains:** FiveM cannot capture real gameplay video to a file — no resource can. The Discord export is the complete **footage record** (all metadata + the captured still), not an `.mp4`.
{% endhint %}
