Skip to content
Mauricio Maciel edited this page Mar 14, 2021 · 7 revisions

To use droidcam on Raspberry PI, you need to compile the client from source.

Here is the list of steps (for Raspberry Pi 4B, written by kichel98):

  1. For testing purpose, install droidcam on a phone. After you enter IP number that is shown in app into the browser's address bar, you should see image from your camera.

  2. In order to use droidcam, you need to install libjpeg-turbo. Download it from this link and extract. Unfortunately, I guess it is required to compile it from source by oneself on Pi. BUILDING.md (Build Procedure > Un*x) is helpful. Execute these commands:

cd {build_directory}
cmake -G"Unix Makefiles" {source_directory}
make

where {build_directory} is /opt/libjpeg-turbo/lib32 (if doesn't exist, create these empty directories) and {source_directory} is path to directory which you extracted libjpeg-turbo to. Try 'cmake -G"Unix Makefiles" -S {source_directory}' if you get path not found errors

  1. Now we can install droidcam, according to instructions on GitHub.
  • download droidcam from GitHub
  • install linux-headers by executing sudo apt install raspberrypi-kernel-headers
  • install required dependencies (warning: gtk is huge library used to GUI, you can omit it):
gtk+-3.0
libavutil-dev
libswscale-dev
libasound2-dev
libspeex-dev
libusbmuxd-dev
libplist-dev
libspeex-dev
  • go to droidcam source directory
  • make droidcam-cli, and make droidcam for GUI client
  • ./install-client
  • sudo ./install-video (compiles and installs DroidCam version of v4l2loopback, its possible to use the standard v4l2loopback)
  • run ./droidcam-cli <ip> <port>, instead of <ip> and <port> type data shown on your phone

If everything went well, you should be able to take a photo: fswebcam image.jpg

Clone this wiki locally