# How to Select Video Quality for Downloads in YTLite: A Complete Guide

> Learn how to select video quality for downloads in YTLite. Configure streaming and download settings easily within the Player settings for a seamless experience.

- Repository: [Dan/YTLite](https://github.com/dayanch96/YTLite)
- Tags: how-to-guide
- Published: 2026-04-22

---

**YTLite uses unified "Playback quality" settings for both streaming and downloads—configure Wi-Fi and cellular quality in the tweak's Player settings, and downloads automatically match your selection.**

YTLite is a YouTube enhancement tweak that adds powerful playback controls to the iOS YouTube app. One of its most-requested features is the ability to **select video quality for downloads**—ensuring saved videos match your preferred resolution rather than defaulting to automatic quality. This guide explains exactly how YTLite's quality selection works and how to configure it for both streaming and downloads.

## How YTLite's Video Quality Selection Works

YTLite extends the standard YouTube settings with a dedicated **Player** submenu. The quality you select here applies universally—to both streaming playback and the Download Manager's output files.

The implementation follows this flow:

1. **User preference storage** – Selected quality indices saved to `wiFiQualityIndex` and `cellQualityIndex` in `YTLUserDefaults.m`
2. **Network-aware retrieval** – The `‑autoQuality` helper in `YTLite.x` checks current connection type
3. **Format constraint application** – `MLQuickMenuVideoQualitySettingFormatConstraint` enforces the selected quality on both player and download pipeline

## Available Quality Options

YTLite provides these resolution choices in the quality picker (`YTSettingsPickerViewController`):

```objc
@[
  LOC(@"Default"),      // System automatic selection
  LOC(@"Best"),         // Highest available quality
  @"2160p60",           // 4K 60fps
  @"2160p",             // 4K 30fps
  @"1440p60",           // 2K 60fps
  @"1440p",             // 2K 30fps
  @"1080p60",           // Full HD 60fps
  @"1080p",             // Full HD 30fps
  @"720p60",            // HD 60fps
  @"720p",              // HD 30fps
  @"480p",              // Standard definition
  @"360p"               // Low bandwidth
]

```

## Configuring Playback Quality for Downloads

### Step 1: Access YTLite Settings

Open YouTube → Settings → **YTLite** (purple-tinted section) → **Player**

### Step 2: Set Wi-Fi Quality

Tap **"Playback quality on Wi-Fi"** to open `YTSettingsPickerViewController`. Select your preferred resolution. This quality applies to:

- Video streaming on Wi-Fi networks
- **Downloads initiated while connected to Wi-Fi**

### Step 3: Set Cellular Quality

Tap **"Playback quality on Cellular"** and select a resolution. This applies to:

- Video streaming on mobile data
- **Downloads initiated on cellular networks**

### Step 4: Enable Force Best Quality (Optional)

The `ForceBestQuality` toggle (found in Player settings) disables Shorts-specific quality choosers and forces maximum available quality. This also affects downloads through the same `MLQuickMenuVideoQualitySettingFormatConstraint` mechanism.

## How YTLite Enforces Download Quality

The quality selection is applied through code in `YTLite.x`:

```objc
NetworkStatus status = [[Reachability reachabilityForInternetConnection] currentReachabilityStatus];
NSInteger kQualityIndex = status == ReachableViaWiFi ? ytlInt(@"wiFiQualityIndex")
                                                 : ytlInt(@"cellQualityIndex");

NSArray *qualityLabels = @[@"Default", bestQualityLabel,
                         @"2160p60", @"2160p", @"1440p60", @"1440p",
                         @"1080p60", @"1080p", @"720p60", @"720p",
                         @"480p", @"360p"];
NSString *qualityLabel = qualityLabels[kQualityIndex];

// Find closest match if exact label unavailable
// ...

MLQuickMenuVideoQualitySettingFormatConstraint *fc = [[%c(MLQuickMenuVideoQualitySettingFormatConstraint) alloc] init];
if ([fc respondsToSelector:@selector(initWithVideoQualitySetting:formatSelectionReason:qualityLabel:)]) {
    [self.activeVideo setVideoFormatConstraint:
        [fc initWithVideoQualitySetting:3 formatSelectionReason:2 qualityLabel:qualityLabel]];
}

```

The `activeVideo` object's format constraint is read by both the player and the download manager, ensuring downloaded files match your selected quality.

## Key Source Files

| File | Purpose |
|------|---------|
| `Settings.x` | UI definition for quality picker rows; stores `wiFiQualityIndex`/`cellQualityIndex` |
| `YTLite.x` | `‑autoQuality` implementation; applies `MLQuickMenuVideoQualitySettingFormatConstraint` |
| `Utils/YTLUserDefaults.m` | Default values for quality indices (both default to `0` = "Default") |
| `layout/…/Localizable.strings` | Translated UI strings ("Playback quality on WiFi", "Force quality") |

## Summary

- YTLite's **playback quality settings control both streaming and downloads**—there are no separate download quality options
- Configure **"Playback quality on Wi-Fi"** and **"Playback quality on Cellular"** in YTLite → Player settings
- The `ForceBestQuality` toggle overrides all quality selection for maximum resolution
- Quality selection is enforced through `MLQuickMenuVideoQualitySettingFormatConstraint` in `YTLite.x`, which both player and download manager respect
- Default quality indices are stored in `YTLUserDefaults.m` and read dynamically based on network status

## Frequently Asked Questions

### What happens if my selected quality isn't available for a video?

YTLite automatically finds the closest available quality. The `‑autoQuality` method in `YTLite.x` compares the numeric portion of your selected label (e.g., "1080" from "1080p60") against available formats and selects the nearest match.

### Do I need to set quality separately for downloads and streaming?

No. YTLite uses a **unified quality system**. The same `wiFiQualityIndex` and `cellQualityIndex` values control both playback and downloads. When you initiate a download, the download manager reads the same `activeVideo` format constraint that the player uses.

### Why does YTLite have separate Wi-Fi and cellular quality settings?

This follows YouTube's native pattern while adding download support. The `Reachability` framework detects your connection type in `YTLite.x`, and the tweak automatically applies the appropriate stored index (`wiFiQualityIndex` or `cellQualityIndex`). This prevents accidental 4K downloads over cellular data.

### Where are my quality preferences stored?

Quality indices are persisted through `NSUserDefaults` via the `YTLUserDefaults.m` utility class. The keys are `wiFiQualityIndex` and `cellQualityIndex`, both defaulting to `0` (the "Default" option that lets YouTube choose automatically).