Closed ImAtWork420 closed 1 month ago
See discussions in #4392 about logical cameras.
I think there’s a misunderstanding. The four cameras that show up are working fine, including camera ID=4. However, the phone has four cameras on the back, not just two. Sorry for not being clear about that.
scrcpy --video-source=camera --camera-id=0 --no-audio --camera-fps=60 --camera-size=1920x1080
scrcpy 2.7 <https://github.com/Genymobile/scrcpy>
INFO: Camera video source: control disabled
INFO: ADB device found:
INFO: --> (tcpip) 192.168.1.240:5555 device SM_S928B
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 163.8 MB/s (71200 bytes in 0.000s)
[server] INFO: Device: [samsung] samsung SM-S928B (Android 14)
[server] INFO: Using camera '0'
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 24.0.9-0ubuntu0.1
INFO: Trilinear filtering enabled
INFO: Texture: 1920x1080
scrcpy --video-source=camera --camera-id=4 --no-audio
scrcpy 2.7 <https://github.com/Genymobile/scrcpy>
INFO: Camera video source: control disabled
INFO: ADB device found:
INFO: --> (tcpip) 192.168.1.240:5555 device SM_S928B
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 150.3 MB/s (71200 bytes in 0.000s)
[server] INFO: Device: [samsung] samsung SM-S928B (Android 14)
[server] INFO: Using camera '4'
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 24.0.9-0ubuntu0.1
INFO: Trilinear filtering enabled
INFO: Texture: 640x480
I managed to get it to work by replacing CameraCapture.java and LogUtils.java with the same files from https://github.com/chenxiaolong/scrcpy/commits/phys. Then, I fixed a few errors, mostly by deleting if statements. I will attach the two modified files; I had to change the extension to .txt to be able to upload them. CameraCapture.txt LogUtils.txt
By the way, rom1v, sorry for not reading your comment well enough.
Environment
Describe the bug
when i use scrcpy --list-cameras i only get 4 camras (2 in front, 2 in back), but the phone has 4 in back. 0 to 3 works fine, and i can iven use id 4.