Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Connect to Shield TV #3919

Closed
2 tasks done
znbaboy opened this issue Apr 16, 2023 · 1 comment
Closed
2 tasks done

Cannot Connect to Shield TV #3919

znbaboy opened this issue Apr 16, 2023 · 1 comment

Comments

@znbaboy
Copy link

znbaboy commented Apr 16, 2023

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: Windows
  • scrcpy version: 2.0
  • installation method: Windows Release
  • device model: NVIDIA Shield TV
  • Android version: Android 11

Describe the bug
It fails to connect. See log below

On errors, please provide the output of the console (and adb logcat if relevant).

PS C:\Users\<USER>\Desktop\PC Stuff\Tools\scrcpy-win64> . 'C:\Users\<USER>\Desktop\PC Stuff\Scripts\Scrcpy - ShieldTV.ps1'
connected to 192.168.0.103:5555
scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
C:\Users\<USER>\Desktop\PC Stuff\Tools\scrcpy-win64\scrcpy-server: 1 file pushed, 0 skipped. 97.8 MB/s (52867 bytes in 0.001s)
[server] INFO: Device: NVIDIA SHIELD Android TV (Android 11)
[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.<init>(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)
[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.<init>(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: direct3d
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...
disconnected 192.168.0.103:5555

Please do not post screenshots of your terminal, just post the content as text instead.

@yume-chan
Copy link
Contributor

#3801

@rom1v rom1v closed this as completed Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants