Use your iPhone or Android as webcam input to OBS on Linux, macOS, or Windows

; Date: Tue Jul 26 2022

Tags: Blogging

It's good to create online video alongside your blog posts. OBS Studio is an excellent tool for recording video at your computer, and it's possible to use your smart phone (iPhone or Android) camera as a video input.

There are many reasons for someone to want to use their iPhone or Android smart phone as a webcam on their desktop computer. In my case, I want to use it as a video input while recording video using OBS Studio. Of course there are other uses for webcams, such as video conferencing (Zoom, etc) or recording video using other software. For this article we'll focus on using an iPhone as a webcam for video input to OBS studio on either Linux (Ubuntu 22.04) or macOS.

I recently shot a video discussing a blog post (How to Boot a Raspberry Pi 4 or 400 from a USB drive ). The structure involved discussing the content in the blog post, along with going to the command line a few times. Therefore, OBS Studio had one source as a window capture of a terminal window, and another source as a window capture of a web browser window centered on the blog post. To bring my presence into the video, I used an old USB webcam which came right up in OBS Studio.

It was easy to set this up, and I was able to shoot the video in one take followed by a half hour or so of editing. But, because it was an old USB2 webcam, the video quality suffered, and the slow frame rate made it look like I was a drunkard.

There are modern USB3 webcams claiming to do 4K video, which include a microphone, and some even include a ring light around the lens to help illuminate the subject. They may be good choices, and as a USB device would be very easy to connect to a computer and use in OBS Studio or any other video software.

But - looking at my iPhone, it seemed that surely there was a way to use its camera as a webcam with software on my laptop. I'm primarily using Ubuntu (sometimes macOS), and primarily using OBS Studio to record video, making that the focus of this article.

Advantages that come to mind:

  • You probably already own a smart phone that has an excellent camera
  • Avoid spending $100 or so on a high-end dedicated webcam
  • It's easy to get a tripod-mount that holds a smart phone

Reviewing a few software choices

I do not have an Android device, but the application I picked (details below) is available for both iPhone and Android. In the iOS App Store, searching for webcam applications turned up lots of choices. That means there is no shortage of possibilities. My preferences is to use applications that integrate with open standards, and preferably open source software, rather than applications using closed standard that integrate with a specific application. The open standards open source route should give us greater flexibility over the long term.

(obs.camera) Camera for OBS Studio is an application that looks promising. On macOS, or Windows, you install an OBS Studio plugin, then on your iPhone you install the corresponding app. It connects with your phone over USB, and it looks easy to setup. Since my personal goal is setup with OBS on Linux, I skipped trying this solution.

(www.fineshare.com) FineCam, says it supports any video application on your desktop computer. The desktop side runs on both Windows and macOS, and it has many advanced features. It even supports using both the front and rear cameras in a combined video. But, I also skipped this as it did not support Linux.

(www.elgato.com) EpocCam, is made by ElGato, a highly regarded maker of accessories. They describe many advanced features, including fun filters that give you bunny ears or the like. The desktop side works on Windows or macOS, and of course I also skipped this one because it does not support Linux.

(apps.apple.com) Clean Camera Feed, handles streaming from an iPhone over USB to macOS. The iPhone app costs $3.99. It integrates with OBS Studio without requiring any plugins.

(instant-webcam.com) Instant Webcam, streams video using WebSockets in MPEG1 format which can be received in a number of ways, such as in a web browser. With some geekery, Linux tools like gstreamer can be used to make that appear in OBS Studio as a video source.

(reincubate.com) Camo is the iPhone app companion to Camo Studio, and together they look to be a high end powerhouse combination. But, the studio app only runs on Windows or macOS, and I did not look further.

(iriun.com) Iriun is interesting, but doesn't seem to do anything useful. The iPhone app streams over WiFi to an app on Windows, macOS, or Ubuntu. I've only tried the Ubuntu app, and it is not very useful since the window is a fixed size, and there is no clear method for bringing the video into another service, or saving the video to disk.

Recommended smartphone webcam software - Droidcam

(www.dev47apps.com) Droidcam is my recommendation after evaluating the above apps, and even buying Clean Camera Feed. It does high fidelity streaming over WiFi and easily integrates with OBS Studio on any platform, and promises integration with other applications like Zoom.

The first step is installing Droidcam on your smart phone (or iPad etc?). ( (apps.apple.com) Droidcam on Apple Apps store)

Once launched the application looks like this on your device. Note the IP address and port number.

The second step is installing a client application. The Droidcam website describes clients for Windows and Linux, but not for macOS.

However, some searching turns up (www.dev47apps.com) Droidcam OBS which is a plugin letting you use Droidcam directly with OBS Studio. Plugins are available for Linux, Windows and macOS.

I'll focus on installing the Linux version. The macOS and Windows versions have installers that handle the setup for you. I installed the macOS Droidcam OBS quite easily. However, the Linux version requires some care.

As of this writing, you'll receive this download: droidcam_obs_1.5.1_linux.zip

Unpacked you see these contents:

$ ls -l droidcam
total 16
drwxrwxr-x 4 david david 4096 Jun 13  2020 droidcam-obs
-rwxrwxr-x 1 david david  804 Jun 17  2021 install.sh
-rw-rw-r-- 1 david david  701 Jun 12  2021 Licence.txt
-rw-rw-r-- 1 david david  706 Apr 14 16:02 README.TXT
$ cd droidcam/
$ ls -l droidcam-obs/
total 8
drwxrwxr-x 3 david david 4096 Jun 13  2020 bin
drwxrwxr-x 3 david david 4096 Jun 13  2020 data

Theoretically all you do is run install.sh and it will figure out where your OBS Studio plugin directory lives. In my case the script got confused and did the wrong thing. Inspecting the script we see this:

if [ -d ~/snap/obs-studio/current/.config ]; then
    set -x
    mkdir -p ~/snap/obs-studio/current/.config/obs-studio/plugins/
    cp -R droidcam-obs ~/snap/obs-studio/current/.config/obs-studio/plugins/
    exit
fi

if [ -d ~/.config/obs-studio ]; then
    set -x
    mkdir -p ~/.config/obs-studio/plugins/
    cp -R droidcam-obs ~/.config/obs-studio/plugins/
    exit
fi

if [ -d ~/.var/app/com.obsproject.Studio/config/obs-studio ]; then
    set -x
    mkdir -p ~/.var/app/com.obsproject.Studio/config/obs-studio/plugins/
    cp -R droidcam-obs ~/.var/app/com.obsproject.Studio/config/obs-studio/plugins/
    exit
fi

There are three possible destination directories. In each case it creates a directory obs-studio/plugins then copies the content of droidcam-obs to that directory. What I did was to copy and paste the shell commands from the last segment into a terminal window.

Once you do this, relaunch OBS Studio and the following sequence of steps should work. That is, you will see Droidcam OBS as a possible video source, and can configure and use it just like any other OBS video source.

Starting with an empty sources pane, click on the + button.

The sources menu pops up. You'll see that Droidcam OBS is on the list.

Click on that and you'll get the normal selector dialog. Click on OK to continue.

This lets you configure the connection to Droidcam. Notice the box for WiFi IP address.

Enter your IP address. I then hit TAB and it showed this box with the port number, and the Activate button. Click the Activate button.

This lets you preview the connection to make sure it's working. You can adjust the resolution and recording format as desired.

Once you click OK on the connection dialog, the Droidcam source shows up in OBS Studio.

In other words, once the DroidCam OBS plugin is installed, you configure Droidcam just like any other video source.

For the macOS version of Droidcam OBS, the user experience of connecting it with OBS Studio was identical.

Summary

This project is very simple, and converts your smart phone (iPhone or Android) into an easy-to-use webcam for OBS Studio. I haven't tried the Droidcam Client, but it should make it available for any other application as well.

This shows OBS Studio running my old webcam (on the left) and the Droidcam (on the right). I was thinking about producing a video about this.

BTW in case you're wondering about what's in my web browser. In Chrome, I use an extension named The Great Suspender. It automatically suspends inactive browser tabs after awhile which greatly reduces the memory footprint of Chrome. With this I routinely have a couple hundred browser tabs open. Rather than grinding my laptop into dust, it stays responsive.

In any case, we're here to talk about Droidcam and to compare it with my regular webcam.

One issue that leaps out is color balance. The Droidcam video is reddish, indicating that the white balance is off. The room is lit with incandescent bulbs which of course produce a reddish hue.

Droidcam does have a button for adjusting white balance. I tried playing with that and did not come to a satisfactory setting. In the meantime my old webcam came right up with a good picture, and further the settings dialog for the webcam has a lot more choices for adjusting camera settings.

In the end it may be better to use a USB webcam than Droidcam.

About the Author(s)

(davidherron.com) David Herron : David Herron is a writer and software engineer focusing on the wise use of technology. He is especially interested in clean energy technologies like solar power, wind power, and electric cars. David worked for nearly 30 years in Silicon Valley on software ranging from electronic mail systems, to video streaming, to the Java programming language, and has published several books on Node.js programming and electric vehicles.