One of the prerequisites to get scrcpy to work is to activate developer mode and enable USB debugging, of course giving authorization for the device – in this case your PC – access to your Android. Without doing this in advance you’ll not be able to get this to work.
Download scrcpy
GitHub – Genymobile/scrcpy: Display and control your Android device
https://github.com/Genymobile/scrcpy
There’s no installer, just download the latest version, extract it somewhere and that’s it, no need to install adb seperately, as that’s packaged inside the folder. Of course have a look at the steps, as you’ll need to enable USB debugging.
Command-line arguments
Recording needs to be manually turned on, so instead of running the .exe in the folder, you should see a .bat file named “open_a_terminal_here.bat”, run that and the terminal for you to input command-line arguments should appear.
Have a look on the github page for the full list.