> ## 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.

# CameraResolutionDescriptor

> Specify output video resolution in pixels (width × height) for video recording and streaming.

## What Problem Does This Solve?

Video capture needs to know the output dimensions: 1920×1080, 1280×720, etc. This simple struct defines the width and height in pixels.

`CameraResolutionDescriptor` is used inside `CameraTrackDescriptor` to specify resolution for recording and streaming tracks.

## When to Use This

You'll use this whenever defining:

* Video output resolution in quality presets
* Custom camera configurations
* Resolution-specific settings

It's a basic building block—you'll create these frequently but they're simple.

***

## Quick Example

```csharp theme={null}
// Full HD 1080p
var fullHD = new CameraResolutionDescriptor(1920, 1080);

// HD 720p
var hd = new CameraResolutionDescriptor(1280, 720);

// 4K UHD
var uhd = new CameraResolutionDescriptor(3840, 2160);

// Use in a track descriptor
var track = new CameraTrackDescriptor(fullHD, bitrate: 8 << 20, framerate: 60);
```

***

## Common Resolutions

| Name                | Width | Height | Aspect Ratio | Use Case                                    |
| ------------------- | ----- | ------ | ------------ | ------------------------------------------- |
| **720p (HD)**       | 1280  | 720    | 16:9         | Mobile, streaming, low-end hardware         |
| **1080p (Full HD)** | 1920  | 1080   | 16:9         | Standard quality, most common               |
| **1440p (2K/QHD)**  | 2560  | 1440   | 16:9         | High quality, gaming monitors               |
| **4K (UHD)**        | 3840  | 2160   | 16:9         | Premium quality, requires powerful hardware |
| **Square**          | 1080  | 1080   | 1:1          | Social media (Instagram, TikTok)            |
| **Vertical**        | 1080  | 1920   | 9:16         | Mobile-first, stories, reels                |

***

## Default Value

If you create a `CameraResolutionDescriptor` with no parameters, you get a 512×512 square:

```csharp theme={null}
var defaultRes = new CameraResolutionDescriptor();
// width: 512, height: 512
```

This is rarely useful—always specify your target resolution explicitly.

***

## Common Patterns

### Standard 16:9 resolutions

```csharp theme={null}
var resolutions = new[]
{
    new CameraResolutionDescriptor(1280, 720),   // 720p
    new CameraResolutionDescriptor(1920, 1080),  // 1080p
    new CameraResolutionDescriptor(2560, 1440),  // 1440p
    new CameraResolutionDescriptor(3840, 2160)   // 4K
};
```

### Social media-optimized

```csharp theme={null}
// Instagram/TikTok square
var square = new CameraResolutionDescriptor(1080, 1080);

// Stories/Reels vertical
var vertical = new CameraResolutionDescriptor(1080, 1920);

// YouTube landscape
var youtube = new CameraResolutionDescriptor(1920, 1080);
```

### Performance tiers

```csharp theme={null}
// Low-end devices
var low = new CameraResolutionDescriptor(854, 480);    // 480p

// Mid-range devices
var medium = new CameraResolutionDescriptor(1280, 720); // 720p

// High-end devices
var high = new CameraResolutionDescriptor(1920, 1080);  // 1080p
```

***

## Aspect Ratio Considerations

<Info>
  Always match your source content aspect ratio. Recording 4:3 gameplay to 16:9 video will add black bars.
</Info>

Common aspect ratios:

* **16:9** — Standard widescreen (1920×1080, 1280×720)
* **21:9** — Ultrawide (2560×1080)
* **4:3** — Legacy (1024×768)
* **1:1** — Square (1080×1080)
* **9:16** — Vertical mobile (1080×1920)

Calculate aspect ratio: `width / height`

* 1920 / 1080 = 1.777... ≈ 16:9
* 1080 / 1080 = 1.0 = 1:1

***

## Performance Impact

Higher resolutions = more pixels = more processing power required:

| Resolution | Pixels    | Relative Cost |
| ---------- | --------- | ------------- |
| 720p       | 921,600   | 1× (baseline) |
| 1080p      | 2,073,600 | 2.25×         |
| 1440p      | 3,686,400 | 4×            |
| 4K         | 8,294,400 | 9×            |

<Warning>
  Doubling width and height quadruples the pixel count. 4K has 4× the pixels of 1080p, not 2×.
</Warning>

***

## API Reference

### Constructor

```csharp theme={null}
public CameraResolutionDescriptor(
    uint width = 512,
    uint height = 512
)
```

#### Parameters

* `width` — Horizontal resolution in pixels (default: 512)
* `height` — Vertical resolution in pixels (default: 512)

### Fields

| Field    | Type   | Description                     |
| -------- | ------ | ------------------------------- |
| `Width`  | `uint` | Horizontal resolution in pixels |
| `Height` | `uint` | Vertical resolution in pixels   |

***

## Best Practices

<Check>
  **Match display resolution** — Don't record 4K from a 1080p display
</Check>

<Check>
  **Consider target platform** — Mobile users rarely need >1080p
</Check>

<Check>
  **Test performance** — Higher resolution = higher CPU/GPU load
</Check>

<Warning>
  **Even numbers preferred** — Some encoders require width/height divisible by 2 or 8
</Warning>

***

## Related

* [CameraTrackDescriptor](/api-reference/unity/structs/CameraTrackDescriptor) — Uses resolution with bitrate/framerate
* [QualityOption](/api-reference/unity/structs/QualityOption) — Quality presets using track descriptors
