We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use scrcpy as a virtual webcam with the new Video4Linux feature, but today I've noticed that some applications can't list the device I've created.
It seems that, awaiting Pipewire support, it's common to use the symlink /dev/v4l/by-id/ to list webcams.
/dev/v4l/by-id/
This symlink is created by an existing udev rule in most distributions, but only for USB physical devices, not virtual ones.
I found the v4l2loopback issue #96 indicating to manually create another udev rule.
It works for me and I think that it might be useful to add this information to the doc.
OS: Debian GNU/Linux trixie trixie/sid x86_64 Kernel: 6.6.13-amd64 WM: i3 (X11) scrcpy: 2.3.1 https://github.com/Genymobile/scrcpy Dependencies (compiled / linked):
Persistent v4l2loopback devices conf:
/etc/modules-load.d/v4l2loopback.conf
v4l2loopback
/etc/modprobe.d/v4l2loopback.conf
options v4l2loopback devices=2 exclusive_caps=1,1 video_nr=0,2 card_label=android-cam,fake-cam
/etc/udev/rules.d/60-persistent-v4l2loopback.rules
KERNEL=="video*", ATTR{max_openers}=="?*", SYMLINK+="v4l/by-id/v4l2loopback-$attr{name}-video"
Systemd service to toggle the webcam:
~/.config/systemd/user/scrcpy-cam.service
[Unit] Description=Scrcpy - virtual webcam from ADB Device PartOf=graphical-session.target StartLimitIntervalSec=5 ConditionUser=!root [Service] Type=simple ExecStart=scrcpy --video-source=camera --no-audio --camera-id=0 --max-size=1000 --camera-ar=sensor --orientation=0 --camera-fps=15 --v4l2-sink=/dev/video0 --no-video-playback --v4l2-buffer=0 --no-clipboard-autosync --no-cleanup --video-codec=h264 Restart=no StandardOutput=journal StandardError=journal SyslogIdentifier=scrcpy-cam Slice=app.slice
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue
I use scrcpy as a virtual webcam with the new Video4Linux feature, but today I've noticed that some applications can't list the device I've created.
It seems that, awaiting Pipewire support, it's common to use the symlink
/dev/v4l/by-id/
to list webcams.This symlink is created by an existing udev rule in most distributions, but only for USB physical devices, not virtual ones.
Solution
I found the v4l2loopback issue #96 indicating to manually create another udev rule.
It works for me and I think that it might be useful to add this information to the doc.
Context
OS: Debian GNU/Linux trixie trixie/sid x86_64
Kernel: 6.6.13-amd64
WM: i3 (X11)
scrcpy: 2.3.1 https://github.com/Genymobile/scrcpy
Dependencies (compiled / linked):
Persistent v4l2loopback devices conf:
/etc/modules-load.d/v4l2loopback.conf
/etc/modprobe.d/v4l2loopback.conf
/etc/udev/rules.d/60-persistent-v4l2loopback.rules
The solution suggested above.
Systemd service to toggle the webcam:
~/.config/systemd/user/scrcpy-cam.service
[Unit] Description=Scrcpy - virtual webcam from ADB Device PartOf=graphical-session.target StartLimitIntervalSec=5 ConditionUser=!root [Service] Type=simple ExecStart=scrcpy --video-source=camera --no-audio --camera-id=0 --max-size=1000 --camera-ar=sensor --orientation=0 --camera-fps=15 --v4l2-sink=/dev/video0 --no-video-playback --v4l2-buffer=0 --no-clipboard-autosync --no-cleanup --video-codec=h264 Restart=no StandardOutput=journal StandardError=journal SyslogIdentifier=scrcpy-cam Slice=app.slice
The text was updated successfully, but these errors were encountered: