/naive-scrcpy-client

A naive client of Scrcpy in Python.

Primary LanguagePythonMIT LicenseMIT

Update

The method I used in this project is out of date. Please consider using naive-android-ssr for better video decoding experience.

Naive Scrcpy Client

A naive client of Scrcpy in Python. Currently it can only decode video stream from the server.

This client was inspired by py-scrcpy.

Dependence

  • Android Debug Bridge
  • ffmpeg shared libraries
  • opencv-pythons (for GUI)

To Start

  1. Install OpenCV for Python. Naive Scrcpy Client use OpenCV for GUI. You can replace it with PIL or anything else easily.

    pip install opencv-python
    
  2. Copy/link recent ffmpeg shared libraries to ./lib, the required files were listed below. Make sure the version of libs matches to the architecture of your Python (e.g. x86->32bit).

    • Windows:
    avcodec-58.dll
    avformat-58.dll
    avutil-56.dll
    swresample-3.dll
    
    • Linux:
    libavcodec.so
    libavformat.so
    libavutil.so
    libswresample.so
    
  3. Get ADB ready on your PC and leave USB Debug Mode open on your phone.

  4. Let's rock!

    python run_client.py
    
  5. Check config in run_client.py for more information.

Contact me