A Full IP Webcam With A Raspberry Pi

A Dropcam will run you about $150. Price out a Raspberry Pi, camera sensor, and a CCTV camera housing found on eBay, and it starts to look like there may be a cheaper replacement for a Dropcam sitting around on workbenches, if only someone can figure out the software. [Antoine] did just that, giving any Raspberry Pi the ability to stream H.264 video over a network.

[Antoine]’s software is based on the raspivid tool distributed from the foundation, but that only takes care of capturing and encoding H.264 video from the camera sensor. To add IP camera support, the Live555 RTSP library was mixed in and combined to stream video over the Raspi’s network connection.

With a camera dome enclosure from the usual outlets, [Antoine]’s project really starts to look professional. The specs are respectable, too: it can output a 1080 stream, and with a small modification to an Ethernet cord, this webcam has PoE. Future updates include the ability to record videos based on a trigger and possibly a webserver on the Pi for configuration. [Antoine] says he really isn’t up to speed with Javascript, so any help would be appreciated.

32 thoughts on “A Full IP Webcam With A Raspberry Pi

    1. Would there be a use for some manner of web site spoofing here?
      I assume you’d need an absoulutley closed ,private network
      Just some pre-caffeine metal goofiness here is all.
      Still troubled with spellings, even more iffy as to any accurate plausible concepts or recalling prior cited examples.

      1. you could possibly use your own server by adding something like: dropcam.com to your host file if you can decode the stream and it is not a homemade proprietary format

  1. This actually falls in line with what I want to do with my Pi’s: Record multiple video angles at once at convention party scenes. Given the SmartPi case (a funded Kickstarter now at smarticase.com) I can attach a few Pi’s w/camera and battery anywhere and have the video streamed out to a laptop, tablet, phone, or another Pi. :)

  2. “A Dropcam will run you about $150. Price out a Raspberry Pi, camera sensor, and a CCTV camera housing found on eBay, and it starts to look like there may be a cheaper replacement for a Dropcam sitting around on workbenches, if only someone can figure out the software.”

    Pricing other, non-Dropcam IP cameras will have the same effect.

    Nothing against this project, but trying to establish its economic value by comparing it to overpriced Dropcam hardware is just silly.

  3. That is an overly complicated software setup. Install vlc-nox (headless vlc) and use something like:
    raspivid -o – -t 0 -n -w 1280 -h 720 -fps 30 | cvlc -vvv stream:///dev/stdin –sout ‘#rtp{sdp=rtsp://:8554/}’ :demux=h264

    Or if you like python see picamera “Recording video to a stream” example. Very simple. It is not an RTSP stream but you can do up to 4 video streams at different resolutions at the same time!!!

    Also 720p and 1080p modes are not good as they crop the full view (only a section of the CCD is used). You get full image with 1296×972 resolution. See RasPi camera documentation for all the details.

    And you can stream full camera resolution (5Mpix) video at 15FPS as well.

    1. You’re right, command line with out of the box software works, and in it’s achievement state, the project do basically the same thing
      But this is not the goal of the article, which is to help people understand how things work. Home made code is more flexible, permit real customization, integration, security, reliability and performance. It is also interresting and satisfying to do.
      This not intend to be cheaper than an hickvision found on ebay but hobbyists sometimes prefer doing thins by their own, and adapt it to their real needs
      It depends on what you want to do

  4. IMO, a better solution – one that I’m working on currently:
    * PogoPlug (eBay: $15ish shipped)
    * USB webcam or three (eBay: dirt)
    * Fancy enclosure, SD card, etc – same as this project

    Reflash the PogoPlug with Arch Linux, install “motion” software, and go.

    1. Unsure about how fast pogoplug CPU is but RasPi with a webcam and motion struggles to do 3-4fps at 640×480 due MJPG compression of each frame.
      But RasPi with its camera can do h264 encoding in hardware.
      And bandwidth for MJPG is MUCH higher than h264.

      1. You can do mjpg on the raspberry pi GPU. I’ve written code to do it with the raspicam, would be trivial to do the same with a v4l2 USB cam (though finding a USB cam that outputs mjpg would be easier, some of the dirt cheap ones do).

        Also I’ve read some older versions of mjpg streamer have aweful transcoding performance.

  5. Not bad. I’ve got my pi camera on a custom mount, with pan/tilt using two micro servos. Ihave raspivid doing the encoding, and a simple command line interface via ssh. It has motion detection, and PIR detection. Basically, I have a clone of the tenvis iprobot 3 camera. I have a IR camera, and aa few LEDS with a switchable IR filter, so I have most of the functionality.

  6. Why not just buy a $30-$40 IP camera… from ebay alibaba etc
    If you need root, grab a TTL cable and 9/10 you’ve got it.
    This seems like project overkill when off the shelf stuff is already cheaper than the parts used to do this. Other than a proof of concept I don’t see the point ?
    Getting root on these things is generally trivial, for security products the security is woeful.

      1. The “best” ipcam’s out there, only do 720p, and that’s on a good day. those cams also use proprietary services to ensure you can access them anywhere, so who knows who really sees your cams.

        $30 RasPi B+ – on sale
        $16.00 2 x Servos @ 8.00/ea
        $8.00 WLAN USB dongle
        $25.00 RasPi-IR Cam
        $0.00 – USB Power – Salvaged from Stock
        $8.00 – 8Gb MicroSD Card

        So we come in around $88 or so , but I and only I have full control over the firmware, can take 5Mp pictures , [as opposed to 0.92Mp, and I have full pan/tilt and IR capability, along with adding extra sensors. I can even omit wireless to save a few bucks.

        I can do custom motion detection, capture at 30fps, and other cool stuff. I’m not hobbled by a slow CPU, no GPU, and other penny pinching that the other folks usually do.

        1. I’d love to see more implementation details of your pan/tilt mechanism. This project’s setup with pant/tilt gets me 2/3 of the way from where I want to be. I just need an accessory lens with controllable zoom.

          1. I made something like the “Pi-Pan” check it out. The servos are directly controllable from the Pi itself, you do need a beefy power supply though.

            As for a zoom, I settle for Software zoom right now, since a “real” zoom implementation is too much $. I do have an IR filter that is controllable, which I ripped from a cheapo IP cam that had one.

  7. It’s a good effort but a 5MP Geovision dome camera can be had for the same price and the server software is a real masterpiece. Object recondition and blocking out zones so the recording doesn’t start when a tree is blowing. Can also trigger electric locks and sirens plus integrates with access control systems and does two way audio.

    1. I just tried it and it works, but it seems to kill (saturate?) my network. I haven’t confirmed it, but within a few minutes after I started the stream and launched VLC my WiFi devices dropped/disconnected. They pretty much recovered after I stopped the stream. I’m not streaming via WiFi, though; both the RasPi and the laptop where VLC runs on use wired Ethernet.

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.