# scrcpy | Genymobile | Knowledge Base | Instagit

Display and control your Android device

GitHub Stars: 136k

Repository: https://github.com/Genymobile/scrcpy

---

## Articles

### [How Scrcpy Server Communicates with the Client: UNIX Socket Architecture Explained](/Genymobile/scrcpy/how-does-the-server-component-communicate-with-the-client)

Discover how the Scrcpy server uses UNIX sockets to communicate with the client. Learn how traffic is split for video, audio, and control over dedicated channels.

- Tags: internals
- Published: 2026-02-25

### [How Scrcpy Handles Screen Orientation and Rotation: A Deep Dive into the Source Code](/Genymobile/scrcpy/how-does-scrcpy-handle-screen-orientation-and-rotation)

Explore how scrcpy handles screen orientation and rotation across device, server, and client layers. Understand the Android WindowManager, video pipeline, and rendering for seamless control.

- Tags: deep-dive
- Published: 2026-02-25

### [What Is the Scrcpy Packet Merger and How It Handles Video Streams](/Genymobile/scrcpy/what-is-the-packet-merger-and-how-does-it-handle-videoaudio-streams)

Discover the Scrcpy packet merger and how it prepends crucial video stream configuration packets to media frames for flawless FFmpeg decoding. Learn how it ensures correct video playback.

- Tags: internals
- Published: 2026-02-25

### [How scrcpy Handles Audio-Only Recording Modes: A Deep Dive into the Server Architecture](/Genymobile/scrcpy/how-does-scrcpy-handle-audio-only-recording-modes)

Explore how scrcpy's server architecture enables audio-only recording. Learn how scrcpy creates independent audio streams when video is disabled with --no-video for efficient recording.

- Tags: deep-dive
- Published: 2026-02-25

### [Security Implications of ADB Debugging for scrcpy: A Complete Technical Analysis](/Genymobile/scrcpy/what-are-the-security-implications-of-adb-debugging-for-scrcpy)

Explore the security implications of ADB debugging for scrcpy. Understand how a compromised host can access your Android device and protect your data.

- Tags: deep-dive
- Published: 2026-02-25

### [How scrcpy Implements the Device Message Protocol: Binary Deserialization and Control Socket Architecture](/Genymobile/scrcpy/how-does-scrcpy-implement-the-device-message-protocol)

Discover how scrcpy implements its device message protocol using a custom binary format and control socket architecture. Learn about deserialization and asynchronous handling.

- Tags: internals
- Published: 2026-02-25

### [Scrcpy Encoder and Decoder Options: Complete Configuration Guide](/Genymobile/scrcpy/what-encoder-and-decoder-options-does-scrcpy-expose)

Master scrcpy encoder and decoder options. Configure codec selection, implementations, and parameters with this complete guide. Optimize your screen mirroring performance.

- Tags: how-to-guide
- Published: 2026-02-25

### [How scrcpy Manages Window Rendering and OpenGL Display: SDL2 Architecture and Pipeline Deep Dive](/Genymobile/scrcpy/how-does-scrcpy-manage-window-rendering-and-opengl-display)

Discover how scrcpy uses SDL2 and OpenGL for efficient window rendering and display. Learn about its layered architecture and pipeline for enhanced visual quality and performance.

- Tags: internals
- Published: 2026-02-25

### [How scrcpy Handles Multi-Display Configurations: A Deep Dive into Android Screen Mirroring](/Genymobile/scrcpy/how-does-scrcpy-handle-multi-display-configurations)

Discover how scrcpy masterfully handles Android multi display configurations. Learn about mirroring logical displays with --display_id and creating virtual displays via --new-display.

- Tags: deep-dive
- Published: 2026-02-25

### [How Clipboard Synchronization Works in Scrcpy: Android-to-Host Deep Dive](/Genymobile/scrcpy/how-does-clipboard-synchronization-work-between-device-and-computer)

Discover how scrcpy clipboard synchronization works from Android to host. Learn about device listeners and control messages for seamless copy-pasting between your devices.

- Tags: deep-dive
- Published: 2026-02-25

### [How scrcpy Maps Gamepad Input to Android: UHID vs AOA Architecture Explained](/Genymobile/scrcpy/how-does-scrcpy-handle-gamepad-input-mapping-to-android)

Learn how scrcpy maps gamepad input to Android using UHID or AOA. Understand the architecture translating PC controller events to an Android physical gamepad.

- Tags: architecture
- Published: 2026-02-25

### [How scrcpy Manages Frame Rate and Bitrate for Optimal Screen Mirroring Performance](/Genymobile/scrcpy/how-does-scrcpy-manage-frame-rate-and-bitrate-for-optimal-performance)

Discover how scrcpy optimizes screen mirroring performance by managing frame rate and bitrate using MediaCodec. Learn about --max-fps and --bit-rate flags for low-latency streaming.

- Tags: performance
- Published: 2026-02-25

### [scrcpy Camera Sources and Configurations: Complete Command Reference](/Genymobile/scrcpy/what-camera-sources-and-configurations-does-scrcpy-support)

Explore scrcpy camera sources and configurations. Stream front, back, or external cameras with custom resolution, frame rate, aspect ratio, rotation, and cropping. Full command reference.

- Tags: api-reference
- Published: 2026-02-25

### [How scrcpy Handles Virtual Displays on Android: Server Architecture Explained](/Genymobile/scrcpy/how-does-scrcpy-handle-virtual-displays-on-android)

Discover how scrcpy creates virtual displays on Android using reflection and Surface objects. Understand its server architecture for capturing frames and mapping input events.

- Tags: internals
- Published: 2026-02-25

### [How scrcpy Implements the V4L2 Sink for Linux Webcam Mirroring](/Genymobile/scrcpy/how-does-scrcpy-implement-v4l2-sink-for-linux-webcam-mirroring)

Learn how scrcpy implements the V4L2 sink for Linux webcam mirroring by streaming Android screen frames to a loopback device using FFmpeg. Use your Android device as a virtual webcam.

- Tags: internals
- Published: 2026-02-25

### [What Is OTG Mode in scrcpy and How Does It Work Without USB Debugging?](/Genymobile/scrcpy/what-is-otg-mode-and-how-does-it-work-without-usb-debugging)

Discover OTG mode in scrcpy and control your Android device with keyboard and mouse using the Android Open Accessory protocol, bypassing USB debugging and ADB.

- Tags: deep-dive
- Published: 2026-02-25

### [How HID Keyboard and Mouse Simulation Works in scrcpy: UHID vs AOA Explained](/Genymobile/scrcpy/how-does-hid-keyboardmouse-simulation-work-in-scrcpy)

Discover how scrcpy simulates HID keyboard and mouse input using UHID and AOA. Learn the technical details of device simulation for seamless control.

- Tags: internals
- Published: 2026-02-25

### [USB vs TCP/IP Connection Modes in scrcpy: Implementation and Usage Guide](/Genymobile/scrcpy/what-is-the-difference-between-usb-and-tcpip-connection-modes-in-scrcpy)

Understand scrcpy USB vs TCP/IP connection modes. Discover USB's low latency and TCP/IP's wireless convenience. Learn implementation and usage for effective device mirroring.

- Tags: how-to-guide
- Published: 2026-02-25

### [How scrcpy Injects Keyboard and Mouse Events into Android: A Deep Dive into the Control Pipeline](/Genymobile/scrcpy/how-does-scrcpy-inject-keyboard-and-mouse-events-into-android)

Discover how scrcpy injects keyboard and mouse events into Android by detailing the control pipeline, client-server communication, and Java reflection techniques. Learn the inner workings of scrcpy's input injection.

- Tags: deep-dive
- Published: 2026-02-25

### [scrcpy Recording Formats: Complete Guide to MP4, MKV, and Audio-Only Options](/Genymobile/scrcpy/what-recording-formats-does-scrcpy-support-and-when-should-each-be-used)

Master scrcpy recording formats like MP4 and MKV. Discover the best video and audio-only options to capture your Android device screen effectively. Choose wisely.

- Tags: deep-dive
- Published: 2026-02-25

### [How scrcpy Handles Audio Latency and Synchronization: A Deep Dive into the Source Code](/Genymobile/scrcpy/how-does-scrcpy-handle-audio-latency-and-synchronization)

Discover how scrcpy minimizes audio latency and ensures sync via hardware timestamps, real-time regulation, FFmpeg compensation, and adjustable buffering. Dive into the source code.

- Tags: deep-dive
- Published: 2026-02-25

### [scrcpy Video Codecs: H.264 vs H.265 vs AV1 Differences Explained](/Genymobile/scrcpy/what-are-the-differences-between-h264-h265-and-av1-video-codecs-for-scrcpy)

Explore scrcpy video codec differences: H.264 vs H.265 vs AV1. Understand latency, compression efficiency, and hardware support to optimize your screen mirroring experience.

- Tags: deep-dive
- Published: 2026-02-25

### [How scrcpy's Client-Server Architecture Works Internally: A Deep Dive into the Source Code](/Genymobile/scrcpy/how-does-scrcpys-client-server-architecture-work-internally)

Explore scrcpy's client-server architecture. Learn how it pushes a Java server, uses ADB tunnel sockets for video, audio, and control, and streams media for a seamless Android mirroring experience.

- Tags: deep-dive
- Published: 2026-02-25

