Skip to content
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

v4l2loopback error #5288

Open
toto6976 opened this issue Sep 12, 2024 · 11 comments
Open

v4l2loopback error #5288

toto6976 opened this issue Sep 12, 2024 · 11 comments

Comments

@toto6976
Copy link

toto6976 commented Sep 12, 2024

Hi,
here is the error message using v4l2loopback :

$ scrcpy --v4l2-sink=/dev/video1
scrcpy 1.21 <https://github.com/Genymobile/scrcpy>
INFO: Video orientation is locked for v4l2 sink. See --lock-video-orientation.
/usr/share/scrcpy/scrcpy-server: 1 fil...shed. 0.2 MB/s (39473 bytes in 0.166s)
[server] INFO: Device: LGE LG-H870 (Android 11)
INFO: Renderer: opengl
INFO: OpenGL version: 2.1 Mesa 23.2.1-1ubuntu3.1~22.04.2
WARN: Trilinear filtering disabled (OpenGL 3.0+ or ES 2.0+ required)
INFO: Initial texture: 1440x2880
ERROR: Failed to open output device: /dev/video1
ERROR: Could not open frame sink 1
ERROR: Could not open decoder sinks
ERROR: Could not open packet sink 0
ERROR: Could not open stream sinks
WARN: Device disconnected
WARN: Killing the server...

I posted the message in the wrong place. Can you move it to the correct section please?
https://github.com/umlaeute/v4l2loopback/issues

@rom1v
Copy link
Collaborator

rom1v commented Sep 12, 2024

scrcpy 1.21 https://github.com/Genymobile/scrcpy

First of all, that's a very old and obsolete version.

ERROR: Failed to open output device: /dev/video1

How did you create the v4l2loopback before calling scrcpy?

@toto6976
Copy link
Author

@rom1v
Copy link
Collaborator

rom1v commented Sep 12, 2024

v4l2-ctl --list-devices
ls /dev/video*

?

@toto6976
Copy link
Author

v4l2-ctl --list-devices
I connect the phone with ssh tunnel : so Acer is the server, not the phone

$ v4l2-ctl --list-devices
Acer Crystal Eye webcam: Acer C (usb-0000:00:1a.7-6):
	/dev/video0
	/dev/video1
	/dev/media0
$ ls /dev/video*
/dev/video0  /dev/video1

@rom1v
Copy link
Collaborator

rom1v commented Sep 12, 2024

I connect the phone with ssh tunnel

First, does it work without an ssh tunnel? (this might add permissions issues)
You use an SSH tunnel between what and what here?

@toto6976
Copy link
Author

toto6976 commented Sep 12, 2024

You use an SSH tunnel between what and what here?

#5254

Your server: 65.xx.xxx.yyy (machine with local ip: 192.168.1.72).
Your client: localhost (machine with the local ip: 192.168.0.251).

I assume both computers are on Linux.

From the client, execute:

ssh -CN -L5038:localhost:5037 -R27183:localhost:27183 65.xx.xxx.yyy
# keep this open

@toto6976
Copy link
Author

First, does it work without an ssh tunnel?

I will try this afternoon

@rom1v
Copy link
Collaborator

rom1v commented Sep 12, 2024

So your v4l2loopback module must be on the local client (not the server).

Scrcpy uses the tunnel to communicate to the adb daemon running on the remote computer (where the phone is connected), and displays (either in a window or to a v4l2 sink) the content locally.

@toto6976
Copy link
Author

So, i am at home : on my pc, i follow this : https://github.com/Genymobile/scrcpy/blob/master/doc/v4l2.md

error with : sudo modprobe v4l2loopback

$ sudo modprobe v4l2loopback
modprobe: FATAL: Module v4l2loopback not found in directory /lib/modules/6.0.0-kali6-amd64

@rom1v
Copy link
Collaborator

rom1v commented Sep 12, 2024

So you must install it (as explained at the top of the page you linked).

@toto6976
Copy link
Author

toto6976 commented Sep 12, 2024

it is installed. But I still get the modprobe error...

sudo apt install v4l2loopback-dkms                    
v4l2loopback-dkms est déjà la version la plus récente (0.13.2-1).
Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 761

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants