Repository navigation
feat: add phonecam setup for Linux deps and persistent loopback - #58
Merged
Merged
Conversation
Install GStreamer and v4l2loopback with sudo phonecam setup, load an OBS-aware /dev/video10, and persist phonecam-owned modprobe files. Keep phonecam install print-only. --dry-run prints the plan without changing the system.
A loaded module with empty/-1 video_nr made modprobe a no-op. Always rmmod before applying PhoneCam options, re-plan after package auto-load, merge auto-assigned OBS on video0, and treat ufw user.rules as already-allows when status needs root.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds
sudo phonecam setupas the root helper that actually installs Linux receive-path packages and persists an OBS-aware PhoneCamv4l2loopbacknode.phonecam installstays print-only./etc/os-releaseand installs GStreamer + v4l2loopback (pacman / dnf / apt), plus matching kernel headers for DKMS where needed./dev/video10now and persists PhoneCam-owned files at/etc/modprobe.d/phonecam.confand/etc/modules-load.d/phonecam.conf.--dry-runprints the plan and changes nothing.phonecam startstill does not require root; if/dev/video10is missing it tells the user to run setup.-1video_nris a no-op secondmodprobe) so setup actually createsvideo10. Re-plans after package auto-load. Treats ufwuser.rulesas already-allows when status needs root.Does not ship distro packages or auto-modprobe from a package postinst. Does not overwrite an OBS-owned
/etc/modprobe.d/v4l2loopback.conf. Does not steal/dev/video10if it exists with a non-PhoneCam label.Why
phonecam installonly printed hints. After reboot the module is often missing, and a secondmodprobe video_nr=10is a no-op if OBS already loaded v4l2loopback. Setup applies the receive path and persists a PhoneCam node without fighting OBS.OBS / exclusive_caps
exclusive_capsis a per-device CSV, not a global boolean.exclusive_caps=1withdevices=2only enables the first slot (Y,N,…) on current v4l2loopback — OBS on/dev/video0gets exclusive caps, PhoneCam on/dev/video10does not.Setup:
video_nr=10 card_label=PhoneCam exclusive_caps=1/dev/video10with exclusive caps on: leave itrmmodonly if nothing holds the devices, then reloaddevices=2 video_nr=0,10 card_label="OBS Virtual Camera,PhoneCam" exclusive_caps=1,1(or merge extra nodes the same way)/etc/modprobe.d/v4l2loopback.confFedora / RPM Fusion
v4l2loopbackandgst-libavare not in stock Fedora. Setup enables RPM Fusion Free (rpmfusion-free-release-$VERSION_ID) when/etc/yum.repos.d/rpmfusion-free.repois missing. If the version cannot be read or enable/install fails, it returns the doctor-style line:v4l2loopback and gst-libav are not in stock Fedora; enable RPM Fusion (https://rpmfusion.org/Configuration) then re-run: sudo phonecam setupHow tested
From
linux-clion this branch (feat/phonecam-setup@ 2cbd25c):Both passed (Go 1.22.12). Setup/doctor/cli coverage includes Fedora Fusion enable/fail, OBS merge with
exclusive_caps=1,1, refusal to steal video10 / overwrite OBS conf, and default-module reload sovideo10is created.Android is out of scope for this slice.