Cheap ESP32 Webcam

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!

49 thoughts on “Cheap ESP32 Webcam

          1. 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.

        1. 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)

      1. 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.

  1. Not that this is not neat. But what more people should know about is:
    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.

    1. 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.

      1. 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.

  2. 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.

  3. 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.

  4. 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 ?

  5. 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.

  6. 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?

  7. 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
    mode:DIO, clock div:2
    entry 0x400806a8
    ets Jun 8 2016 00:22:57

    Am I doing something wrong?
    Who can help me?

    Translated with

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.