[HOWTO] Take a video using scrcpy

Sometimes a video is more explicit than words or screenshots ! (please avoid dirty comments :wink: ).
So you may want to show exactly what’s happening on your phone, without storing any file on it, here is how to.
Rem : if you feel comfortable with the Recorder app, storing the video on your phone, you can simply use it instead; thanks @harvey186 for the reminder !

  1. “chérie, j’ai oublié les gosses !”
    You must have :
  • a working phone :wink:
  • developer mode with adb on your computer (Windows, Linux, MacOS). This is well explained in this howto
  • scrcpy : https://github.com/Genymobile/scrcpy
  • a working USB cable between your computer and your phone or a working WiFi network
  1. “show me one finger … or two”
    As you want to show what you’re doing, activate “Show taps” in Developer Options :

  2. “Houston, we’re go”
    Plug your phone to USB (*see alternate below) and start scrcpy

  • no need to pre-launch adb server, scrcpy has his own
  • ensure all files are here, and you have enough free space on your drive :
    image
  1. “I know what you did last summer”
    scrcpy is starting :
    image
  • you can act on your phone, or on the clone window on your computer
  • when done, just close the clone window on your computer, the video gets recorded :slight_smile: image
  1. “Daya think I’m sexy ?”
    You can now upload it to your favorite /e/ cloud, and share it. Example : Disable keypad vibrate - Samsung 7 - #10 by smu44

3-alternate) “where the Alliance comes to help”

  • de-activate mobile network data
  • connect the phone to the same WiFi network as your computer, and activate OTA debugging in your phone :
  • note the IP address and the port :
  • connect via WiFi using IP+port & start magic remote control :
    image
  • expect some lag :wink:

Want more control ?

  • scrcpy come with some keyboard shortcuts, just launch scrcpy -h ! You may like ctrl-h, ctrl-b, ctrl-s, ctrl-r :wink:
  • you can also play with framerate, bitrate, video encoding, …
  • If you’re really an opened mind, you can also share your phone via mobile network …

With gratefully respect to @Manoj, @manish, and all other good guys :pray:

2 Likes

Why don’t use the default ‘Recorder’ App ?

I could, but the purpose here is to use scrcpy :wink:

I had some problems with Recorder app including a corrupt file, so I don’t feel comfortable with it.
So I find that the solution of capturing the screen from the outside and not storing the video on the phone is more reliable.
This is just a personal opinion, of course.

Thanks @harvey186, you reminded me i forgot to mention the storage aspect :slight_smile:

Hello, could you help me with this :

girafe@girafe-HP-G72-Notebook-PC:~$ scrcpy
scrcpy 1.25 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 131.2 MB/s (41650 bytes in 0.000s)
[server] INFO: Device: samsung SM-A202F (Android 14)
[server] ERROR: Could not invoke method
java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.addPrimaryClipChangedListener [interface android.content.IOnPrimaryClipChangedListener, class java.lang.String, class java.lang.String, int]
	at java.lang.Class.getMethod(Class.java:2950)
	at java.lang.Class.getMethod(Class.java:2450)
	at com.genymobile.scrcpy.wrappers.ClipboardManager.getAddPrimaryClipChangedListener(ClipboardManager.java:128)
	at com.genymobile.scrcpy.wrappers.ClipboardManager.addPrimaryClipChangedListener(ClipboardManager.java:138)
	at com.genymobile.scrcpy.Device.<init>(Device.java:100)
	at com.genymobile.scrcpy.Server.scrcpy(Server.java:64)
	at com.genymobile.scrcpy.Server.main(Server.java:334)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
[server] ERROR: Exception on thread Thread[Thread-2,5,main]
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
	at com.genymobile.scrcpy.wrappers.ServiceManager.getInputManager(ServiceManager.java:75)
	at com.genymobile.scrcpy.Device.injectEvent(Device.java:192)
	at com.genymobile.scrcpy.Device.injectKeyEvent(Device.java:203)
	at com.genymobile.scrcpy.Device.pressReleaseKeycode(Device.java:211)
	at com.genymobile.scrcpy.Device.pressReleaseKeycode(Device.java:216)
	at com.genymobile.scrcpy.Controller.control(Controller.java:66)
	at com.genymobile.scrcpy.Server$3.run(Server.java:132)
	at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invoke(Native Method)
	at com.genymobile.scrcpy.wrappers.ServiceManager.getInputManager(ServiceManager.java:72)
	... 7 more
Caused by: java.lang.NullPointerException
	at java.util.Objects.requireNonNull(Objects.java:207)
	at android.hardware.input.InputManager.getInstance(InputManager.java:277)
	... 9 more
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.AssertionError: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
	at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:83)
	at com.genymobile.scrcpy.ScreenEncoder.createDisplay(ScreenEncoder.java:278)
	at com.genymobile.scrcpy.ScreenEncoder.internalStreamScreen(ScreenEncoder.java:84)
	at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:74)
	at com.genymobile.scrcpy.Server.scrcpy(Server.java:100)
	at com.genymobile.scrcpy.Server.main(Server.java:334)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
Caused by: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
	at java.lang.Class.getMethod(Class.java:2950)
	at java.lang.Class.getMethod(Class.java:2450)
	at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:81)
	... 7 more
INFO: Renderer: opengl
INFO: OpenGL version: 2.1 Mesa 25.0.7-0ubuntu0.24.04.2
WARN: Trilinear filtering disabled (OpenGL 3.0+ or ES 2.0+ required)
INFO: Initial texture: 720x1560
WARN: Device disconnected
WARN: Killing the server...

your version look outdated, mine is scrcpy 3.3.3 when latest is scrcpy 3.3.4
GitHub - Genymobile/scrcpy: Display and control your Android device

The only way I could have scrcpy working on my laptop is from the repo with sudo apt install scrcpy.

From the official release

Download a static build of the latest release:

and extract it.

Had done this but the scrcpy application in the folder isn’t launching. Even tried to copy it to ./bin with admin right, no luck.

Building it from source, right now.

according to scrcpy/doc/linux.md at master · Genymobile/scrcpy · GitHub

1 Like