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

Scrcpy closes after a few seconds #283

Closed
ajaydono opened this issue Oct 2, 2018 · 18 comments
Closed

Scrcpy closes after a few seconds #283

ajaydono opened this issue Oct 2, 2018 · 18 comments

Comments

@ajaydono
Copy link

ajaydono commented Oct 2, 2018

scrcpy-server.jar: 1 file pushed. 0.6 MB/s (19342 bytes in 0.032s)
INFO: Initial texture: 720x1280
Invalid return value 0 for stream protocol
Invalid return value 0 for stream protocol
[h264 @ 000000000261cd00] corrupted macroblock 5 31 (total_coeff=-1)
[h264 @ 000000000261cd00] error while decoding MB 5 31
[h264 @ 000000000261cd00] concealing 2249 DC, 2249 AC, 2249 MV errors in P frame
WARN: Cannot terminate server

Having this issue.

@rom1v rom1v added the codec label Oct 2, 2018
@rom1v
Copy link
Collaborator

rom1v commented Oct 2, 2018

Duplicate of #281.

Please answer on the other issue directly.

@rom1v rom1v added the server label Oct 2, 2018
@rom1v rom1v closed this as completed Oct 2, 2018
@ajaydono
Copy link
Author

ajaydono commented Oct 2, 2018

After a few seconds, I can control it for a few seconds 2-3 seconds. Then It closes and all errors are

adb: error: failed to get feature set: device offline
ERROR: "adb push" returned with value 1

@rom1v
Copy link
Collaborator

rom1v commented Oct 2, 2018

OK, so you lost the adb connection. What is the result of adb devices when this happens?

@rom1v rom1v added the adb label Oct 2, 2018
@ajaydono
Copy link
Author

ajaydono commented Oct 2, 2018

I think i found out the issue. There was not enough power to the USB.

@rom1v rom1v added disconnection and removed codec labels Nov 17, 2018
@Kienyew
Copy link

Kienyew commented Aug 12, 2020

Try another resolution, I got the same error using the default one (1080x2336 on my phone), it works when then I tried scrcpy -m 1024 which lower the resolution to 472x1024.

@rom1v rom1v mentioned this issue Aug 20, 2020
2 tasks
@RyAri6
Copy link

RyAri6 commented Dec 18, 2020

going through some trouble

INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy
C:\Users\arino\Downloads\scrcpy-win64-v1.16\scrcpy-server: 1 file pushed, 0 skipped. 7.0 MB/s (33622 bytes in 0.005s)
[server] INFO: Device: HUAWEI INE-LX2r (Android 9)
[server] ERROR: Exception on thread Thread[main,5,main]
android.media.MediaCodec$CodecException: Error 0xfffffc0e
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:1967)
at android.media.MediaCodec.configure(MediaCodec.java:1896)
at com.genymobile.scrcpy.ScreenEncoder.configure(ScreenEncoder.java:205)
at com.genymobile.scrcpy.ScreenEncoder.internalStreamScreen(ScreenEncoder.java:84)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:55)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:76)
at com.genymobile.scrcpy.Server.main(Server.java:225)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:371)
[server] ERROR: The hardware encoder is not able to encode at the given definition.
[server] ERROR: Try with a lower definition:
[server] ERROR: scrcpy -m 1024
Exit due to uncaughtException in main thread:
INFO: Renderer: direct3d
INFO: Initial texture: 1080x2336
WARN: Device disconnected

anyone knows how to fix this?

@rom1v
Copy link
Collaborator

rom1v commented Dec 18, 2020

anyone knows how to fix this?

Yes, your error message says:

[server] ERROR: The hardware encoder is not able to encode at the given definition.
[server] ERROR: Try with a lower definition:
[server] ERROR: scrcpy -m 1024

https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#exception

@RyAri6
Copy link

RyAri6 commented Dec 18, 2020

anyone knows how to fix this?

Yes, your error message says:

