Android phones as webcams and security cameras

Squeezing life out of old devices during a deadly(?) pandemic

/

July 12, 2020

(8 min read)

[Preface: This article is about an experimental reuse of old and new technologies that happened to satisfy my immediate needs and temporary circumstances. Some readers will think I'm crazy, and should have just bought some new gear. That is true... but how much fun is there in doing so?

Some words or ideas needing clarification have "(FN?)" markers to point to footnotes with additional information at the bottom.]

Like so many people around the world, in my city, we've been in lockdown due to the Covid-19 pandemic. All those in my household who are students have been taking classes and doing work online exclusively, and this has taxed our home network to levels never before seen. One particular aspect of our tech gear has proved to be a shortcoming, annoyance and challenge, during these times: we are big fans of desktop (rather, floortop) computers with expandable storage, upgradeable (to a point) CPUs, and are very kick-resistant during our moments of extreme frustration. This means however, that we don't have the benefit of cameras built-in in our monitors, which is a necessity these days.

I thought we were all set, as we have two Logitech QuickCam Chat USB cameras, plus a GSou (who?!?!) camera, allowing 3 people to video-conference simultaneously. What I did not count on was, the lack of support for the brand-name (and EOL'ed) (FN1) cameras, and a mysterious incompatibility with Zoom.com: using those cameras with Zoom.com leads to frequent BSODs.(FN2) This is a problem that has been completely verified and solved by unplugging the cameras and doing blind chats instead.

Then teachers and instructors started to complain: "We can't see the student, how can we know he/she is paying attention and not watching YouTube during class!?!?". Classes take place daily, no time to order cameras and investigate further incompatibilities and crashes, we need a solution RIGHT NOW! A quick search on DuckDuckGo.com yielded this article:

https://www.tomsguide.com/news/how-to-use-your-phone-as-a-webcam

I was really impressed by this information, since it touched on compatibility, pricing, hardware and software choices and evaluations on several leading solutions. I wanted support for everything we have in our household arsenal: iOS and Android, Windows and Mac OS, heck, the article even mentions Linux! Best if it's free!

My criteria led me to gravitate immediately towards DroidCam. I installed the freemium app on one of my long-decommissioned phones running 4.0 (Ice Cream Sandwich), tapped on the app, and it almost instantly indicated it was offering a MJPEG video stream at its WiFi IP address, on a specific port. I grabbed my PC keyboard, entered the URL into Firefox, and lo and behold, a cristal-clear 640*480 default video feed coming from my new wireless IP camera!

This also gave me hopes to solve another problem: during this pandemic lockdown, we've been blessed with redoubled mail service. On weekdays and Saturdays, our mailman arrives on schedule and puts mail in our mailboxes. Then some neighbors alerted the community that, on several occasions, between 03:00 and 05:00 in the wee hours of mornings, a second team of mailmen and mailwomen came several times to check our curbside mailboxes, and remove our unintendedly outgoing mail. Some neighbors started worrying about theft of the economic-stymulus checks (FN3), and more realistically, id. theft. We've all been talking about buying and installing surveillance cameras, and I just found a low-cost candidate!

With the device-side functionality tested and proven quite satisfactory, I then proceeded to install the counterpart software on the host PC side. Whereas viewing the video stream using a PC works readily, this only enables one-half of the functionality I need: video from camera to PC. I now need the PC to say to an application (such as Zoom, Skype, Hangouts) that there is a virtual webcam connected to the PC and able to send video out to the conferencing application. I installed the DroidCam Client 6.2.7 software on my PC, including a device driver that would make Windows believe I have a webcam hooked up.(FN4) This is where I ran into a nightmare: the DroidCam camera-side app that supports older Android versions is no longer supported by the latest several versions of the DroidCam client software running under Windows. Most infuriatingly, there is no documentation or changelog detailing which versions of the Android app are compatible with which versions of the Windows client software.

I dug around the developer's site, and other sites, and found older versions of this client software. However, every time I tried to uninstall the client software before trying an older version, my PC would crash with the dreaded BSOD. No matter what I tried, such as closing applications, deleting the virtual camera from Device Manager, rebooting cleanly before uninstalling, every time the uninstallation of the device driver brought down the whole system. I had to resort to booting from a rescue DVD, run a command prompt with equally unrestricted privileges, navigate into my contaminated OS directory, and manually delete the files "droidcam.sys" and "droidcamvideo.sys".

This ordeal I had to do twice, with two versions of the DroidCam Client software, and I could risk it no more. If the latest drivers are this bad, going to older drivers could cause unrecoverable damage to my system, and was definitely not worth it! I would like to repeat my motto, as a former Windows driver developer and eternal system-recovery technician:

    "When you write software for Windows (or any other OS), the first thing you need to test is whether your software can UNINSTALL itself PROPERLY AND COMPLETELY. If you do not implement and verify this, you are causing headaches and damage similar to having distributed a piece of malware."

At this point, I had a functioning IP camera, but not a webcam. The fact that the video stream was viewable by a web browser with no software (or malware) installed led me to think, it must be abiding by some standard, and there must be some other software that could redirect the incoming stream as an outgoing stream. Another search yielded this article:

http://www.vlc2vcam.com/ (FN5)

It mentions a few applications that create "virtual webcams" for Windows. Among these, I decided to try WebcamMax, available from:

http://www.webcammax.com/

...and boy was I in luck! I installed the trial version (just the core files and "Start Menu shortcuts"), clicked "yes" to install a driver from this publisher, saw a virtual webcam appear in Device Manager, and launched the software. Within WebcamMax, within a minute I figured out that it could feed the contents of any particular window (or the entire Windows desktop) as the outgoing video stream of its virtual webcam.

So how do we put all this into a full solution?

1) An old Android phone runs the DroidCam app on the phone. It sends out a video stream of what its camera is picking up.

2) The PC on the same LAN runs a web browser that picks up and displays the video stream coming from the "IP camera".

3) I configure WebcamMax to feed the contents of the web browser window, which displays the video stream, into the virtual webcam.

4) The virtual webcam of WebcamMax software provides the webcam functionality and video stream to all other video conferencing applications.

I believe this virtual webcam could be used equally well with other surveillance software, and provide the functionality of a low-cost surveillance system. Remember:

5) You can have multiple Android devices running DroidCam.

6) A PC can run multiple browser windows displaying simultaneously the video streams from multiple cameras.

7) You could use WebcamMax to stream out your entire desktop (with all the browser windows from preceding step). And thereby you have a simple multi-view IP camera surveillance solution, limited only by network bandwidth.

Is this solution perfect? Probably not; it's quite circuitous, if anything. Is it flexible? I very much think so. Is it environmentally friendly? ABSOLUTELY! Obsolete phones and 8-year old PCs can be used for this with power to spare!!!


[Footnotes]

(FN1) End of life: "We don't care how much you paid for the hardware, or when you bought it. We ain't gonna support it no more, and you're gonna have to buy a new one."

(FN2) Blue screen of death: when Windows crashes, it is supposed to display a text screen with blue background, containing information on what, where and how the software crashed. Funny thing is, if the crash is not easily reproducible, and the blue screen appears for only 2 seconds before machine reboots on its own, we don't have much of a case to ask the manufacturer to diagnose the problem... on EOL'ed products.

(FN3) ...A cursory examination of household income levels would prove this worry to be completely unfounded.

(FN4) A WDM (Windows Driver Model) device driver, that runs with unrestricted privileges. Installing *ANY* device driver implies the owner entrusts his entire OS installation and data files to that driver, because unlike a normal application (e.g. EXE file) the OS cannot stop the driver from corrupting memory and crashing the entire system.

(FN5) This article is about a plugin for VLC Media Player, an excellent open-source media player and recorder application that I regularly use.

Android phones as webcams and security cameras

Squeezing life out of old phones during a pandemic

0 subscribers