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

# CameraTrackDescriptor

> Configure video resolution, bitrate, framerate, and audio settings for recording and streaming tracks.

## What Problem Does This Solve?

When capturing video, you need to specify technical parameters: resolution (1920×1080), bitrate (5 Mbps), framerate (30 fps), and audio bitrate (192 kbps). These settings determine video quality, file size, and performance impact.

`CameraTrackDescriptor` bundles these parameters into a single struct that you pass to quality options and camera configurations.

## When to Use CameraTrackDescriptor

You'll use this whenever configuring:

* Quality presets in `QualityOption`
* Recording vs. streaming settings (different bitrates)
* Custom camera configurations
* Device-specific overrides

This is the fundamental building block for all quality configurations in LCK.

***

## Quick Example

```csharp theme={null}
// 1080p60 recording at 10 Mbps
var recordingTrack = new CameraTrackDescriptor(
    new CameraResolutionDescriptor(1920, 1080),
    bitrate: 10 << 20,      // 10 Mbps
    framerate: 60,
    audioBitrate: 256000    // 256 kbps
);

// 1080p30 streaming at 5 Mbps
var streamingTrack = new CameraTrackDescriptor(
    new CameraResolutionDescriptor(1920, 1080),
    bitrate: 5 << 20,       // 5 Mbps
    framerate: 30,
    audioBitrate: 192000    // 192 kbps
);
```

***

## Understanding the Parameters

### Resolution

The output video dimensions in pixels. Common values:

* `1920×1080` — Full HD (1080p)
* `1280×720` — HD (720p)
* `2560×1440` — 2K/QHD
* `3840×2160` — 4K/UHD

### Bitrate

Controls video quality and file size. Higher = better quality, larger files.

| Bitrate              | Use Case                        |
| -------------------- | ------------------------------- |
| `3 << 20` (3 Mbps)   | Low-quality streaming, mobile   |
| `5 << 20` (5 Mbps)   | Standard streaming, 1080p30     |
| `8 << 20` (8 Mbps)   | High-quality recording, 1080p60 |
| `15 << 20` (15 Mbps) | Very high quality, 1440p/4K     |

<Info>
  The `<< 20` syntax shifts bits to get megabits. `5 << 20` = 5,242,880 bits/sec ≈ 5 Mbps.
</Info>

### Framerate

Frames per second. Common values:

* `30` — Standard for most content
* `60` — Smooth motion, gaming, action
* `120` — High-speed capture (requires powerful hardware)

### Audio Bitrate

Audio quality in bits per second:

* `128000` (128 kbps) — Acceptable for voice
* `192000` (192 kbps) — Good quality, default
* `256000` (256 kbps) — High quality music/ambience

***

## Default Values

If you don't specify parameters, you get these defaults:

```csharp theme={null}
var defaultTrack = new CameraTrackDescriptor(
    new CameraResolutionDescriptor(1920, 1080)
    // bitrate: 5 << 20      (5 Mbps)
    // framerate: 30         (30 fps)
    // audioBitrate: 192000  (192 kbps)
);
```

***

## Common Patterns

### High-quality recording

```csharp theme={null}
var recording = new CameraTrackDescriptor(
    new CameraResolutionDescriptor(1920, 1080),
    bitrate: 12 << 20,     // 12 Mbps
    framerate: 60,
    audioBitrate: 256000
);
```

### Bandwidth-constrained streaming

```csharp theme={null}
var streaming = new CameraTrackDescriptor(
    new CameraResolutionDescriptor(1280, 720),
    bitrate: 3 << 20,      // 3 Mbps
    framerate: 30,
    audioBitrate: 128000
);
```

### 4K recording

```csharp theme={null}
var uhd = new CameraTrackDescriptor(
    new CameraResolutionDescriptor(3840, 2160),
    bitrate: 25 << 20,     // 25 Mbps minimum for 4K
    framerate: 30,
    audioBitrate: 256000
);
```

### Mobile-optimized

```csharp theme={null}
var mobile = new CameraTrackDescriptor(
    new CameraResolutionDescriptor(1280, 720),
    bitrate: 2 << 20,      // 2 Mbps
    framerate: 30,
    audioBitrate: 128000
);
```

***

## Bitrate Guidelines by Resolution

| Resolution | 30fps Min | 30fps Recommended | 60fps Recommended |
| ---------- | --------- | ----------------- | ----------------- |
| 720p       | 2 Mbps    | 3-4 Mbps          | 5-6 Mbps          |
| 1080p      | 3 Mbps    | 5-8 Mbps          | 10-12 Mbps        |
| 1440p      | 6 Mbps    | 10-15 Mbps        | 18-25 Mbps        |
| 4K         | 15 Mbps   | 25-35 Mbps        | 40-50 Mbps        |

<Warning>
  Higher settings require more CPU/GPU power. Test on target devices to ensure smooth performance.
</Warning>

***

## API Reference

### Constructor

```csharp theme={null}
public CameraTrackDescriptor(
    CameraResolutionDescriptor resolution,
    uint bitrate = 5242880,      // 5 << 20
    uint framerate = 30,
    uint audioBitrate = 192000
)
```

#### Parameters

* `resolution` — Output resolution (width × height)
* `bitrate` — Video bitrate in bits per second (default: 5 Mbps)
* `framerate` — Frames per second (default: 30)
* `audioBitrate` — Audio bitrate in bits per second (default: 192 kbps)

### Fields

| Field          | Type                         | Description                      |
| -------------- | ---------------------------- | -------------------------------- |
| `Resolution`   | `CameraResolutionDescriptor` | Video output resolution          |
| `Bitrate`      | `uint`                       | Video bitrate in bits per second |
| `Framerate`    | `uint`                       | Video framerate (fps)            |
| `AudioBitrate` | `uint`                       | Audio bitrate in bits per second |

***

## Performance Tips

<Check>
  **Start conservative** — Use 1080p30 at 5 Mbps as a baseline
</Check>

<Check>
  **Profile on device** — Desktop performance ≠ mobile performance
</Check>

<Check>
  **Match display framerate** — Recording at 60fps from a 30fps game wastes bandwidth
</Check>

<Warning>
  **4K requires powerful hardware** — Test extensively before shipping
</Warning>

***

## Related

* [CameraResolutionDescriptor](/api-reference/unity/structs/CameraResolutionDescriptor) — Define output resolution
* [QualityOption](/api-reference/unity/structs/QualityOption) — Use tracks in quality presets
* [QualityOptionOverride](/api-reference/unity/structs/QualityOptionOverride) — Device-specific settings