[server] ERROR: The hardware encoder is not able to encode at the given definition.
[server] ERROR: Try with a lower definition:
[server] ERROR: scrcpy -m 1024

https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#exception

so wait how do i fix it?

@RyAri6
Copy link

RyAri6 commented Dec 18, 2020

anyone knows how to fix this?

Yes, your error message says:

[server] ERROR: The hardware encoder is not able to encode at the given definition.
[server] ERROR: Try with a lower definition:
[server] ERROR: scrcpy -m 1024

https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#exception

how do i change it to a lower definition

@rom1v
Copy link
Collaborator

rom1v commented Dec 18, 2020

@RyAri6
Copy link

RyAri6 commented Dec 18, 2020

Execute scrcpy -m 1024: https://github.com/Genymobile/scrcpy/blob/wincli/FAQ.md#command-line-on-windows

i still cant figure it out it says this commmand cannot find opperatble program or some stuff can you give me a step by step on how to do this

@rom1v
Copy link
Collaborator

rom1v commented Dec 18, 2020

it says this commmand cannot find opperatble program or some stuff

Copy the exact command you typed and the exact error message.

@RyAri6
Copy link

RyAri6 commented Dec 18, 2020

Microsoft Windows [Version 10.0.18363.1256]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\arino>...\scrcpy-win64-xxx
'...\scrcpy-win64-xxx' is not recognized as an internal or external command,
operable program or batch file.

@rom1v
Copy link
Collaborator

rom1v commented Dec 18, 2020

No but in this guide, at step 3 you have to adapt the path. Where is your scrcpy folder? For example, if its name is scrcpy in your download folder, type cd C:\Users\arino\Downloads\scrcpy.

@RyAri6
Copy link

RyAri6 commented Dec 18, 2020

tried em all didnt work

C:\Users\arino>\downloads\scrcpy
The system cannot find the path specified.

C:\Users\arino>\downloads\scrcpy-win64-v1.16
The system cannot find the path specified.

C:\Users\arino>\Downloads\scrcpy-win64-v1.16
The system cannot find the path specified.

C:\Users\arino>C:\Users\arino\Downloads\scrcpy
'C:\Users\arino\Downloads\scrcpy' is not recognized as an internal or external command,
operable program or batch file.

this is the file name scrcpy-win64-v1.16

@rom1v
Copy link
Collaborator

rom1v commented Dec 18, 2020

But you absolutely don't type the command I posted. cd then space, then C:\............

cd C:\Users\arino\Downloads\scrcpy-win64-v1.16

Sorry, I can't help more.

@RyAri6
Copy link

RyAri6 commented Dec 18, 2020

im new to these commands thats why i asked for steps like 1. do this , 2. type this

@slemonslim
Copy link

hi guys i am new to scrcpy 2.1.1
i want to ask when i connect my NOKIA 3.4 phone via wirelessly.
i got screecopy on my PC wirelessly in same network (like HOME is my wifi name) of my NOKIA phone.
but once my phone disconnected from HOME wifi and get reconnect within same network again
i cannot able reaccess or screencopy my phone
however, i have to make all process again from the 1st step like this.
1==> go to phone settings/developer mode/usb debugging mode=ON
2==> connect phone to PC / allow alwaz this mobile
3==> open scrcpy terminal cmd
4==> adb devices (device serial number shown under)
5==> next
6==> adb tcpip 5555
7==> restarting in TCP mode port: 5555
8==> adb connect 192.168.10.7:5555
9--> connected to 192.168.10.7:5555

I have to remake all these processes again n again after once device disconnected from Wi-Fi and reconnected again in same network.
after reconnected if i make again this command
8==> adb connect 192.168.10.7:5555
it's given me error.
cannot connect to 192.168.10.7:5555: No connection could be made because the target machine actively refused it. (10061)

can somebody have a proper solution for this?
that i don't want to connect my phone again n again
Whynot it can save always for once.

Thanks in advance.
slemon slim

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

No branches or pull requests

5 participants