Web client for Genymobile/scrcpy and more.
Browser must support the following technologies:
Server:
adb executable must be available in the PATH environment variableDevice:
Make sure you have installed node.js, node-gyp and build tools
git clone https://github.com/NetrisTV/ws-scrcpy.git
cd ws-scrcpy
## For stable version find latest tag and switch to it:
# git tag -l
# git checkout vX.Y.Z
npm install
npm start
The modified version of Genymobile/scrcpy used to stream H264-video, which then decoded by one of included decoders:
Based on xevokk/h264-converter.
HTML5 Video.
Requires Media Source API and video/mp4; codecs="avc1.42E01E"
support. Creates mp4 containers from NALU, received from a
device, then feeds them to MediaSource. In theory, it can use
hardware acceleration.
Based on mbebenita/Broadway and
131/h264-live-player.
Software video-decoder compiled into wasm-module.
Requires WebAssembly and preferably WebGL support.
Based on udevbe/tinyh264.
Software video-decoder compiled into wasm-module. A slightly updated version of
mbebenita/Broadway.
Requires WebAssembly, WebWorkers, WebGL support.
Decoding is done by browser built-in (software/hardware) media decoder. Requires WebCodecs support. At the moment, available only in Chromium and derivatives.
Drag & drop an APK file to push it to the /data/local/tmp directory. You can
install it manually from the included xtermjs/xterm.js terminal
emulator (see below).
Control your device from adb shell in your browser.
Experimental Feature: is not built by default (see custom build)
Requires ws-qvh available in PATH.
Tips for a stable QuickTime-over-USB stream: set the device's Auto-Lock to
Never (a locked screen stops the stream), connect the iPhone directly
(no USB hub), and do not run a standalone ws-qvh/qvh capture against the
same device while ws-scrcpy is streaming — only one process may hold a device.
⚠️ Temporarily suspended. After the migration to a standalone Appium (see Remote control) the WDA-MJPEG video path is not wired up and is planned to be restored in a follow-up. iOS screen casting currently runs via
ws-qvh(see above).
Enable USE_WDA_MJPEG_SERVER in the build configuration file
(see custom build).
Alternative way to stream screen content. It does not
require additional software as ws-qvh, but may require more resources as each
frame encoded as jpeg image.
Device control is provided by appium/WebDriverAgent, driven
through a modern Appium server over the W3C WebDriver protocol.
ws-scrcpy bundles Appium (it is a dependency, and a postinstall step pins the
XCUITest driver into a project-local .appium-home), spawns it as a child
process on startup, and forwards control commands to it over HTTP — no global
Appium installation is required.
Supported actions:
WebDriverAgent has to be built, signed and trusted on the device once:
WebDriverAgent.xcodeproj under
.appium-home/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/
(or under $APPIUM_HOME/… if you point Appium elsewhere). Select the
WebDriverAgentRunner scheme, set your Team and a unique Bundle
Identifier, and run it on the device once (⌘U).Settings → General → VPN & Device Management) and enable Developer
Mode (Settings → Privacy & Security → Developer Mode, iOS 16+).AssistiveTouch: Settings → General → Accessibility.See Appium's real-device configuration guide for the full WebDriverAgent setup. After this one-time step ws-scrcpy builds and launches WDA on its own.
Be patient on the first control action. Appium builds and launches WebDriverAgent on demand, which can take a couple of minutes the first time — the screen may look unresponsive until WDA is up. A free Apple developer account's provisioning expires every 7 days (re-sign weekly); a paid account avoids this.
| Variable | Purpose |
|---|---|
WDA_TEAM_ID | Apple Team ID used to sign WebDriverAgent (the certificate's OU) |
WDA_SIGNING_ID | Signing identity (default Apple Development) |
WDA_BUNDLE_ID | Unique WDA bundle id, e.g. com.<you>.WebDriverAgentRunner |
WDA_PLATFORM_VERSION | iOS version of the device (silences a driver warning) |
WDA_USE_PREBUILT | true to reuse an already built/installed WDA (skip the rebuild) |
WS_SCRCPY_DEBUG | Verbose logs — surfaces the Appium (incl. xcodebuild) and ws-qvh output in the server console |
APPIUM_BIN / APPIUM_HOME / APPIUM_PORT / APPIUM_LOG_LEVEL | Override the bundled Appium binary, driver home, port or log level |
xcodebuild failed with code 65almost always means WebDriverAgent could not be signed or launched on the device (untrusted certificate, Developer Mode off, wrong Team ID, or expired provisioning) — it is not a build error in ws-scrcpy. Run withWS_SCRCPY_DEBUG=1to surface the underlying xcodebuild error and follow the real-device configuration guide.
You can customize project before build by overriding the default configuration in build.config.override.json:
INCLUDE_APPL - include code for iOS device tracking and controlINCLUDE_GOOG - include code for Android device tracking and controlINCLUDE_ADB_SHELL - remote shell for android devices
(xtermjs/xterm.js, Tyriar/node-pty)INCLUDE_DEV_TOOLS - dev tools for web pages and
web views on android devicesINCLUDE_FILE_LISTING - minimalistic file managementUSE_BROADWAY - include Broadway PlayerUSE_H264_CONVERTER - include Mse PlayerUSE_TINY_H264 - include TinyH264 PlayerUSE_WEBCODECS - include WebCodecs PlayerUSE_WDA_MJPEG_SERVER - configure WebDriverAgent to start MJPEG server
(temporarily suspended, see MJPEG Server)USE_QVH_SERVER - include support for ws-qvhSCRCPY_LISTENS_ON_ALL_INTERFACES - WebSocket server in scrcpy-server.jar
will listen for connections on all available interfaces. When true, it allows
connecting to device directly from a browser. Otherwise, the connection must be
established over adb.You can specify a path to a configuration file in WS_SCRCPY_CONFIG
environment variable.
If you want to have another pathname than "/" you can specify it in the
WS_SCRCPY_PATHNAME environment variable.
Configuration file format: Configuration.d.ts.
Configuration file example: config.example.yaml.
proxy over adb from the interfaces list.xcodebuild failed with code 65 is a WebDriverAgent signing /
launch issue, not a build error — see Remote control.Be advised and keep in mind:
Currently, support of WebSocket protocol added to v1.19 of scrcpy
1,970 followers · starred Aug 2024
1,515 followers · starred Jan 2024
2,811 followers · starred Aug 2021
1,009 followers · starred Jan 2025
Web client for Genymobile/scrcpy and more.
Browser must support the following technologies:
Server:
adb executable must be available in the PATH environment variableDevice:
Make sure you have installed node.js, node-gyp and build tools
git clone https://github.com/NetrisTV/ws-scrcpy.git
cd ws-scrcpy
## For stable version find latest tag and switch to it:
# git tag -l
# git checkout vX.Y.Z
npm install
npm start
The modified version of Genymobile/scrcpy used to stream H264-video, which then decoded by one of included decoders:
Based on xevokk/h264-converter.
HTML5 Video.
Requires Media Source API and video/mp4; codecs="avc1.42E01E"
support. Creates mp4 containers from NALU, received from a
device, then feeds them to MediaSource. In theory, it can use
hardware acceleration.
Based on mbebenita/Broadway and
131/h264-live-player.
Software video-decoder compiled into wasm-module.
Requires WebAssembly and preferably WebGL support.
Based on udevbe/tinyh264.
Software video-decoder compiled into wasm-module. A slightly updated version of
mbebenita/Broadway.
Requires WebAssembly, WebWorkers, WebGL support.
Decoding is done by browser built-in (software/hardware) media decoder. Requires WebCodecs support. At the moment, available only in Chromium and derivatives.
Drag & drop an APK file to push it to the /data/local/tmp directory. You can
install it manually from the included xtermjs/xterm.js terminal
emulator (see below).
Control your device from adb shell in your browser.
Experimental Feature: is not built by default (see custom build)
Requires ws-qvh available in PATH.
Tips for a stable QuickTime-over-USB stream: set the device's Auto-Lock to
Never (a locked screen stops the stream), connect the iPhone directly
(no USB hub), and do not run a standalone ws-qvh/qvh capture against the
same device while ws-scrcpy is streaming — only one process may hold a device.
⚠️ Temporarily suspended. After the migration to a standalone Appium (see Remote control) the WDA-MJPEG video path is not wired up and is planned to be restored in a follow-up. iOS screen casting currently runs via
ws-qvh(see above).
Enable USE_WDA_MJPEG_SERVER in the build configuration file
(see custom build).
Alternative way to stream screen content. It does not
require additional software as ws-qvh, but may require more resources as each
frame encoded as jpeg image.
Device control is provided by appium/WebDriverAgent, driven
through a modern Appium server over the W3C WebDriver protocol.
ws-scrcpy bundles Appium (it is a dependency, and a postinstall step pins the
XCUITest driver into a project-local .appium-home), spawns it as a child
process on startup, and forwards control commands to it over HTTP — no global
Appium installation is required.
Supported actions:
WebDriverAgent has to be built, signed and trusted on the device once:
WebDriverAgent.xcodeproj under
.appium-home/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/
(or under $APPIUM_HOME/… if you point Appium elsewhere). Select the
WebDriverAgentRunner scheme, set your Team and a unique Bundle
Identifier, and run it on the device once (⌘U).Settings → General → VPN & Device Management) and enable Developer
Mode (Settings → Privacy & Security → Developer Mode, iOS 16+).AssistiveTouch: Settings → General → Accessibility.See Appium's real-device configuration guide for the full WebDriverAgent setup. After this one-time step ws-scrcpy builds and launches WDA on its own.
Be patient on the first control action. Appium builds and launches WebDriverAgent on demand, which can take a couple of minutes the first time — the screen may look unresponsive until WDA is up. A free Apple developer account's provisioning expires every 7 days (re-sign weekly); a paid account avoids this.
| Variable | Purpose |
|---|---|
WDA_TEAM_ID | Apple Team ID used to sign WebDriverAgent (the certificate's OU) |
WDA_SIGNING_ID | Signing identity (default Apple Development) |
WDA_BUNDLE_ID | Unique WDA bundle id, e.g. com.<you>.WebDriverAgentRunner |
WDA_PLATFORM_VERSION | iOS version of the device (silences a driver warning) |
WDA_USE_PREBUILT | true to reuse an already built/installed WDA (skip the rebuild) |
WS_SCRCPY_DEBUG | Verbose logs — surfaces the Appium (incl. xcodebuild) and ws-qvh output in the server console |
APPIUM_BIN / APPIUM_HOME / APPIUM_PORT / APPIUM_LOG_LEVEL | Override the bundled Appium binary, driver home, port or log level |
xcodebuild failed with code 65almost always means WebDriverAgent could not be signed or launched on the device (untrusted certificate, Developer Mode off, wrong Team ID, or expired provisioning) — it is not a build error in ws-scrcpy. Run withWS_SCRCPY_DEBUG=1to surface the underlying xcodebuild error and follow the real-device configuration guide.
You can customize project before build by overriding the default configuration in build.config.override.json:
INCLUDE_APPL - include code for iOS device tracking and controlINCLUDE_GOOG - include code for Android device tracking and controlINCLUDE_ADB_SHELL - remote shell for android devices
(xtermjs/xterm.js, Tyriar/node-pty)INCLUDE_DEV_TOOLS - dev tools for web pages and
web views on android devicesINCLUDE_FILE_LISTING - minimalistic file managementUSE_BROADWAY - include Broadway PlayerUSE_H264_CONVERTER - include Mse PlayerUSE_TINY_H264 - include TinyH264 PlayerUSE_WEBCODECS - include WebCodecs PlayerUSE_WDA_MJPEG_SERVER - configure WebDriverAgent to start MJPEG server
(temporarily suspended, see MJPEG Server)USE_QVH_SERVER - include support for ws-qvhSCRCPY_LISTENS_ON_ALL_INTERFACES - WebSocket server in scrcpy-server.jar
will listen for connections on all available interfaces. When true, it allows
connecting to device directly from a browser. Otherwise, the connection must be
established over adb.You can specify a path to a configuration file in WS_SCRCPY_CONFIG
environment variable.
If you want to have another pathname than "/" you can specify it in the
WS_SCRCPY_PATHNAME environment variable.
Configuration file format: Configuration.d.ts.
Configuration file example: config.example.yaml.
proxy over adb from the interfaces list.xcodebuild failed with code 65 is a WebDriverAgent signing /
launch issue, not a build error — see Remote control.Be advised and keep in mind:
Currently, support of WebSocket protocol added to v1.19 of scrcpy
1,970 followers · starred Aug 2024
1,515 followers · starred Jan 2024
2,811 followers · starred Aug 2021
1,009 followers · starred Jan 2025