Because the official one is over-engineered, does not work with Discord, does not work in all Linux distros painlessly and just generally badly done.
This fork is updated with changes to have droidcam app working with Sony Xperia XZ1 Compact.
adb
v4l2loopback
ffmpeg
- On Arch based systems, you'll also need to install
android-udev
so you can useadb
without root.
If you have an Arch based system (Arch/Manjaro), you can just do sudo pacman -S adb v4l2loopback-dkms ffmpeg android-udev
in terminal.
- Connect your phone to the same wifi network as your linux machine. Starting wifi hotspot on you linux and connecting your phone to it will also do the trick.
- Launch droidcam app on your phone. Write down IPv4 address shown in the pop-up and check if it matches one in
droidcam
anddroidcam-mpv
. - It is recommended to put this file in PATH, so you can call it from the terminal from everywhere.
- Just run
droidcam
in a terminal, enter a root password (v4l2loopback
requires it), and keep the ffmpeg encode running until you are done. - You can also use
droidcam-mpv
to open up the camera feed in the mpv player. You could also window share this on Discord. - You can also specify a resolution in the command line, like so:
droidcam 640x480
ordroidcam-mpv 640x480
.