-
-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Everything appears working but no window opens (on X11, not Wayland) #4519
Comments
Yes, the problem is on the device, it means that MediaCodec does not produce any frame for some reason. |
So that is basically the end of debugging, then? It just doesn't work for reasons unknown and unknow-able? This just reinforces my prejudice of Android as a steaming pile of **** that we basically treat as non-deterministic because almost nobody understands it deeply enough to problem-solve in the traditional sense :( |
This is a Wayland / Scrpy problem and has nothing to do with Android. You can work round it by calling There is already an issue about it here: #3431 |
I usually try not to be snarky, but, wow, did you actually read the subject line on this bug report? I am using X, not Wayland. So unless there is a different bug in scrcpy, this does in fact appear to be an Android problem. |
@haunma Btw, does it work with screenrecord?
|
@rom1v, as mentioned in the initial bug report, it is hit or miss. I was able to get a brief recording a couple of times, but it doesn't always work, often leaving a zero-length file. My phone is old (Moto Z Play) and running LineageOS Android 18.1. I imagine there is something odd about it. Chalk it up to Android fragmentation? Anyway, my use case for scrcpy has passed, for now. Maybe next time I need something like that I will give it another go. If you're reasonably confident the issue is on the device, I have no objections to closing this. |
Environment
After using the scrcpy --otg trick to authorize my phone with adb (the phone screen is dead), I am able to run scrcpy. The default codec fails with java.lang.IllegalStateException in MediaCodec, but the output of scrcpy --list-encoders gives
and some of these are working. Or at least, they seem to be working. I get no errors or problems indicated in the scrcpy output even at "verbose" level, but no window opens. Typical output is
I have tried
adb shell screenrecord /sdcard/file.mp4
and that works---at least sometimes. It only seems to work when I run it right after unlocking the phone (with fingerprint sensor), otherwise I get a zero length file. I try to run scrcpy the same way but still no luck. Tried all the codecs. Tried various resolutions. Same result: apparent success in every respect except no video.Also,
scrcpy --video-codec=h264 --video-encoder='OMX.google.h264.encoder' --no-audio --record=file.mkv --no-playback
seems to work when run but the video file is always zero length. I initially thought the problem could be with my tiling window manager but this seems to indicate that there really is no encoded video coming through the pipe. Correct?The text was updated successfully, but these errors were encountered: