You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scrcpy version: 2.1, I don't know why is show 2.0 in terminal
installation method: brew
device model: Nvidia Shield Pro 2017
Android version: 11
Describe the bug
Nvidia Shield audio problem on MacOS. Same Nvidia Shield Pro in same network but on Windows is working fine.
Command: scrcpy, gives this:
scrcpy 2.0 https://github.com/Genymobile/scrcpy
/opt/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 194.4 MB/s (52867 bytes in 0.000s)
[server] INFO: Device: NVIDIA SHIELD Android TV (Android 11)
INFO: Renderer: metal
WARN: Demuxer 'audio': stream explicitly disabled by the device
[server] ERROR: Exception on thread Thread[Thread-4,5,main]
java.lang.IllegalArgumentException: Failed to initialize audio/opus, error 0xfffffffe
at android.media.MediaCodec.native_setup(Native Method)
at android.media.MediaCodec.(MediaCodec.java:2117)
at android.media.MediaCodec.createEncoderByType(MediaCodec.java:2042)
at com.genymobile.scrcpy.AudioEncoder.createMediaCodec(AudioEncoder.java:278)
at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:174)
at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120)
at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:923)
ERROR: Demuxer 'video': stream disabled due to connection error
ERROR: Demuxer error
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.createPackageContext(java.lang.String, int)' on a null object reference
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.media.MediaCodec.isSupported(MediaCodec.java:1892)
at android.media.MediaCodec.checkAppForAutoFrc(MediaCodec.java:1922)
at android.media.MediaCodec.configureCodecParams(MediaCodec.java:2084)
at android.media.MediaCodec.(MediaCodec.java:2118)
at android.media.MediaCodec.createEncoderByType(MediaCodec.java:2042)
at com.genymobile.scrcpy.ScreenEncoder.createMediaCodec(ScreenEncoder.java:209)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:64)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:133)
at com.genymobile.scrcpy.Server.main(Server.java:381)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:399)
WARN: Killing the server...
Command: scrcpy --audio-codec=aac, gives this:
scrcpy 2.0 https://github.com/Genymobile/scrcpy
/opt/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 218.7 MB/s (52867 bytes in 0.000s)
[server] INFO: Device: NVIDIA SHIELD Android TV (Android 11)
[server] ERROR: Exception on thread Thread[Thread-4,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.createPackageContext(java.lang.String, int)' on a null object reference
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.media.MediaCodec.isSupported(MediaCodec.java:1892)
at android.media.MediaCodec.checkAppForAutoFrc(MediaCodec.java:1922)
at android.media.MediaCodec.configureCodecParams(MediaCodec.java:2084)
at android.media.MediaCodec.(MediaCodec.java:2118)
at android.media.MediaCodec.createEncoderByType(MediaCodec.java:2042)
at com.genymobile.scrcpy.AudioEncoder.createMediaCodec(AudioEncoder.java:278)
at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:174)
at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120)
at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:923)
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.createPackageContext(java.lang.String, int)' on a null object reference
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.media.MediaCodec.isSupported(MediaCodec.java:1892)
at android.media.MediaCodec.checkAppForAutoFrc(MediaCodec.java:1922)
at android.media.MediaCodec.configureCodecParams(MediaCodec.java:2084)
at android.media.MediaCodec.(MediaCodec.java:2118)
at android.media.MediaCodec.createEncoderByType(MediaCodec.java:2042)
at com.genymobile.scrcpy.ScreenEncoder.createMediaCodec(ScreenEncoder.java:209)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:64)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:133)
at com.genymobile.scrcpy.Server.main(Server.java:381)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:399)
INFO: Renderer: metal
ERROR: Demuxer 'video': stream disabled due to connection error
WARN: Demuxer 'audio': stream explicitly disabled by the device
ERROR: Demuxer error
WARN: Killing the server...
Command: scrcpy --no-audio, working fine with no audio:
scrcpy 2.0 https://github.com/Genymobile/scrcpy
/opt/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 198.1 MB/s (52867 bytes in 0.000s)
[server] INFO: Device: NVIDIA SHIELD Android TV (Android 11)
INFO: Renderer: metal
INFO: Initial texture: 1920x1080
The text was updated successfully, but these errors were encountered:
Environment
Describe the bug
Nvidia Shield audio problem on MacOS. Same Nvidia Shield Pro in same network but on Windows is working fine.
Command: scrcpy, gives this:
scrcpy 2.0 https://github.com/Genymobile/scrcpy
/opt/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 194.4 MB/s (52867 bytes in 0.000s)
[server] INFO: Device: NVIDIA SHIELD Android TV (Android 11)
INFO: Renderer: metal
WARN: Demuxer 'audio': stream explicitly disabled by the device
[server] ERROR: Exception on thread Thread[Thread-4,5,main]
java.lang.IllegalArgumentException: Failed to initialize audio/opus, error 0xfffffffe
at android.media.MediaCodec.native_setup(Native Method)
at android.media.MediaCodec.(MediaCodec.java:2117)
at android.media.MediaCodec.createEncoderByType(MediaCodec.java:2042)
at com.genymobile.scrcpy.AudioEncoder.createMediaCodec(AudioEncoder.java:278)
at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:174)
at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120)
at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:923)
ERROR: Demuxer 'video': stream disabled due to connection error
ERROR: Demuxer error
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.createPackageContext(java.lang.String, int)' on a null object reference
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.media.MediaCodec.isSupported(MediaCodec.java:1892)
at android.media.MediaCodec.checkAppForAutoFrc(MediaCodec.java:1922)
at android.media.MediaCodec.configureCodecParams(MediaCodec.java:2084)
at android.media.MediaCodec.(MediaCodec.java:2118)
at android.media.MediaCodec.createEncoderByType(MediaCodec.java:2042)
at com.genymobile.scrcpy.ScreenEncoder.createMediaCodec(ScreenEncoder.java:209)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:64)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:133)
at com.genymobile.scrcpy.Server.main(Server.java:381)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:399)
WARN: Killing the server...
Command: scrcpy --audio-codec=aac, gives this:
scrcpy 2.0 https://github.com/Genymobile/scrcpy
/opt/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 218.7 MB/s (52867 bytes in 0.000s)
[server] INFO: Device: NVIDIA SHIELD Android TV (Android 11)
[server] ERROR: Exception on thread Thread[Thread-4,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.createPackageContext(java.lang.String, int)' on a null object reference
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.media.MediaCodec.isSupported(MediaCodec.java:1892)
at android.media.MediaCodec.checkAppForAutoFrc(MediaCodec.java:1922)
at android.media.MediaCodec.configureCodecParams(MediaCodec.java:2084)
at android.media.MediaCodec.(MediaCodec.java:2118)
at android.media.MediaCodec.createEncoderByType(MediaCodec.java:2042)
at com.genymobile.scrcpy.AudioEncoder.createMediaCodec(AudioEncoder.java:278)
at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:174)
at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120)
at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:923)
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.createPackageContext(java.lang.String, int)' on a null object reference
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.media.MediaCodec.isSupported(MediaCodec.java:1892)
at android.media.MediaCodec.checkAppForAutoFrc(MediaCodec.java:1922)
at android.media.MediaCodec.configureCodecParams(MediaCodec.java:2084)
at android.media.MediaCodec.(MediaCodec.java:2118)
at android.media.MediaCodec.createEncoderByType(MediaCodec.java:2042)
at com.genymobile.scrcpy.ScreenEncoder.createMediaCodec(ScreenEncoder.java:209)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:64)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:133)
at com.genymobile.scrcpy.Server.main(Server.java:381)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:399)
INFO: Renderer: metal
ERROR: Demuxer 'video': stream disabled due to connection error
WARN: Demuxer 'audio': stream explicitly disabled by the device
ERROR: Demuxer error
WARN: Killing the server...
Command: scrcpy --no-audio, working fine with no audio:
scrcpy 2.0 https://github.com/Genymobile/scrcpy
/opt/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 198.1 MB/s (52867 bytes in 0.000s)
[server] INFO: Device: NVIDIA SHIELD Android TV (Android 11)
INFO: Renderer: metal
INFO: Initial texture: 1920x1080
The text was updated successfully, but these errors were encountered: