Skip to content

Instantly share code, notes, and snippets.

@blixt
Last active August 31, 2024 19:38
Show Gist options
  • Save blixt/1e57de3739a669b8a58395ca07ec5ad0 to your computer and use it in GitHub Desktop.
Save blixt/1e57de3739a669b8a58395ca07ec5ad0 to your computer and use it in GitHub Desktop.
Streaming Oculus Quest wirelessly over WiFi to macOS (on a MacBook)

Streaming an Android-based VR headset to your computer

Setting it up the first time

The first time you have to set it up with a cable. The Oculus Quest has a USB-C port (the one used for charging). Use this to connect to your computer.

Preparing your Oculus Quest

Your Quest needs to be in Developer mode. This is super easy, just open your companion app on your phone and go to Settings and enable Developer mode. You may need to create an organization first on the Oculus website. You can enter any name you want for the organization.

Installing everything

First you need Homebrew on your system. It's a utility that lets you install a lot of tools from the Terminal. Follow the instructions on https://brew.sh/ (just paste the line they suggest into Terminal).

Next, in Terminal:

  1. Run brew cask install android-platform-tools (Android developer tools)
  2. Run brew install scrcpy (the streaming tool)

(Tip: To launch Terminal, press ⌘+Space to show Spotlight, write "Terminal", then hit Return.)

Connecting Quest to computer

  1. Connect Quest to your computer with cable
  2. In Terminal, run adb devices and make sure you allow computer within the Quest

Next, to enable wireless connections you need to:

  1. Make sure your computer and Quest are on the same WiFi!
  2. Run adb tcpip 5555 to enable wireless connections
  3. Run adb shell ip route to get the IP of your Quest
  4. Unplug the Quest from your computer
  5. Run adb connect <IP>:5555 (replace <IP> with the IP from step 3) to connect to the Quest wirelessly

Streaming video

Just run scrcpy on the Terminal! There are cropping options that you can play with to only show one eye, etc.

Try scrcpy -b 25M -c 1440:1540:60:60 to start. You can play with the numbers after -c (width : height : x : y).

@FotisK
Copy link

FotisK commented Sep 28, 2022

thanks! worked beautifully!
A couple updates needed perhaps (running macOS Monteray) -not sure where to post them:

% brew cask install android-platform-tools
Error: brew cask is no longer a brew command. Use brew --cask instead.

this worked instead:
brew install android-platform-tools

also scrcpy -c for cropping (eg. scrcpy -b 25M -c 1440:1540:60:60) no longer works. --crop worked instead:
scrcpy -b 25M --crop 1440:1540:60:60

@sikaar
Copy link

sikaar commented Jun 18, 2023

Not sure why but "adb shell ip route" provides 2 ips when using a quest pro,

the correct one to use is the first one ( dev wlan0 proto kernel scope link src 168.xx.xx.xx)
and not the second one (dev p2p-wlan0-1 proto kernel scope link src 168.xx.xx.xx - which is by the way the one displayed in Sidequest - might explain why it is not working automatically as it is picking the wrong address)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment