bobbybroadcast
Posts: 4
Joined: Sun Mar 22, 2020 9:52 pm

Turn RPi Camera module into USB webcam for use in Windows

Sun Mar 22, 2020 9:58 pm

I need help creating a USB webcam to be used in Windows. I've searched and all I've found is users saying, "why would you when you can buy them for cheap?" Well, with the Covid-19 situation here in Los Angeles, webcams are no longer available and I need to build one for my father. He's a physician and needs it to be able to provide care for his patients for telemedicine. I have several RPi's here (3s and a couple 4s) and some camera modules as well.

Any suggestions on where to turn or which, if any, software recommendations would be quite helpful. Thanks.

alphanumeric
Posts: 2547
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Turn RPi Camera module into USB webcam for use in Windows

Mon Mar 23, 2020 11:48 am

There is software out there that will let you stream from a Raspberry Pi / camera to the internet. I haven't done it myself but if you do a forum search you should be able to find some threads on it.
I didn't want to go that route, I wanted my feeds over my LAN and went with Motion Eye OS. I can view the stream from a web browser on my Windows PC or from anther Raspberry Pi that has LAN access. No sound though. I didn't want or need that so no big deal for me.

You might be able to rig something up with a Pi in gadget mode. I dare say it likely won't be easy though, but it would show up as a USB device to a Windows PC.

drgeoff
Posts: 10765
Joined: Wed Jan 25, 2012 6:39 pm

Re: Turn RPi Camera module into USB webcam for use in Windows

Mon Mar 23, 2020 5:45 pm

The USB-C port on a RPi4B can be operated in gadget mode but complicates powering the RPi4B.

There is no way to make a 3B or 3B+ work as a USB slave/client device.

alphanumeric
Posts: 2547
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Turn RPi Camera module into USB webcam for use in Windows

Mon Mar 23, 2020 7:34 pm

A Zero or Zero W will also work in Gadget mode.

drgeoff
Posts: 10765
Joined: Wed Jan 25, 2012 6:39 pm

Re: Turn RPi Camera module into USB webcam for use in Windows

Mon Mar 23, 2020 7:42 pm

alphanumeric wrote:
Mon Mar 23, 2020 7:34 pm
A Zero or Zero W will also work in Gadget mode.
True but those are not among the models the OP wrote that he has and they currently seem out of stock everywhere.

alphanumeric
Posts: 2547
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Turn RPi Camera module into USB webcam for use in Windows

Mon Mar 23, 2020 7:45 pm

Fair point, doesn't hurt to know what your options are though. Somebody else reading this thread may want to try it, you never know.

User avatar
thagrol
Posts: 3081
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Turn RPi Camera module into USB webcam for use in Windows

Mon Mar 23, 2020 8:02 pm

Further to what drgeoff says, no Pi has a microphone input. That's something you'd have to add either to the Pi or to the host PC.
Arguing with strangers on the internet since 1993.

User avatar
Gavinmc42
Posts: 4526
Joined: Wed Aug 28, 2013 3:31 am

Re: Turn RPi Camera module into USB webcam for use in Windows

Mon Mar 23, 2020 11:38 pm

USB microphones work with Pikrellcam.
Have not tested them with MotionEye OS.

Both work with ZeroW and 3A+ over WiFi.

WiFi or Ethernet IP webcam would be easier than USB OTG.

Sony USB PS3 Eyecams work and have microphones, only 640x480, secondhand I have got them for $2.
Old mobile phones in USB debug mode? They have better cameras.

How soon before Google home has IR thermometers for checking body temp remotely?
Fitbits with fever detectors?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

bobbybroadcast
Posts: 4
Joined: Sun Mar 22, 2020 9:52 pm

Re: Turn RPi Camera module into USB webcam for use in Windows

Tue Mar 24, 2020 5:27 pm

So to follow up with my own use case, he won't need any audio input as he'll have a dictation microphone and can only use it as a USB device as the Wifi is understandably fairly locked down.

I actually do have two Zero's here as well (I didn't think to mention them earlier). Regarding implementation, I'm mainly asking what software I should look into.

Thanks for all the responses!
Last edited by bobbybroadcast on Tue Mar 24, 2020 5:43 pm, edited 1 time in total.

PiGraham
Posts: 3939
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Turn RPi Camera module into USB webcam for use in Windows

Tue Mar 24, 2020 5:31 pm

bobbybroadcast wrote:
Sun Mar 22, 2020 9:58 pm
I need help creating a USB webcam to be used in Windows.
Try this topic:
raat1979 wrote:
Sat Feb 09, 2019 7:36 am
After searching a lot I finally have this working now

to get it working I used the following script for the configfs setup
https://gist.github.com/kbingham/c39c4c ... f5206e2f9f

and this version of the uvc-gadget tool
https://github.com/wlhe/uvc-gadget
https://www.raspberrypi.org/forums/view ... p?t=148361

bobbybroadcast
Posts: 4
Joined: Sun Mar 22, 2020 9:52 pm

Re: Turn RPi Camera module into USB webcam for use in Windows

Tue Mar 24, 2020 5:47 pm

@PiGraham - This looks great, thank you! I will give this a shot.

alphanumeric
Posts: 2547
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Turn RPi Camera module into USB webcam for use in Windows

Tue Mar 24, 2020 6:03 pm

Just be aware that the CSI slot on a Pi Zero is smaller than the standard camera slot. You need a special cable to hook up the official camera to a Zero. I have a couple here that I think came with the Official Zero Case. They came as extras with something I bought Zero related.

bobbybroadcast
Posts: 4
Joined: Sun Mar 22, 2020 9:52 pm

Re: Turn RPi Camera module into USB webcam for use in Windows

Tue Mar 24, 2020 6:10 pm

Yes, I see. Looks like I won't be able to get any until mid to end of April. I'll have to stick with the pi3/4s then.

alphanumeric
Posts: 2547
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Turn RPi Camera module into USB webcam for use in Windows

Tue Mar 24, 2020 6:28 pm

I figured I better mention that before you went to far. And as mentioned it looks like the 3B won't do gadget mode. You'll have to use the 4B. Keep an eye out for undervolt warnings.

Return to “Advanced users”