With the Oculus Quest 2 coming out recently and having a new better screen resolution, the previous command line options for Oculus Quest 1 screen sharing I blogged don’t quite work for a good sharing mechanism.
I have played around a little and have come up with some numbers that work quite well with scrcpy, follow the below details to install the packages needed and get up and running with screen sharing of the Oculus Quest 2.
Initial Install and Setup
- Enable developer mode on your Oculus Quest 2 (https://www.youtube.com/watch?v=1PTFkLnJRLs)
- Plug the USB-C cable into your computer and the Quest, this also works with USB to USB-C
- If its your first time plugging into this computer you will need to accept the prompt within the device that allows you to access the device from the computer as per below and check the box to always allow if you want to skip this section in the future
- For Windows download and unzip the latest build of scrcpy from https://github.com/Genymobile/scrcpy/releases a direct link for the current version when writing this is here: https://github.com/Genymobile/scrcpy/releases/download/v1.10/scrcpy-win64-v1.10.zip
- For Mac the application is available in Homebrew. Install it using the following from a terminal window:
brew install scrcpy
- You will also need
adb
. you can install this by running the following from a terminal window:brew cask install android-platform-tools
Sharing the Screen connected via cable
- Open a command prompt (cmd.exe) or and CD into the extracted folder from above
- Run the following command:
scrcpy
--crop 1632:1220:100:320 -m 1600 -b 25M
Sharing the Screen connected wirelessly
You will still need a cable to make an initial connection and start the client on the Quest and then you can disconnect and use wirelessly, use the following steps to connect wirelessly:
- Follow steps 1-4 above in the setup section
- Open a command prompt (cmd.exe) and CD into the extracted folder from above
- While the device is connected via a cable run the following to find out what your Quests IP address is in the src section:
adb shell ip route
192.168
.
1.0
/
24
dev wlan0 proto kernel scope link src
192.168
.
1.198
- Now run the following replacing the IP address below (192.168.1.198) as yours:
adb tcpip
5555
adb connect
192.168
.
1.198
:
5555
- Disconnect the cable from the PC and with the device disconnected run the command to connect to the device as below
scrcpy --crop 1632:1220:100:320 -m 1600 -b 25M |
Sharing Window
If everything worked above a new window should appear showing the device screen, you can then maximize this for a better demo window.
Testing was done with variations of the scrcpy command but the above was found to be the best viewing size to enable a good demo.
Recording the screen
There is also a great way to capture the screen while mirroring, add the following command options to the end of the scrcpy command above to do this:
--record file.mp4 |
To disable mirroring while recording:
--no-display --record file.mp4 |
Troubleshooting
Connection Issues
If you get a blank window or are unable to connect when device is plugged in you should be able to run the following command from the same folder above:
PS C:\Users\alan\Downloads\scrcpy-win64-v1.10> .\adb.exe devices
List of devices attached
1PASH9AF839266 device
The device should show above rather than:
PS C:\Users\alan\Downloads\scrcpy-win64-v1.10> .\adb.exe devices
List of devices attached
1PASH9AF839266 unauthorized
If you get the latter then make sure you have enabled developer mode and authorized the device as per step 1-3 above.
Target Machine refused connection when in wireless
If you receive a message like the following: “cannot connect to 192.168.1.198:5555: No connection could be made because the target machine actively refused it. (10061)”
Reconnect the Quest to the computer and go from Step 3 in the wireless connection steps above, this is caused because the client on the quest stopped, normally as you reset the device.
Yeah the Vive has excellent tracking and my kids love it as well. I’ll have to ask around to see if anyone I know has a Quest I can demo before I splurge on any new toys. I’ve got to see this display in person!
I also had a vive, personally I find the quest much easier to use, faster to setup and get running, much clearer display. Can still be plugged into the PC when needed. Only thing vive probably had it beat on is tracking, for those times you hold your hand behind your head and it can’t be worked out by software where it is…. which are minimal.
How would you compare the Occulus 2 to the Vive? I’ve got a Vive and it’s pretty awesome, but I’m always on the lookout for new tech.