Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
103.02k stars 10.01k forks source link

WARN: Camera disconnected #4865

Open tudorapo opened 3 weeks ago

tudorapo commented 3 weeks ago

Environment

I am running the camera through scrcpy and after a couple of minutes I get this:

[server] WARN: Camera disconnected

Stopping scrcpy and starting it again makes it work, the video continues.

# scrcpy --video-source=camera --no-audio --camera-facing=back  --v4l2-sink=/dev/video2 --disable-screensaver 
scrcpy 2.3.1 <https://github.com/Genymobile/scrcpy>
INFO: Video orientation is locked for v4l2 sink. See --lock-video-orientation.
INFO: Camera video source: control disabled
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
INFO: ADB device found:
INFO:     -->   (usb)  CODE                     device  SM_A536B
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 132.1 MB/s (66007 bytes in 0.000s)
[server] INFO: Device: [samsung] samsung SM-A536B (Android 14)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 23.3.5-1
INFO: Trilinear filtering enabled
[server] INFO: Using camera '0'
INFO: v4l2 sink started to device: /dev/video2
INFO: Texture: 4624x3468
[server] WARN: Camera disconnected
^C

What this could be? A timeout in the phone?

rom1v commented 3 weeks ago

This can happen if you start a new capture (either via scrcpy or an app on the phone).

tudorapo commented 3 weeks ago

Apparently if I limit the resolution down to fullhd it runs much longer. At least a hour, it's still running.