Looking for a cheap way to keep an eye on something? [Kevin Hester] pointed us to a way to make a WiFi webcam for under $10. This uses one of the many cheap ESP32 dev boards available, along with the Internet of Things platform PlatformIO and a bit of code that creates an RTSP server. This can be accessed by any software that supports this streaming protocol, and a bit of smart routing could put it on the interwebs. [Kevin] claims that the ESP32 camera dev boards he uses can be found for less than $10, but we found that most of them cost about $15. Either way, that’s cheaper than most commercial streaming cameras.
To be fair, this hack isn’t exactly brain surgery: all that [Kevin] is doing is taking a cheap piece of hardware and installing some open source software on it. (Editor’s note: But Kevin wrote the open-source software too! And that was brain surgery. Check out the comments for more details.) But sometimes that’s all you need, and this would be a good way to make a webcam that you won’t lose sleep over if it gets stolen or damaged.
UPDATE: We should clarify that there is a bit more brain surgery than we initially thought here: [Kevin Hester] actually wrote the Micro-RTSP library that makes the whole thing possible. Kudos to him for a neat bit of open source coding!
So we are not including the cost of the camera in the total cost of building a web cam?
this is with the camera. so for minimum of 7,49$ you get the esp32 with an ov2640 camera https://www.banggood.com/Geekcreit-ESP32-CAM-WiFi-+-Bluetooth-Camera-Module-Development-Board-ESP32-With-Camera-Module-OV2640–p-1394679.html?rmmds=search&cur_warehouse=CN
Ahhhh! Well look at that! A new toy to buy!!!
What are some good dirt cheap antenna solutions for the $7.49 boards?
that board includes a PCB trace antenna, so you might not even need to plug in an external antenna.
Thanks. Found that after I looked a bit more closely. Wonder how much range those provide?
Apparently there is also a connector for an external antenna. It surprised me how expensive the common black plastic covered antennas are. I also found the cheap antennas ($0.80 or so) that are just a cable and a PCB with a pattern. I’m thinking those will plug into the provided connector.
The onboard PCB antenna’s won’t perform well. I needed a external antenna to get some range.
Hmmm, the camera is included. Check the “bout $15” link.
what is the FPS for the RTSP sream at FullHD or at least what is the max resolution to support et least 10fps ?
about 10fps. SVGA res is the max res supported by this camera.
So what exactly limits this to SVGA? The datasheet linked below says 1632×1232.
ooh! I missed that in the datasheet. I’ll update the ov2460.c driver in the espressif arduino libs to add support for that res and try it out! thanks! (probably not till monday though)
Oh great! Now things get even more interesting.
Keep up the good work.
ok I see what is going on, full res should work but I’ll (or someone else, TBD – I probably can’t get to it for a couple of weeks) need to change the upstream esp32 camera library a bit. Details here: https://github.com/geeksville/Micro-RTSP/issues/1
That’s not poor resolution. Nice data sheet on the camera: https://www.uctronics.com/download/cam_module/OV2640DS.pdf
Do we have GPIOs left for anything else?
(author here). Yes, I linked to three diferent devboards. The cheapest one brakes out many GPIOs
Hi Richard (this is Kevin, the author),
Re:
> To be fair, this hack isn’t exactly brain surgery: all that [Kevin] is doing is taking a cheap piece of hardware and installing some open source software on it.
Um – I also had to write that open source software:
https://github.com/geeksville/Micro-RTSP
Good stuff Kevin!
Very impressive work, RTSP is not a forgiving protocol!
omg if I never have to see the phrase quantization table again, I’ll be happy. Though it is lucky that this camera has an option to spit out yuv 4:2:2 frames, which is one of the easy RTSP encodings.
Agree. This is a great contribution to the ESP32 community.
Not that this is not neat. But what more people should know about is: https://www.virtualhere.com/home
Take any embedded linux board even that cheap Raspberry Pi Zero W, slap your HD webcam to it, and run the above software on it. Then on your PC it will show up as if you plugged that camera in directly. 30fps, and sound. Cannot beat that. In fact almost any USB device can be used this way.
This is $9 (or $15 if you also want a OLED screen and a Lipo battery option), including the camera/wifi/cpu. With a bunch of broken out GPIOs which can be used for other ESP32/arduino style things.
Yes I am aware of that, and the RPI is $10. plus you get HD quality & audio.
Open source + $10 vs $50 licence + webcam + Raspi Zero W?
or just use motion+linux or motioneyeos for free. I’ve got a $15 orange pi zero and a webcam out of the junk pile that does security cam here and stores motion detection pics to a pc in the house.
Nice,
I bought a few weeks ago one of this camera modules but had no time to get it running.
Thank you for saving me a lot of time ;)
Congratulations on writing RTSP streaming video software, Kevin. I would love to see embedded Open Source software for WebRTC, which would allow us to use standards-compliant browsers to view cameras like this. Currently I am using Websockets rather than WebRTC to do things like remote equipment front panels, because I can fit libwebsockets on my embedded devices, and the last time I looked there was no similar solution for WebRTC.
Oh man, i could’ve used this years ago, when i had a water meter in my previous house, that was installed in such a way, that i needed a phone to take a picture of it to see the reading. I was thinking of using a mouse sensor(s) and doing OCR on it, but that never panned out. Well, no need for that now.
Kevin,
This is awesomesauce. Do you know how much power it draws, while streaming?
I’m curious about that myself. I hope someone on here has some idea and will chime in.
I haven’t measured it yet but more than 500mA and less than 1A (ish). Because it will brown out with a standard USB host port but is fine with a USB 1A wall adapter.
1A is not physicial limit for USB some devices use much more, example is the RasPi
Would this firmware work with an ESP-EYE? https://www.espressif.com/en/products/hardware/esp-eye/overview
Yes
I am not sure why because the OV2640 should be able to provide JPEG stream out of the box so MJPEG should be fluent no need of a lot of CPU power the ESP32 should act as a “proxy” but FullHD MJPEG requires quite a big bandwidth so may be it is a limitation of the OV2640 I2C interface ?
sorry was answering @Jii
This is on sale until feb 15th https://www.banggood.com/Geekcreit-ESP32-CAM-WiFi-+-Bluetooth-Camera-Module-Development-Board-ESP32-With-Camera-Module-OV2640–p-1394679.html?rmmds=search&cur_warehouse=CN
for $8 you almost cant go wrong
https://www.youtube.com/watch?v=q7Z_XnBYFhY
Is this board obsolete now? UK supplier coolcomponents says it is?
Still available but was upgraded with psram and a case for £16
That’s the MKI M5stack camera which can often be found for under GBP £10
Thanks for this great hack. I have been looking for a really cheap wifi camera platform for a long while.
I suppose the low price is partially due to the Chinese New Year starting tomorrow.
What is the highest resolution camera module that could work with an ESP32? OV5642 or 5647? Not worried about fps, just resolution.
Nice, but the RTSP lib unfortunately is not working :-( It receives OPTIONS and drops any connection…..
Agreed. VLC just spins and spins and never returns any frames. :(
Enhorabuena por su trabajo. Tengo entendido que la app blynk permite la recepción de vídeo rtsp y admite la tarjetas esp-32. Si esto es así podria ver y controlar la transmisión de video en una red local wifi mediante la app Blynk cargando el código publicado en las tarjetas que indica?
I have no luck with my ESP32-CAM.
The firmware can be installed without problems with platformIO. But after a reset the serial monitor shows the following output continuously:
rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6412
entry 0x400806a8
ets Jun 8 2016 00:22:57
Am I doing something wrong?
Who can help me?
Greetings
Phili
Translated with http://www.DeepL.com/Translator
Did you flash at the write offset address? 0x1000 or something in some cases.
First check if a simple sketch works with serial echo and THEN try the camera (the camera can be tricky).