Open mukyamika opened 1 month ago
INFO: Texture: 3840x2160 [server] ERROR: Encoding error: java.lang.IllegalArgumentException: null
Does it work with a lower resolution?
scrcpy --video-source=camera --no-audio --v4l2-sink=/dev/video2 -m1024
Since the error is on the device side, it does not seem related to v4l2. Does camera mirroring work at that resolution without v4l2:
scrcpy --video-source=camera
?
It works! Thanks! Yes, the camera mirroring works by itself, streaming video with 3840x2160 resolution. I can push up to 1920x1440 with v4l2
the camera mirroring is really clean I can use it as webcam on OBS stream via capture windows.....is it possible to stream the video captured by camera as v4l2 device? I tried to combine the command for both function and receive this
scrcpy --video-source=camera --no-audio --v4l2-sink=/dev/video2 scrcpy 2.6.1 https://github.com/Genymobile/scrcpy INFO: Video orientation is locked for v4l2 sink. See --lock-video-orientation. INFO: Camera video source: control disabled INFO: ADB device found: INFO: --> (usb) 1a45878e0403 device M2003J15SC /usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 15.6 MB/s (71112 bytes in 0.004s) [server] INFO: Device: [Xiaomi] Redmi M2003J15SC (Android 12) INFO: Renderer: opengl INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2 INFO: Trilinear filtering enabled [server] INFO: Using camera '0' INFO: v4l2 sink started to device: /dev/video2 INFO: Texture: 3840x2160 [server] ERROR: Encoding error: java.lang.IllegalArgumentException: null WARN: Device disconnected [server] ERROR: Exception on thread Thread[video,5,main] java.lang.IllegalArgumentException at android.media.MediaCodec.native_configure(Native Method) at android.media.MediaCodec.configure(MediaCodec.java:2176) at android.media.MediaCodec.configure(MediaCodec.java:2092) at com.genymobile.scrcpy.video.SurfaceEncoder.streamCapture(SurfaceEncoder.java:81) at com.genymobile.scrcpy.video.SurfaceEncoder.lambda$start$0$com-genymobile-scrcpy-video-SurfaceEncoder(SurfaceEncoder.java:268) at com.genymobile.scrcpy.video.SurfaceEncoder$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) at java.lang.Thread.run(Thread.java:1012)