Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
108.58k stars 10.45k forks source link

Scrcpy run and close on its own in few sec #1872

Open harsh2501 opened 3 years ago

harsh2501 commented 3 years ago

Environment

I write the Commons and press enter to run scrcpy it open but nothing is moving on my pc screen when I swipe my phone screen and scrcpy turn off on its own in around 15-45 sec.

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

Please paste terminal output in a code block.

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

harsh2501 commented 3 years ago

![Uploading IMG_20201101_001320.jpg…]()

rom1v commented 3 years ago

https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#device-disconnected

harsh2501 commented 3 years ago

these do not help me no error is comming out when i run scrcpy .i open cmd and write adb devices and then enter my devices is listed out and then i write scrcpy it run and close in 5-6 sec and if swipe my phone screen it is not showing in my pc srcreen

rom1v commented 3 years ago

Keep a separate terminal running adb logcat: if the adb comand stops at the same time as scrcpy, then thisbis exactly the problem described: adb disconnection.

harsh2501 commented 3 years ago

I am getting an error adb push returned with value 1 What I have to do now tell me I brief please

rom1v commented 3 years ago

I am getting an error adb push returned with value 1

This happens when adb does not detect your device: https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#adb-issues

harsh2501 commented 3 years ago

Now when I run the scrcpy command it open and turn off on it own and if I try to control my phone from pc the curcer icon turned into loading symbol now tell me what I have to do

rom1v commented 3 years ago

Now when I run the scrcpy command it open and turn off on it own

Please copy-paste the text content printed in the console.

harsh2501 commented 3 years ago

Microsoft Windows [Version 10.0.17763.107] (c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\Prity> scrcpy INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy

no error is given out but scrcpy turn off on its own

rom1v commented 3 years ago

Any relevant error in adb logcat when scrcpy closes?

harsh2501 commented 3 years ago

from the first time scrcpy open and close in 5-6sec and i am unable to control my phone from my pc what dose adb logcat mean and how to fix it

rom1v commented 3 years ago
adb logcat -c  # clear logs
scrcpy
# once scrcpy has closed
adb logcat -d > logs.txt

Then post logs.txt.

harsh2501 commented 3 years ago

please can you explain the above sentance in brief and in easy way i can't understand it

harsh2501 commented 3 years ago

i can't understand what i have to do

harsh2501 commented 3 years ago

C:\Users\Prity>adb logcat -c

C:\Users\Prity>scrcpy INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy 2101 KB/s (33622 bytes in 0.015s) [server] INFO: Device: Xiaomi Redmi Note 7 Pro (Android 10) INFO: Renderer: direct3d INFO: Initial texture: 1080x2336

C:\Users\Prity>adb logcat -d > logs.txt

no error display and anain scrcpy open and close in few sec and i am unable to control

harsh2501 commented 3 years ago

i have install scrcpy from scoop

harsh2501 commented 3 years ago

C:\Users\Prity>adb logcat -c

C:\Users\Prity>scrcpy INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy 2101 KB/s (33622 bytes in 0.015s) [server] INFO: Device: Xiaomi Redmi Note 7 Pro (Android 10) INFO: Renderer: direct3d INFO: Initial texture: 1080x2336

C:\Users\Prity>adb logcat -d > logs.txt

no error display and anain scrcpy open and close in few sec and i am unable to control

harsh2501 commented 3 years ago

Screenshot (6) scrcpy turn off on its own in few sec no error i got see this pic

npes87184 commented 3 years ago

C:\Users\Prity>adb logcat -c

C:\Users\Prity>scrcpy INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy 2101 KB/s (33622 bytes in 0.015s) [server] INFO: Device: Xiaomi Redmi Note 7 Pro (Android 10) INFO: Renderer: direct3d INFO: Initial texture: 1080x2336

C:\Users\Prity>adb logcat -d > logs.txt

Is the file logs.txt empty?

no error display and anain scrcpy open and close in few sec and i am unable to control

harsh2501 commented 3 years ago

Nothing is displayed and scrcpy closed

harsh2501 commented 3 years ago

C:\Users\Prity>adb logcat -c C:\Users\Prity>scrcpy INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy 2101 KB/s (33622 bytes in 0.015s) [server] INFO: Device: Xiaomi Redmi Note 7 Pro (Android 10) INFO: Renderer: direct3d INFO: Initial texture: 1080x2336 C:\Users\Prity>adb logcat -d > logs.txt

Is the file logs.txt empty?

no error display and anain scrcpy open and close in few sec and i am unable to control

Nothing is displayed

harsh2501 commented 3 years ago

I think nothing is displayed it mean it's empty

npes87184 commented 3 years ago

I think nothing is displayed it mean it's empty

Because adb logcat -d > logs.txt will redirect the output to file logs.txt. It will not display anything in console. Instead, the log will write to logs.txt. Can you ensure that the logs.txt is empty?

harsh2501 commented 3 years ago

I think nothing is displayed it mean it's empty

Because adb logcat -d > logs.txt will redirect the output to file logs.txt. It will not display anything in console. Instead, the log will write to logs.txt. Can you ensure that the logs.txt is empty?

I don't understand that What I have to do . Tell me what I have to write in the command prompt Eg; Write in command prompt Scrcpy #to run scrcpy If any error copy the error and send Just joking I am a 12year old boy so I can't handle this much of coding please help me

harsh2501 commented 3 years ago

image C:\Users\Prity>adb logcat -c

C:\Users\Prity>scrcpy INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy 2101 KB/s (33622 bytes in 0.015s) [server] INFO: Device: Xiaomi Redmi Note 7 Pro (Android 10) INFO: Renderer: direct3d INFO: Initial texture: 1080x2336

C:\Users\Prity>adb logcat -d > log.txt

C:\Users\Prity>log.txt i got log.txt in note pad and it is so long that i can't past the log text in comment box it is saying that you exceed the limit at last i will say that the log.txt is not empty

the log.txt is this image

harsh2501 commented 3 years ago

I think nothing is displayed it mean it's empty

Because adb logcat -d > logs.txt will redirect the output to file logs.txt. It will not display anything in console. Instead, the log will write to logs.txt. Can you ensure that the logs.txt is empty?

now i can say log.txt is not empty see this image Screenshot (8)

rom1v commented 3 years ago

You just posted a screenshot showing a few lines in the file. This does not help. Just post the file.

harsh2501 commented 3 years ago

Microsoft Windows [Version 10.0.17763.107] (c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\Prity>scrcpy INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy

C:\Users\Prity>adb logcat -c

C:\Users\Prity>scrcpy INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy 2101 KB/s (33622 bytes in 0.015s) [server] INFO: Device: Xiaomi Redmi Note 7 Pro (Android 10) INFO: Renderer: direct3d INFO: Initial texture: 1080x2336

C:\Users\Prity>adb logcat -d > logs.txt

C:\Users\Prity>logs.txt

and log.txt is this logs.txt

harsh2501 commented 3 years ago

You just posted a screenshot showing a few lines in the file. This does not help. Just post the file.

this is the log.txt file logs.txt please kindly help me

harsh2501 commented 3 years ago

Romain Vimont I have pasted the file log.txt please see and tell me what I have to do

harsh2501 commented 3 years ago

@rom1v please see I have posted the log.txt and tell me what I have to do

harsh2501 commented 3 years ago

I have posted the log.txt file for God please please help me

On Thu, 5 Nov, 2020, 12:42 pm Romain Vimont, notifications@github.com wrote:

You just posted a screenshot showing few lines in the file. This does not help. Just post the file.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Genymobile/scrcpy/issues/1872#issuecomment-722189704, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARSW6TDFWEKW7Y2UAXPR64TSOJF6ZANCNFSM4TGBLGJA .

harsh2501 commented 3 years ago

@rom1v @npes87184 I have posted the log.txt file tell me what I have to do

rom1v commented 3 years ago

I know that you posted the file. I'm not available 24h/24 to provide support, so please don't post a lot of additional messages (or open new identical issues), that won't help, and it's annoying.

I don't see anything obvious from the log. Maybe this line:

OMX-VENC: venc_dev: WARN: TemporalLayer: Invalid settings, hardware doesn't support 0 temporal layers

Anyway, it seems a hardware encoder issue.

What if you decrease the definition:

scrcpy -m1024

?

Does it work if you record with screenrecord:

adb shell screenrecord /sdcard/file.mp4
adb pull /sdcard/file.mp4

Is the resulting file ok?

harsh2501 commented 3 years ago

@rom1v the screenrecord is working well no lag and no delay but the scrcpy -m1024 is not it open and close in sec.

rom1v commented 3 years ago

OK, so maybe there are several encoders available but the default one does not work.

Please execute this project to list all encoders: https://github.com/rom1v/CheckVideoCodecs

harsh2501 commented 3 years ago

i can't understand the project please help tell me now what i have to do

harsh2501 commented 3 years ago

how can i list my sever encoders please help @rom1v @npes87184

harsh2501 commented 3 years ago

I have a very bad experience for github and it's team and now I am fed up and I am closing this because I am not getting any response

harsh2501 commented 3 years ago

Thanks for everything but this thing doesn't help me a little bit

rom1v commented 3 years ago

I have a very bad experience for github and it's team

It's not "github and its team" (github is just hosting git projects), it's just me working on my free time.

and now I am fed up and I am closing this because I am not getting any response

Your problem is probably related to your hardware encoder (which does not like the parameters scrcpy requests). I gave you some pointers (like CheckVideoCodecs), but sorry I can't spend hours explaining how everything works (it's perfectly ok not to know, but I don't have time).

Since #1827 is now merged into dev, I suggest you wait for the next release and try to run scrcpy with another encoder (or build the current dev branch following the build instructions if you want).

harsh2501 commented 3 years ago

Bro listen I am not an computer expect so I don't know how to run scrcpy from another encoder. Thanks for your help I am very happy that you replied for this last time I know everyone is not free as me. I am a YouTube content creator I pay game so now I need to stream them live with my audience so I need scrcpy to copy my screen but it's ok . I you have any idea tell me . Please try not to use though word please and one more things please suggest me video that I can see and follow them as I say I am not a computer expect

rom1v commented 3 years ago

Here are binaries: https://github.com/Genymobile/scrcpy/pull/1827#issuecomment-725933512

To test with another encoder:

scrcpy --encoder _  # will list the available encoders in the error message
scrcpy --encoder ENCODER_NAME
harsh2501 commented 3 years ago

Here are binaries: #1827 (comment)

To test with another encoder:

scrcpy --encoder _  # will list the available encoders in the error message
scrcpy --encoder ENCODER_NAME

C:\Users\Prity>scrcpy --encoder _ C:\Users\Prity\scoop\apps\scrcpy\current\scrcpy.exe: unknown option -- encoder

C:\Users\Prity>scrcpy --encoder C:\Users\Prity\scoop\apps\scrcpy\current\scrcpy.exe: unknown option -- encoder

C:\Users\Prity>

this is what i get @rom1v

rom1v commented 3 years ago

You need the binaries from here: https://github.com/Genymobile/scrcpy/pull/1827#issuecomment-725933512

harsh2501 commented 3 years ago

C:\Users\Prity>scrcpy INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy 475 KB/s (33622 bytes in 0.069s) [server] INFO: Device: Xiaomi Redmi Note 7 Pro (Android 10) INFO: Renderer: direct3d INFO: Initial texture: 1080x2336

C:\Users\Prity>scrcpy --encoder _ C:\Users\Prity\scoop\apps\scrcpy\current\scrcpy.exe: unknown option -- encoder

C:\Users\Prity>scrcpy --encoder ENCODER_NAME C:\Users\Prity\scoop\apps\scrcpy\current\scrcpy.exe: unknown option -- encoder

C:\Users\Prity>scrcpy INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy 515 KB/s (33622 bytes in 0.063s) [server] INFO: Device: Xiaomi Redmi Note 7 Pro (Android 10) INFO: Renderer: direct3d INFO: Initial texture: 1080x2336

C:\Users\Prity>scrcpy INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy 1947 KB/s (33622 bytes in 0.016s) [server] INFO: Device: Xiaomi Redmi Note 7 Pro (Android 10) INFO: Renderer: direct3d INFO: Initial texture: 1080x2336

this it what i get and it's not working

harsh2501 commented 3 years ago

i have deleted old version and install the new from binaries which is above mention by you

rom1v commented 3 years ago

You don't use the correct binary. Take v1.17 now, it has the option.

harsh2501 commented 3 years ago

From where I can get this v1. 17 Plzz can u tell me