camera/

How to use Android phone camera on desktop computer via WiFi with IP Webcam

  1. Install IP Camera. The application is free, with minimal adds. Compared to DroidCam, it allows you to stream FullHD video
  2. Install dependencies:
sudo dnf install ffmpeg v4l2loopback akmod-v4l2loopback
  1. Verify that v4l2loopback is loaded:
lsmod | grep v4l2loopback
  1. If it is not loaded, run this command:
akmods --kernels $(uname -r) --rebuild
# Confirm that it was loaded
  1. On mobile phone, start the application and select “Start server” from the menu. Select also “Fade” option to set minimal brightness of the mobile phone screen.
  2. On desktop, run the following command:
ffmpeg -i http://192.168.2.26:8080/videofeed -vf format=yuv420p -f v4l2 /dev/video0

If for some reason v4l2loopback module is not compiled correctly, you can try to compile it manually by following this instruction

| 15 Oct 2023

How to use Android phone camera on desktop computer via WiFi with DroidCam

  1. Install DroidCam on your phone. There are free and paid versions. Paid version enables HD quality
  2. Install DroidCam in your desktop:
sudo dnf copr enable meeuw/droidcam
sudo dnf install droidcam
  1. Launch both mobile and desktop applications. Connect desktop client to your phone’s camera (IP address and port are displayed on your phone). Desktop client will connect to your camera via WiFi and create a virtual camera device.

If droidcam doesn’t start with the following error:

$ droidcam
Fatal: droidcam video device reported pixel format 34524742 (BGR4), expected 32315559 (YU12/I420)
Try 'v4l2loopback-ctl set-caps "video/x-raw, format=I420, width=640, height=480" /dev/video<N>'

Run this command:

v4l2loopback-ctl set-caps /dev/video "YU12:640x480"
| 2 Aug 2023