wikibackup/phone-webcam.md

1.2 KiB

title description published date tags editor dateCreated
Using your android phone as a webcam true 2024-07-29T18:39:45.995Z parch, parchlinux, scrcpy, webcam markdown 2024-07-29T18:39:35.982Z

How to use an android phone as a webcam in Parch Linux?

Installing the dependencies

first of all you need to install some dependencies:

sudo pacman -S scrcpy dkms base-devel linux-headers v4l2loopback-dkms

then you need to load the module:

sudo modprobe v4l2loopback exclusive_caps=1

Usage

Camera Sharing

For using the front camera, first enable usb debugging in your phone, then connect your phone via cable and run this command in terminal:

scrcpy --video-source=camera --camera-size=1920x1080 --camera-facing=front --v4l2-sink=/dev/video0 --no-playback --no-window

For the back camera just change --camera-facing=front to --camera-facing=back .

testing camera

just open obs, or run this command:

ffplay /dev/video0

mic sharing

For microphone you can run this command:

scrcpy --no-video --audio-source=mic --no-window

this would share your phone mic as system audio.