A self-hosted screen streaming web application for Android and Linux devices, based on WebRTC.
Webscreen can run on Android Termux, Linux, Windows, and MacOS (both amd64 and arm64). It might support more devices in the future!
📱 Android (via scrcpy)
- Video, Audio, Control
- UHID Devices (Mouse, Keyboard, Gamepad)
- Clipboard Sync
- Touch (Multi-finger, pressure)
- H.264 / H.265 Hardware Encoding
- Multi-Connection
- Video, Control
- Touch
- H.264 / H.265
- GPU support (Xorg/Sway)
- HDMI-in video streaming
- H.264 / H.265 with RKMPP hardware encoding
- Note: Audio is not supported yet.
Note: For Android apk (rooted) and FnOS fpk, you might see youyoudezhuzhu/webscreen.
You need a modern web browser that supports WebRTC (H.264 High Profile, or H.265 Main Profile).
For Android devices, please refer to the scrcpy prerequisites.
For Windows, Linux, MacOS, and Termux, you need adb (or android-tools in some distributions, which provides adb) in your PATH at least to stream Android devices. If the program didn't found adb, it will try to download it. Optionally, if you want to use Linux headless virtual desktop, make sure ffmpeg xvfb, xfce4, sway, and wf-recorder are in your PATH:
sudo apt install adb
# If you want to stream the Linux display:
sudo apt install xvfb ffmpeg xfce4 sway wf-recorder seatdNote: If you want to use Xorg, you might need to run this program as root.
Note: If you want to use Sway,
wf-recorderis used.
Note: All of them need
uinputandseatdand correct permissions if you want to have keyboard and mouse passthrough.
- A vendor kernel with HDMI RX support (
rk3588-hdmirxenabled). - An FFmpeg build with RKMPP support (e.g.,
/usr/lib/jellyfin-ffmpeg/ffmpeg). - Correct read/write permissions for MPP service:
sudo chmod 666 /dev/mpp_service. - System package
v4l-utils.
Download the latest binary from the Releases page. The default port is 8079. A 6-digit PIN is also required (defaults to no password if omitted).
./webscreen -host 0.0.0.0 -port 8080 -pin 555555Then open your browser and visit: http://<your-ip>:8080
Normally, you can build simply by running make.
Termux Note: If building natively on Termux, you must run
go build -ldflags "-checklinkname=0".
git clone https://github.com/huonwe/webscreen.git
cd webscreen
makeservices:
webscreen:
image: dukihiroi/webscreen:latest
container_name: webscreen
network_mode: host
restart: unless-stopped
volumes:
- /dev/bus/usb:/dev/bus/usb
privileged: true
environment:
- GIN_MODE=release
- PORT=8081
- PIN=123456
For the desktop embedded version,copy the sample env file first: cp .env.sample .env
services:
webscreen-full:
user: appuser
image: dukihiroi/webscreen-full:latest
container_name: webscreen-full
network_mode: host
restart: unless-stopped
volumes:
- /dev/bus/usb:/dev/bus/usb
- /dev/input:/dev/input
- /run/udev:/run/udev:ro
devices:
- /dev/uinput:/dev/uinput
- /dev/dri:/dev/dri
group_add:
- ${UINPUT_GID}
privileged: true
environment:
- GIN_MODE=release
- PORT=8081
- PIN=123456
💡 Tip:
hostnetwork mode is highly recommended due to WebRTC UDP traffic and USB device connection stability.
You might need to pair your Android device via Wireless Debugging first. "Pair device with pairing code" is supported. Once paired, click the Connect button in the web UI. Note: After starting the stream, if the screen is black, simply trigger a UI change (e.g., press the physical volume button) to force a frame update.
Q: Crash: MediaCodec 0x80001001 Exception on custom Android devices?
- This is usually due to the H.264 High Profile (
profile=8). - Fix: Set
profile=1invideo_codec_options.
-
Huge thanks to @Enterpr1se0 and @rogniceguy-max for fixing code bugs!
-
Huge thanks to youyoudezhuzhu/webscreen for fixing bugs and adding new features!
This project is licensed under the GNU Affero General Public License v3.0.
Webscreen, streaming your device in Web browser.
Copyright (C) 2026 Hiroi
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
