Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Possibly optional steps that improve resolution.
- # These must be done as `root`.
- # Source: https://www.dev47apps.com/droidcam/linux/
- rmmod v4l2loopback-dc
- insmod /lib/modules/`uname -r`/video/v4l2loopback-dc.ko width=1920 height=1080
- # Open DroidCam(X) on Android device. Start it up. Get IP address and port.
- # In this example, the IP address is 192.168.1.39 and the port is 4747.
- # Put this in one shell to create a /dev/videoN node that other programs can connect to.
- # (I did this as `root`, but I'm not sure if `root` is needed.)
- droidcam-cli -a -v 192.168.1.39 4747
- #```
- #Client v2.0.0
- #Video: /dev/video0
- #Audio: hw:3,1,0
- #```
- # Alternatively, if the device has ADB debugging over USB enabled
- # in its developer options, then droidcam-cli can connect this way
- # over a USB3.0 wire:
- droidcam-cli -a -v adb 4747
- # This connection seems to have MUCH better bandwidth/framerate!
- #
- # If connecting from a new computer, the phone might get a prompt
- # asking whether the computer should be trusted. This prompt must
- # be answered affirmatively before the above `adb` mode will work.
- # After answering the prompt, it may also be necessary to restart
- # the DroidCam(X) app on the phone/device, and possibly also
- # necessary to restart `droidcam-cli` with the same command above.
- # If all is good, it will give the same output as the IP version.
- # It should now be possible to use the "webcam" from other programs, and from web apps like Discord.
- # (This should be done as the user in the desktop environment, NOT as root.)
- # To test functionality manual, `mpv` can be used like so:
- mpv av://v4l2:/dev/video0 --profile=low-latency --untimed
- #```
- # (+) Video --vid=1 (rawvideo 1920x1080 30.000fps)
- #VO: [gpu] 1920x1080 yuv420p
- #V: 02:08:20 / 02:08:20 (100%)
- #```
- # NOTE that the `/dev/video0` in this command must match the "Video:" field from droidcam-cli.
- # It just happened to be `/dev/video0` in this example, but it could be any `/dev/videoN` node.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement