-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Video goes to black screen and the Scrcpy crashes #1821
Comments
Could you play a video while you record with:
? |
I wanted to open issue about same thing today. Actually for me it crashes at random times, even in idle state. Screen goes black for a second and then window closes. For me it is unrelated with running a video. I run with scrcpy-win64-v1.16\scrcpy-noconsole.exe -wS -m 2160 --render-driver=opengl --max-fps 60 --bit-rate 16M |
It's probably a render driver issue. Could you try without |
It crashed with direct3d as well as i tried previously. Actually this is the reason why I switched to opengl as I also thought it is render driver issue. |
What's the output in the console when it crashes? (start |
Couple of questions. I'm assuming run that command from Konsole after I launch Scrcpy and then the video on the phone? Second won't that save it to the SD card instead of the system? |
No, without scrcpy at all: I suspect that the problem is that your hardware is not able to decode/display a video while capturing the screen. |
I tested again, this time with scrcpy.exe and direct3d When it crashed, in cmd shows: I can use the same command right after and reconnect. So i don't think is a network issue. |
https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#device-disconnected |
I am on wi-fi so no usb cable. Also it happens super random i can use it for some minutes and crash or one hour straight and no problem. |
It's an If you execute |
when it crashes i still see it so adb it's not disconnecting: however i got this error in logcat right before crashing: 10-10 04:53:04.955 1693 2312 V AlarmManager: Triggering alarm #0: 2 when =2965835 package =com.android.networkstack.inprocess operation = null li |
Can the Windows specific stuff be moved to it's own issue ticket? |
Yes, that's expected that it still appears here, but you get a disconnection. Check with A workaround is planned to auto-reconnect on disconnection: #721 (comment)
Sorry for the thread hijack. |
OK the command just sits there doing nothing . |
It saves a file to So it seems it does not cause problems to your Android video playback? |
Sorry too for the hijack, I am trying to figure out if we are on the same common ground. I am still not convinced about what causes these crashes.. @SecretAgentAgentX can you reproduce the issue every time? Did the crash only occured when playing a video? It might not be related with host OS, but rather with the connectivity handling. May I ask your device's (phone) specs? |
@rom1v update: i left logcat open and indeed the adb shell connection dropped. so it is more related to this that actually to scrcpy.. Maybe android is killing the connection for some reason in my case |
@fusionneur not now but tomorrow morning I'll just launch Scrcpy and put the phone through it's paces and see if Scrcpy crashes without a video being played. Then we'll know if we possibly have the same issue. @rom1v So as long as the video is recording correctly the Konsole output will look like above? |
@fusionneur you may be on to something, cause I've seen in the past Android kill services. |
it would be interesting to see if you get same logcat on crash. i think in my case, there's something wrong with my dhcpclient not being able to renew ip properly (note that i have quite a complex setup: magisk + edxposed + afwall+netguard+xprivacyLua+shelter) 10-10 02:53:34.805 1535 3179 D DhcpClient: Broadcasting DHCPREQUEST ciaddr=192.168.0.X request=0.0.0.0 serverid=null The first 4 lines appear multiple times in the log but without crashing.. i think only after several retries it drops , more exactly when the dhcp lease expires.. But also could be a permission or xprivacy permission issue , selinux,firewall issue or even firmware. i might be wrong though, I will dig into this further today |
Good morning I just did my above test and ran the phone through it's paces and no issues with Scrcpy. I even navigated to the file explorer and played the first minute of music video that is on the SD card without issue. I doubt the below will help any, but just in case I'm posting it any way.
|
Update: I found in afwall log, that it was blocking dhcp broadcast whenever IP renewal was about to happen. To be honest i don't know why this happens, because system (pid 1000) is allowed on LAN and the 'phone wlan0 <> router gateway IP' connections on ports 67/68 are ok...only broadcasts are blocked. I am going to raise an issue to ukanth/afwall maybe we can shed some light on this matter Sorry for the big hijack :) Please let us know if you still see disconnects even after prolonged usage. |
I finally managed to workaround my disconnection issue with a custom script set in afwall: I opened an issue at ukanth/afwall ukanth/afwall#1149 @rom1v you might be interested of one reason why some folks might get random disconnections due to afwall |
@rom1v I'm not understanding your one comment about the hardware sicne on a AM3+ 6300 and a nVidia 750 I had no such issues with videos, but supposedly on a AM4 Ryzen 3 3200g and a nVidia 1650 the hardware is incapable of supporting video playback through Scrcpy from the phone? |
I depends on what you mean by "ultmiately crashes".
What's the output in the scrcpy console when it "crashes", and are there errors in |
Looks like I was mistaken. I just clicked in the Scrcpy window after it went black and briefly got the video back before it went black again. Once again I clicked in the Scrcpy window and got the progress bar for the video and the other items for it's player. So it looks like the video is playing in Scrcpy but for some reason it itself is going black. I even had the TVMA message in the upper left corner but no viewable video.
|
Oh so it's just a video with DRM? Does it work in other players, like vlc? |
it's a web player. Quibi to be specific. |
@rom1v I honestly couldn't tell you if it's DRM or not. If so is that the issue? Have one additional question and that is how do I make a shortcut for Scrcpy so I don't have to launch Konsole every time. I know from past experience with Scrcpy it's possible. Thanks |
If you just get a black screen on a video, probably.
On KDE: https://docs.kde.org/trunk5/en/applications/fundamentals/shortcuts.html |
Sorry my bad should of asked where is the executable for Scrcpy so I can create shortcuts, cause launching from Konsole doesn't tell you where it's actually launching the program from. Thanks |
which scrcpy |
https://github.com/Genymobile/scrcpy scrcpy 1.16-1 in the chaotic aur repository. |
@SecretAgentAgentX type |
LOL you literally meant which scrpy. Thanks for that. |
When I launch Scrxpy and attempt to watch a video it plays for a few seconds then goes to a black screen and ultimately crashes. The video can be seen still playing on the phone, so it is something with Scrcpy. I tried with both Quibi and Youtube and it's the same. On a secondary note I noticed that with this install of Scrcpy that the sound is not being ported to the computer like with past installs of Scrcpy.
The text was updated successfully, but these errors were encountered: