Genymobile / Genymobile/scrcpy

No audio for VR headset (Meta Quest 3)

Open
#4,354 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
150k
Forks
13.7k
Avg merge
4d 13h
Merged PRs (30d)
2

Description

- [x] I have read the [FAQ](https://github.com/Genymobile/scrcpy/blob/master/FAQ.md).
- [x] I have searched in existing [issues](https://github.com/Genymobile/scrcpy/issues).

**Environment**
- OS: Windows
- scrcpy version: v2.1.1
- installation method: Windows release
- device model: Meta Quest 3
- Android version: 12

**Describe the bug**
Working on an ADB call to feed the video and audio from my VR HMD to my PC for livestreaming.

This is my current script:
scrcpy --crop 2064:2208:2064:0 --video-bit-rate=40M -d --disable-screensaver --max-fps 60

Feed comes in fine, but no audio (audio timestamp not found). I ran a Vdebug and got the following:

INFO: Device: [Oculus] oculus Quest 3 (Android 12)
DEBUG: Server connected
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
[server] DEBUG: Using audio encoder: 'c2.android.opus.encoder'
[server] DEBUG: Using video encoder: 'c2.qti.avc.encoder'
INFO: Renderer: direct3d
DEBUG: Trilinear filtering disabled (not an OpenGL renderer
DEBUG: Using icon (portable): C:\Users\17702\Documents\scrcpy-win64-v2.1.1\icon.png
DEBUG: Demuxer 'video': starting thread
DEBUG: Demuxer 'audio': starting thread
INFO: Texture: 4128x2208
[server] WARN: Could not get any audio timestamp
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: [Audio] Buffer underflow, inserting silence: 10 samples

I tried an audio buffer overflow and got nothing. Switched the codec to AAC and got nothing. What solved it... was plugging headphones into the headset. That simple act sent the audio to my PC (but no sound through the headphones). Trying to understand why this happened and figure out a workaround as I would rather not wear two sets of headphones. Any insight would be appreciated.

Thanks in advance.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported Windows command with a Meta Quest 3 and compare the debug output with and without headphones. Investigate the audio timestamp failure and verify any workaround by confirming that scrcpy receives audio without requiring headphones to be plugged into the headset.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, c
Domain
audio-video-rtc, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.