Iriun Web Cam on Manjaro

Iriun Web Cam

A tool for using your android device as a wireless/usb webcam and VR

Your Android device

Before you even think of getting your computer to connect you must install the Iriun 4K Webcam application on your android device.

Your Manjaro system

Manjaro and Arch are not identical systems and Manjaro kernel naming will require you to pre install the kernel headers for your installed kernels. If you fail to do so - the required v4l2loopback-dkms package will fail to build the required kernel modules and you will not be able to connect to phone.

Update your system and install the necessary build tools

sudo pacman -Syu --needed git base-devel

Next thing is to get hold of the PKGBUILD. Open a terminal and clone the repo

➜  ~ git clone https://aur.archlinux.org/iriumwebcam-bin
Cloning into 'irumwebcam-gin'...
....
Resolving deltas: 100% (11/11), done.

Navigate into the folder and list the content

➜  ~ cd iriumwebcam-bin
➜  iriumwebcam-bin git:(master) ls -A
.git  PKGBUILD  .SRCINFO

We are interested in the content of the PKGBUILD (and possible companion files) because it is best practise to verify the content

➜  droidcam git:(master) cat PKGBUILD 
# Maintainer: Barfin
pkgname=iriunwebcam-bin
pkgver=2.2
pkgrel=3
pkgdesc="Use your phone's camera as a wireless webcam in your PC."
arch=('any')
url="http://iriun.gitlab.io"
license=(unknown)
source=("iriunwebcam.deb::http://iriun.gitlab.io/iriunwebcam.deb")
options=('!strip')
depends=('jack' 'qt5-base' 'v4l2loopback-dkms' 'adb')

package() {
    tar -xf "${srcdir}/data.tar.xz" -C "${pkgdir}"
}

md5sums=('44724115737d08fc953665bafc5f74a8')

We find the expected stuff - a list of dependencies

  • jack (audio)
  • qt5-base
  • v4l2loopback-dkms
  • adb

Note that we have a dkms dependecy.

The dkms dependency is tricky because it usually requires kernel headers to be installed for your kernel. While Arch only has a clear distinctive kernel naming with only one version - Manjaro has several versions and every version has a complimentary header package.

So to be able to build the package you need to ensure the headers are installed for all of your kernels - otherwise the app will not build and ultimately not work.

List your installed kernels

$  iriunwebcam-bin git:(master) mhwd-kernel -li         
Currently running: 5.9.1-3-MANJARO (linux59)
The following kernels are installed in your system:
   * linux59

With this info - replace $KERNEL with the values from your system - install the kernel headers

sudo pacman -Syu $KERNEL-headers

Now we are ready to build and install the package and install the dependencies.

$ iriunwebcam-bin git:(master) makepkg -sf
==> Making package: iriunwebcam-bin 2.2-3 (lør 24 okt 2020 10:24:50 CEST)
==> Checking runtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (1) v4l2loopback-dkms-0.12.5-1

Total Installed Size:  0,10 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [#######################] 100%
(1/1) checking package integrity                   [#######################] 100%
(1/1) loading package files                        [#######################] 100%
(1/1) checking for file conflicts                  [#######################] 100%
:: Processing package changes...
(1/1) installing v4l2loopback-dkms                 [#######################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Install DKMS modules
==> dkms install --no-depmod -m v4l2loopback -v 0.12.5 -k 5.8.16-2-MANJARO
==> dkms install --no-depmod -m v4l2loopback -v 0.12.5 -k 5.9.1-3-MANJARO
==> depmod 5.9.1-3-MANJARO
==> depmod 5.8.16-2-MANJARO
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found iriunwebcam.deb
==> Validating source files with md5sums...
    iriunwebcam.deb ... Passed
==> Extracting sources...
...
==> Finished making: iriunwebcam-bin 2.2-3 (lør 24 okt 2020 10:25:16 CEST)

You should get a similar output and if you don't you have inconsistencies within your system.

I can't say what it might be - but suffice to say - as the time of writing this guide - the droidcam package builds without hickups

When the build is done - inspect the build folder once more. If you paranoid, superuser or developer - you may inspect the package before installation.

When examining the pacage iriunwebcam-bin-2.2-3-any.pkg.tar.zst we find the package to containing configurations

$ cat /etc/modprobe.d/iriunwebcam-options.conf
#
options v42loopback exclusive_caps=1 devices= 1 card_label="Iriun Webcam"
$ cat /etc/modules-load.d/iriunwebcam.conf
#
v4l2loopback

A binary

/usr/local/bin/iriunwebcam

A .desktop launcher

/usr/share/applications/iriunwebcam.desktop

And a pixmap

/usr/share/pixmaps/iriunwebcam.png

To actually install the package use pacman

sudo pacman -U iriunwebcam-bin-2.2-3-any.pkg.tar.zst

Reboot your system to have the system use the new modules.

Using your phones camera

  • Connect your phone to the same network as your computer - or connect using USB.
  • Start the app on your computer
  • Start the app on your phone

Done

The resolution depends on your phone - e.g. my Nexus 6P only offers 640x480 or 1280x720 - so expect your mileage to vary.

I have not checked the app further but I suspect the high resolutions and VR will be options you need to buy in-app.