scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

Mobile screen mirroring does not display

Open locklocklock1206 opened this issue 1 year ago • 4 comments

Environment

  • OS: Debian
  • scrcpy version: 2.3
  • installation method: manual build
  • device model:
  • Android version: 11

The phone is connected to the computer via USB, and after scrcpy, it does not appear on the computer screen。

Scrcpy - Vdebug Print the text:

scrcpy 2.3 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  uwfipf69cqfetkaa                device  2312DRAABC
DEBUG: Device serial: uwfipf69cqfetkaa
DEBUG: Using server: /usr/local/share/scrcpy/scrcpy-server
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 15.2 MB/s (65851 bytes in 0.004s)
[server] INFO: Device: [Xiaomi] Redmi 2312DRAABC (Android 13)
DEBUG: Server connected
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
[server] DEBUG: Using audio encoder: 'c2.android.opus.encoder'
INFO: Renderer: opengl
INFO: OpenGL version: 3.0 build 1.16@6099580
INFO: Trilinear filtering enabled
DEBUG: Using icon: /usr/local/share/icons/hicolor/256x256/apps/scrcpy.png
ERROR: Could not open icon image: /usr/local/share/icons/hicolor/256x256/apps/scrcpy.png
WARN: Could not load icon
DEBUG: Demuxer 'video': starting thread
DEBUG: Demuxer 'audio': starting thread
[server] DEBUG: Using video encoder: 'c2.mtk.avc.encoder'
INFO: [FFmpeg] I [omx_find_component] : [1552] Using OMX.IMG.MSVDX.Decoder.AVC
<6> [3055.130436] (149904) imgvideo:omx: IMG_OMD_ComponentInit Done.
WARN: [FFmpeg] W [omx_set_output_port_format] : [1750] eColorFormat 21 eCompressionFormat 0
WARN: [FFmpeg] W [omx_set_port_definition] : [1772] framerate is unknow
WARN: [FFmpeg] W [omx_set_component_framerate] : [1845] framerate is unknow
WARN: [FFmpeg] W [omx_verify_support_for_profile_and_level] : [1938] setting profile(2147483647) and level(2147483647) not supported by component
<6> [3055.134918] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.136552] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.138351] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.140033] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.141865] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.143583] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.145363] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.147102] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.148912] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.150588] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.152518] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.154226] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.156063] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.157916] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.159803] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.161569] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.163331] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.165114] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.166833] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.168799] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [3055.170648] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.173713] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.176801] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.179968] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.183194] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.186355] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.189132] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.190986] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.192853] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.194609] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.196287] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.198065] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
INFO: Texture: 1080x2400
<6> [3055.275462] (149904) imgvideo:omx: VDEC_STOPSTATUS_CLOSED_GOP
<6> [3055.275490] (149904) imgvideo:omx: VDEC_STOPSTATUS_RECONFIGURE
<6> [3055.275519] (149904) imgvideo:omx: Port Enabled: 1
<6> [3055.275588] (149904) imgvideo:omx: Released and Returned Output buffers
<6> [3055.275600] (149904) imgvideo:omx: PSC: Framerate (Q16) :0, Height :2400, Width :1080, Stride :1088, SliceHeight: 2400 BitRate: 0
<6> [3055.275613] (149904) imgvideo:omx: Left :0  Top :0 Width :1080 Height :2400
<6> [3055.337190] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.339927] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.343078] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.346256] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.349934] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.354048] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
<6> [3055.356935] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
<6> [3055.358677] (149904) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 3919872, coreId: 0
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: Could not update texture: Parameter 'Vplane' is invalid
DEBUG: [Audio] Buffer underflow, inserting silence: 240 samples
DEBUG: Could not update texture: Parameter 'Vplane' is invalid
DEBUG: Could not update texture: Parameter 'Vplane' is invalid
DEBUG: Could not update texture: Parameter 'Vplane' is invalid
DEBUG: Could not update texture: Parameter 'Vplane' is invalid
DEBUG: Could not update texture: Parameter 'Vplane' is invalid
DEBUG: Could not update texture: Parameter 'Vplane' is invalid
DEBUG: Could not update texture: Parameter 'Vplane' is invalid

Looking forward to your answer

locklocklock1206 avatar Jan 31 '24 08:01 locklocklock1206

Where does your ffmpeg build.come from? It seems it is incomplete/buggy, it can't even decode the icon. And it seems it fails to decode the video stream too.

rom1v avatar Jan 31 '24 08:01 rom1v

FFmpeg comes from the kylin system I downloaded , Unable to locate the icon may be because I did not place the icon in the designated folder. It fails to decode the video stream. What should I do to solve this problem

If I downloaded Scrcpy using 'aptinstall Scrcpy', this problem will occur:

INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 fil...shed. 5.5 MB/s (24773 bytes in 0.004s)
java.io.FileNotFoundException: /data/system/theme_config/theme_compatibility.xml: open failed: ENOENT (No such file or directory)
	at libcore.io.IoBridge.open(IoBridge.java:574)
	at java.io.FileInputStream.<init>(FileInputStream.java:160)
	at java.io.FileInputStream.<init>(FileInputStream.java:115)
	at java.io.FileReader.<init>(FileReader.java:60)
	at miui.content.res.ThemeCompatibilityLoader.getVersion(ThemeCompatibilityLoader.java:108)
	at miui.content.res.ThemeCompatibilityLoader.getConfigDocumentTree(ThemeCompatibilityLoader.java:126)
	at miui.content.res.ThemeCompatibilityLoader.loadConfig(ThemeCompatibilityLoader.java:59)
	at miui.content.res.ThemeCompatibility.<clinit>(ThemeCompatibility.java:31)
	at miui.content.res.ThemeCompatibility.isThemeEnabled(ThemeCompatibility.java:111)
	at android.content.res.MiuiResourcesImpl.<clinit>(MiuiResourcesImpl.java:41)
	at android.content.res.MiuiResources.<init>(MiuiResources.java:58)
	at android.content.res.IMiuiResourceImpl.createResources(IMiuiResourceImpl.java:13)
	at android.content.res.ThemeManagerStub.createMiuiResources(ThemeManagerStub.java:56)
	at android.content.res.Resources.getSystem(Resources.java:251)
	at android.app.LoadedApk.<init>(LoadedApk.java:257)
	at android.app.ContextImpl.createSystemContext(ContextImpl.java:3063)
	at android.app.ActivityThread.getSystemContext(ActivityThread.java:2878)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.genymobile.scrcpy.Workarounds.fillAppInfo(Workarounds.java:66)
	at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:56)
	at com.genymobile.scrcpy.Server.scrcpy(Server.java:34)
	at com.genymobile.scrcpy.Server.main(Server.java:163)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:388)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
	at libcore.io.Linux.open(Native Method)
	at libcore.io.ForwardingOs.open(ForwardingOs.java:563)
	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:274)
	at libcore.io.IoBridge.open(IoBridge.java:560)
	... 23 more
<6> [5020.301435] (221252) imgvideo:omx: IMG_OMD_ComponentInit Done.
<6> [5020.304833] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.305653] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.306471] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.307389] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.308459] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.309452] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.310560] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.311543] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.312543] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.313493] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.314565] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.315682] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.316806] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.317858] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.318912] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.319926] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.320892] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.321844] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.322946] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.323850] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 0 of size: 2097152, coreId: 0
<6> [5020.324944] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 12443648, coreId: 0
<6> [5020.330741] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 12443648, coreId: 0
<6> [5020.336187] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 12443648, coreId: 0
<6> [5020.341723] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 12443648, coreId: 0
<6> [5020.347479] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 12443648, coreId: 0
<6> [5020.353089] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 12443648, coreId: 0
<6> [5020.358518] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 12443648, coreId: 0
<6> [5020.363866] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 12443648, coreId: 0
<6> [5020.369457] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 12443648, coreId: 0
<6> [5020.375163] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 12443648, coreId: 0
<6> [5020.380642] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 12443648, coreId: 0
<6> [5020.386333] (221252) imgvideo:omx: VDECUtil_GetVdecBuf Allocating buffer at port index 1 of size: 12443648, coreId: 0
INFO: Initial texture: 1080x2400
<6> [5020.448048] (221252) imgvideo:omx: #Total number of Frames Decoded: 0
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
	at com.genymobile.scrcpy.wrappers.SurfaceControl.setDisplaySurface(SurfaceControl.java:75)
	at com.genymobile.scrcpy.ScreenEncoder.setDisplaySurface(ScreenEncoder.java:178)
	at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:70)
	at com.genymobile.scrcpy.Server.scrcpy(Server.java:34)
	at com.genymobile.scrcpy.Server.main(Server.java:163)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:388)
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invoke(Native Method)
	at com.genymobile.scrcpy.wrappers.SurfaceControl.setDisplaySurface(SurfaceControl.java:73)
	... 6 more
Caused by: java.lang.IllegalArgumentException: displayToken must not be null
	at android.view.SurfaceControl$Transaction.setDisplaySurface(SurfaceControl.java:3651)
	at android.view.SurfaceControl.setDisplaySurface(SurfaceControl.java:2514)
	... 8 more
WARN: Device disconnected

locklocklock1206 avatar Jan 31 '24 09:01 locklocklock1206

Unable to locate the icon may be because I did not place the icon in the designated folder.

OK (but if you ninja install it automatically installs the icon).

It seems there is a problem at least with your decoder. Just in case, try with a lower resolution (scrcpy -m1024).

rom1v avatar Jan 31 '24 10:01 rom1v

I tried, but it didn't work.

locklocklock1206 avatar Feb 01 '24 01:02 locklocklock1206