Recording and livestreaming from Oculus Quest, with audio
ArticlesOculus Quest and Oculus Go have a screen recording feature built-in, but if you’re looking to livestream in realtime or to record with audio synchronization, you might find one of these options more useful. Also, you can use these methods to cast both video and audio to a display for use at parties and other gatherings.
Cast video to Chromecast, audio using Bluetooth
This method is hardware intensive, but it’s super flexible and allows for the streaming of synchronized video and audio from an Oculus Quest.
Hardware required:
- Google Chromecast Ultra
- HDMI splitter
- USB HDMI capture interface (I use a Magewell)
- Bluetooth Transmitter (Tx) and Receiver (Rx) (I use two TaoTronics units, which can be set to Tx and Rx modes)
- 2 x HDMI cables
- OBS for computer-based livestreaming or capture
This method does not require your Oculus Quest or Go to have developer mode turned on, and works with a standard headset. It’s also completely wireless—there are no cables to deal with. Output is decent, but video compression is evident; this is the direct trade off of going wireless using out-of-box streaming support.
Steps:
- Set up your Chromecast, and make sure it’s on the same wireless network as your Oculus
- Connect the Chromecast’s HDMI output to the input on the HDMI splitter (required—connecting Chromecast directly to the HDMI capture interface will not work)
- Connect the HDMI splitter’s output to your USB HDMI capture interface, and plug the USB capture interface into a USB 3.0 port on your computer
- Pair the Bluetooth Tx and Rx units. If you’re using the TaoTronics units I linked to above, set one of them to Tx mode, and the other to Rx mode. Place them close to each other, turn them on, and they should automatically pair.
- Plug the Bluetooth Rx unit into your computer’s 1/8” microphone input. In Windows, you’ll likely get a pop-up when you plug the device in, asking what it is. Select “Microphone.” If you don’t, you might have to open the Sound control panel and select the proper input.
- Enable casting to the Chromecast from your Oculus Quest or Oculus Go
- Run OBS and set up two inputs:
- Video input from USB HDMI capture device
- Audio input from computer’s microphone input
- Record / stream using OBS. Verify that sync is good. It should be, but if it’s not, you can dial in a manual delay in OBS.
- Here is a sample capture. Note that this capture also muxes in video and audio of me, in the room (using a webcam, external microphone, and additional OBS inputs)
If your goal is to stream to a display for use at parties, you can use the same hardware, but you’ll need a way to associate the HDMI video feed from Chromecast and the audio output from the Bluetooth Rx. Most receivers and some TVs should have a way to do this. Another option I will test soon is using an HDMI audio inserter, which in theory should mux the video signal from the Chromecast and the audio input from the Bluetooth Rx and let you send a single HDMI output to any TV or capture device.
Capture video using ADB, audio using Bluetooth
If you know how to enable Developer Mode and use ADB, there is a higher-quality way of recording video from your Oculus device. There is a YouTube video that describes the method. You can use the Bluetooth interfaces linked above, for audio. Here’s an example I captured using this method.
Short cuts / things to try
Trigger onboard screenrecord at higher resolutions, using adb:
adb shell screenrecord --size 1920x1080 --bit-rate 12000000 /sdcard/video.mp4
Trigger local mirroring over adb
adb exec-out screenrecord \
--size 960x800 --output-format h264 - \
| vlc --file-caching=0 --live-caching=0 --disc-caching=0 --network-caching=0 \
--demux=h264 --h264-fps=72 \
--video-filter=adjust:croppadd --croppadd-cropright=530 --croppadd-croptop=200 --croppadd-cropbottom=200 --croppadd-cropleft=50 \
--gamma=1.4 --aspect-ratio=16:9 -
Use scrcpy, per the YouTube link above
This seems to be the highest quality way to capture (either over wireless, or wires):
Shortcut to assets used in the video:
- https://www.dropbox.com/s/xje0kyxb2hzvf7t/adb.zip
- scrcpy: https://github.com/Genymobile/scrcpy/releases
clean left eye crop
scrcpy -c 1280:960:105:256
full left eye
scrcpy -c 1440:1536:0:0
both eyes, full
scrcpy -c 2880:1536:0:0
To grab video and dump to a file:
scrcpy -c 1280:960:105:256 --record recording.mp4
The recorded mp4 is AVC with wildly-swinging variable framerate, and video editors like Adobe Premiere Pro do not like it. For example, one of my captures reported variable framerates between 8.184 FPS And 192.175 FPS, with an average of 61.281 FPS.
Use ffmpeg to convert to a constant-framerate before trying to share or import into an editor. Here’s a command that will re-encode as h.264, 60fps, trimming the recorded file to start 5 seconds in, for 10 seconds of video duration (from second 5 to 15 of the video).
ffmpeg -i "recording.mp4" -ss 00:00:5 -t 00:00:10 -c:v libx264 -preset fast -crf 18 -r 60 -pix_fmt yuv420p -c:a copy -movflags faststart "output.mp4"