Skip to content

A work in progress reimplementation of the scrcpy client in C#.

Notifications You must be signed in to change notification settings

cmdszh/ScrcpyNet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScrcpyNet

A work in progress reimplementation of the scrcpy client in C#.

Features

  • Basic keyboard input support
  • Basic touch and swiping
  • Automatic screen rotation
  • Window resizing
  • No audio support
  • Usually crash free

Screenshot

Screenshot

Manually start the ADB Server

Before starting the program you need to manually start the ADB daemon.
You can do this by running adb devices in your terminal.
Make sure to also authorize the device by clicking "Accept" (or whatever) on your device.

Example
This screenshot was taken before I clicked "Accept" on my phone, make sure to do that!

Setup

You'll need to manually install de ffmpeg binaries and the scrpy-server.jar file.
These files should be in the same folder as the ScrcpyNet.Avalonia.Sample.exe file.

FFMPEG Libraries

You can download the ffmpeg binaries from here.
You need to download the ffmpeg-release-full-shared.7z file.
Extract all files .dll from the bin folder in the application root.

scrcpy-server.jar

You'll need to download the scrcpy-server-v1.17 file from here.
Rename this file to scrcpy-server.jar and place it in the application root.

Example:
I couldn't fit all .dlls in this screenshot (e.g. swscale-5.dll), but you also need those.
So make sure to extract all *.dll files from the bin directory inside ffmpeg-release-full-shared.7z
image

Notes

This code (ab)uses unsafe code inside C#.

The Avalonia frontend is quite crappy, but I believe this is also because of some bugs inside Avalonia (frames don't feel 'smooth' and sometimes it crashes).

If you set the bitrate too high the videodecoder might not be able to keep up and lag. Or you'll get an timeout error which crashes the program.

Credits

About

A work in progress reimplementation of the scrcpy client in C#.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%