> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/zwc456baby/ScrcpyForAndroid/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Configure video quality, resolution, and control options for optimal performance

## Overview

Scrcpy for Android provides several configuration options to customize your screen mirroring experience. All settings are automatically saved and restored between sessions.

## Video Resolution

Select the streaming resolution based on your network bandwidth and device capabilities.

### Available Resolutions

The following resolution options are available from the Resolution dropdown:

<ParamField path="1920x1080" type="resolution">
  Full HD - Best quality, requires strong network connection
</ParamField>

<ParamField path="1600x720" type="resolution">
  HD+ - Good balance between quality and performance
</ParamField>

<ParamField path="1280x720" type="resolution">
  HD - Standard high definition
</ParamField>

<ParamField path="1200x540" type="resolution">
  qHD - Lower bandwidth usage
</ParamField>

<ParamField path="960x720" type="resolution">
  4:3 aspect ratio option
</ParamField>

<ParamField path="800x448" type="resolution">
  Compact - Good for slower connections
</ParamField>

<ParamField path="640x360" type="resolution">
  Minimum - Lowest bandwidth usage
</ParamField>

<Note>
  The app automatically adjusts the resolution for landscape vs. portrait orientation. The larger dimension is applied to the longer side of the screen.
</Note>

## Bitrate Settings

Bitrate controls the video quality and compression level. Higher bitrates provide better quality but require more bandwidth.

### Available Bitrates

<CodeGroup>
  ```text 6 Mbps (6144000 bps) theme={null}
  Highest quality - Requires excellent network
  Recommended for: Local network, 5GHz Wi-Fi
  ```

  ```text 4 Mbps (4096000 bps) theme={null}
  High quality - Good for most local networks
  Recommended for: Local network, good Wi-Fi
  ```

  ```text 2 Mbps (2048000 bps) theme={null}
  Medium quality - Balanced option
  Recommended for: Stable Wi-Fi or good LTE
  ```

  ```text 1 Mbps (1024000 bps) theme={null}
  Lower quality - Best for remote connections
  Recommended for: Public networks, slower connections
  ```
</CodeGroup>

<Tip>
  For remote connections over the internet, start with 1 or 2 Mbps and increase if the connection is stable.
</Tip>

## Delay Control

Delay control manages the buffering and synchronization between video frames. Lower delay provides more responsive interaction but may cause stuttering on slower connections.

### Delay Options

<Tabs>
  <Tab title="High (100ms)">
    * Most stable option
    * Best for slower or unstable connections
    * Provides smooth playback with slight lag
    * Automatically drops frames when delay exceeds threshold
  </Tab>

  <Tab title="Medium (60ms)">
    * Balanced option (recommended)
    * Good for most local network connections
    * Reasonable responsiveness with stability
  </Tab>

  <Tab title="Low (30ms)">
    * Lowest latency option
    * Best for fast local networks
    * Most responsive controls
    * May experience stuttering on slower connections
  </Tab>
</Tabs>

<Info>
  The delay value determines the maximum acceptable time difference between the current time and the frame timestamp. Frames that exceed this delay are dropped to maintain real-time performance.
</Info>

## Viewing Mode (No Control)

Enable this option to disable all touch input on the remote device.

**When enabled:**

* Touch events are not sent to the remote device
* You can only view the screen, not interact with it
* Navigation buttons are automatically disabled
* Useful for presentations or monitoring

<CodeGroup>
  ```java Implementation Reference theme={null}
  // From MainActivity.java:412
  if (!PreUtils.get(context, Constant.CONTROL_NO, false)) {
      surfaceView.setOnTouchListener((view, event) => 
          scrcpy.touchevent(event, landscape, 
                           surfaceView.getWidth(), 
                           surfaceView.getHeight()));
  }
  ```
</CodeGroup>

## Navigation Button Settings

Control whether to display on-screen navigation buttons (Back, Home, App Switch).

### Bottom Control Button Option

<AccordionGroup>
  <Accordion title="When Enabled">
    * Displays a navigation bar at the bottom (portrait) or side (landscape)
    * Provides Back, Home, and App Switcher buttons
    * Navigation bar takes up 96 pixels (adjusted for multiples of 8)
    * Useful if target device has gesture navigation
  </Accordion>

  <Accordion title="When Disabled">
    * Full screen view without on-screen buttons
    * You can use swipe-up gesture to access local device navbar
    * Touch area uses entire screen
  </Accordion>
</AccordionGroup>

<Warning>
  Navigation buttons are automatically disabled when "Viewing mode (no control)" is enabled.
</Warning>

### Button Mappings

* **Back Button** (`<`): Sends `KEYCODE_BACK`
* **Home Button** (`o`): Sends `KEYCODE_HOME`
* **App Switch** (`=`): Sends `KEYCODE_APP_SWITCH`

## Settings Persistence

All configuration settings are automatically saved using SharedPreferences:

| Setting            | Preference Key        |
| ------------------ | --------------------- |
| Resolution         | `spinner_resolution`  |
| Bitrate            | `spinner_bitrate`     |
| Delay Control      | `delay_control`       |
| Viewing Mode       | `no_control`          |
| Navigation Buttons | `control_nav`         |
| Remote Address     | `control_remote_addr` |

<Note>
  Settings are preserved even after closing the app and will be restored on the next launch.
</Note>

## Recommended Configurations

<CardGroup cols={2}>
  <Card title="Local Network" icon="wifi">
    * Resolution: 1920x1080 or 1280x720
    * Bitrate: 6 Mbps or 4 Mbps
    * Delay: Medium (60ms) or Low (30ms)
  </Card>

  <Card title="Remote Network" icon="globe">
    * Resolution: 1200x540 or 800x448
    * Bitrate: 2 Mbps or 1 Mbps
    * Delay: High (100ms)
  </Card>

  <Card title="Presentation Mode" icon="presentation">
    * Resolution: 1920x1080
    * Bitrate: 6 Mbps
    * Viewing mode: Enabled
    * Navigation buttons: Disabled
  </Card>

  <Card title="Low Bandwidth" icon="signal">
    * Resolution: 640x360
    * Bitrate: 1 Mbps
    * Delay: High (100ms)
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Control Features" icon="hand-pointer" href="/guides/control-features">
    Learn about touch controls and interaction
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/guides/troubleshooting">
    Optimize performance and solve issues
  </Card>
</CardGroup>
