Scrcpy (screen copy) is a notable tool. At its most basic level, it’s a way to interact with your Android device from your computer. You can use your Android device to launch applications, control your camera, or play games, but using a USB or Wi-Fi connection. He first encountered Scrcpy in 2020 and uses it as a means of adding a high quality second camera to his OBS setup.
This camera is actually a 4 year old phone that displays the Android desktop as an application window on the desktop. Scrcpy can also be used over a Wi-Fi connection and is useful for roving video streams. If you have an old Android phone or tablet in your drawer, scrcpy is a way to breathe new life into it and reuse it as part of your streaming setup.
Android developers will appreciate Scrcpy’s advanced ability to record video from a stream and show where the user is touching. These two features can be used to debug application problems.
In this how-to, learn more about setting up scrcpy on Windows and its advanced commands.
Setting up Scrcpy is very easy. On Windows, just download one archive and you’re good to go.
1. On your Android device,[設定]>>[電話について]Go to.
2. Scroll down to Build Number and tap it seven times. This will unlock developer mode.
3. Click Back and search for USB.
Four. scroll down When Enable USB debugging.
Five. Connect your Android device to your computer using a USB lead.
7. Extract the archive to a folder on your desktop.
8. open command prompt When Go to the folder on your desktop.
9. Run the scrcpy.exe command. Allow the connection on your Android device when prompted.
You have now established basic two-way communication between your computer and your Android device. The window represents her Android device, which she can see and interact with as if she were holding the device in her hand. You can use the mouse to swipe through the application and use the keyboard to enter text.
Close the application window to close the connection. Let’s see more of what scrcpy does.
Application window scaling
The Android device’s screen, the application window, can be scaled using the max-size argument. Our scenario is to scale the application window size for use with a video. You don’t want the window to dominate the screen with the Android device window.
Run scrcpy from a command prompt and use the -m argument to set the maximum size to 1024. The -m argument is shorthand for –max_size and you can use both.
scrcpy.exe -m 1024
lock screen rotation
By default scrcpy runs without a screen rotation lock. This means that when the Android device is rotated, the application window will react accordingly. This may not be the desired effect, so you can lock the rotation. You can use your device in landscape mode as a camera for complex OBS setups, or play Candy Crush in portrait mode.
From a command prompt, open scrcpy and lock rotation using one of the following options:
scrcpy --lock-video-orientation # initial (current) orientation
scrcpy --lock-video-orientation=0 # natural orientation
scrcpy --lock-video-orientation=1 # 90° counterclockwise
scrcpy --lock-video-orientation=2 # 180°
scrcpy --lock-video-orientation=3 # 90° clockwise
Android device recording
Android interface recording is a useful tool. Recording your screen via scrcpy is useful if you want to record steps to complete a task, report a bug, or add a video to a YouTube tutorial.
To record the screen, use the -r argument with the name of the output file.
From the command prompt, set scrcpy to record the video stream to a file called demo.mp4.
scrcpy.exe -r demo.mp4
You can combine the previous arguments to rotate the screen and set the screen size. In this case, rotate the screen to landscape, set the screen size to a maximum height of 1080 pixels, and save the video to demo-1080.mp4.
scrcpy.exe --lock-video-orientation=1 -m 1080 -r demo-1080.mp4
Connect via Wi-Fi
USB provides the best and most stable connection to your Android device, but wireless connectivity may be your best option. For example, if you want to add a wireless camera for your OBS stream or record your game from the comfort of your couch. The –tcpip argument is key for this step.
1. Make sure your Android device is connected via USB. The first connection must use USB to properly set up the connection.
2. Make sure your Android device is connected to the same network as your computer.
3. Run scrcpy with the –tcpip argument Detect Android devices and connect automatically over the network.
Four. Removing the USB connection leaves the application window on the screen and allows you to use the device over Wi-Fi. Note that network latency causes a slightly longer delay between actions and reactions.
Window configuration options
The scrcpy application window has its own configuration options that can be used to fine-tune the application according to your needs.
You can give the window a title using the –window-title argument. This example sets the window size to 768 pixels high.
scrcpy --window-title 'Tutorial’
Set window position and size
If you need to place the application window exactly where you want it, you can specify it using arguments when running scrcpy from the command prompt.
scrcpy --window-x 100 --window-y 100 --window-width 800 --window-height 600
borderless application window
If window decorations (minimize, maximize, close) are not needed, this argument will hide them. Note that you have to press CTRL+C at the command prompt to close the window.
always on top
This argument will keep the scrcpy android device window always on top of all other windows/applications.
To set scrcpy to use all available screens, use the –fullscreen argument, shortened to -f. To close the session, you need to press ALT-TAB and then CTRL + C at the command prompt.
scrcpy -f # short version
This convenience argument indicates where on the screen the user is pressing. Arguments can be invoked with full verbose options, or shortened versions.