Raspberry Pi Camera to SecuritySpy

Below is a guest post by one of our users, Wayne Jacobsen, who is using a Raspberry Pi computer to turn a USB webcam into an IP cam that can stream video to SecuritySpy, in order to expand his Mac video surveillance system. Wayne is an Art Glass artist  - you can see some of Wayne’s work on Pinterest. Wayne has contributed the following description of his setup:

The Raspberry Pi can make a nice security camera in a SecuritySpy system with surprisingly little effort. I wanted a way of seeing what temperatures my kilns were, especially when they were cool enough to open and take the glass out. I had a Raspberry Pi (RPi) equipped with USB WiFi dongle and an old Logitech QuickCam Pro 9000 webcam sitting around from my old PC days. A little research on the web led me to many ways to use the RPi with the webcam and I used the instructions on this page as the basis of my setup. Someone has done all the software development work for us in a program call Motion.

Following the step-by-step instructions at the above page yielded perfect results, first time. Just go to another computer and enter the IP address of the RPi and the port used by Motion into a web browser and you see streaming video. To get this working in SecuritySpy, open the Video Device Settings window, add a new network device and choose Manual Configuration for the device type. Enter the RPi’s IP address, the HTTP port number used by Motion, and any username/password you have set up in Motion. Click the OK button and up it comes. Once the RPi is configured to run Motion, the powered USB adapter, HDMI screen, mouse and keyboard can all be unplugged from the RPi.

You can download my config file for Motion in order to help your own setup. Here are a few of my photos and screenshots to demonstrate my setup:

 

Tagged , , , , ,

7 thoughts on “Raspberry Pi Camera to SecuritySpy

  1. John says:

    This is very cool, but I don’t think it takes advantage of the built-in hardware for processing video on the Pi. The Pi has an accompanying camera that plugs into a dedicated camera connection directly into the SoC, allowing for 1080p30 h264 capture with low CPU usage.

    It’s possible to stream the h264 stream over wired Ethernet to VLC, but I’d had no success getting it into SecuritySpy. Is there any interest in this? It would make a fantastic <$100 camera. There's even an IR camera option.

    • bensoftware says:

      Hi John,

      Thanks for the info, I wasn’t aware of this. If it works with VLC then it should work with SecuritySpy. There must be some RTSP URL associated with the stream, for example rtsp://camera-ip-address/stream.h264 – i.e. the URL you enter in VLC to view the stream. Set up a new network device in SecuritySpy, set the device type to Manual, and choose RTSP as the format. Enter the last bit of the URL (in the above example this would be stream.h264) as the Request. These settings should bring the stream into SecuritySpy – can you confirm?

      • John says:

        So I used the command line here: http://www.mybigideas.co.uk/RPi/RPiCamera/

        The RTSP option did work in SecuritySpy 3.3. I got a 1080p camera working that does >20fps for <$80. The first stream I tried was about 15mbps.

        I would love to add trivial password authentication, but haven't dug too deep yet.

        I also haven't gotten any audio options working. Is there a good way to stream audio separately and then merge in SecuritySpy?

        • bensoftware says:

          Hi John, this is great, thanks for testing and reporting back.

          With RTSP input into SecuritySpy, there is currently no way to add a separate audio stream; the audio data must be part of the RTSP session. This is standard for RTSP: one session contains both a video and audio component, rather than having separate connections/streams for each. Please report back if you manage to get this working!

    • Paul says:

      I’ve had some success with the camera and Security Spy using a slightly different approach which gives me 1920×1080@30fps with about 15-20% CPU load on a RPI Model B. This method relies on the bcm2835_v4l2 module being loaded (a V4L2 interface for the camera) and has the advantage of using VLC directly without the need of a pipe. There seems to be less latency this way and so far has been up and running for about a week with no problems. (c)vlc has excellent documentation and there appears to be support for a password for RTSP (–sout-rtsp-pwd) although I haven’t used that. Below is what I’m using on a fairly standard Raspbian install:

      cvlc v4l2:///dev/video0 –v4l2-width 1920 –v4l2-height 1080 –v4l2-chroma h264 –v4l2-fps 30 —-sout ‘#rtp{sdp=rtsp://:8554/}’

  2. Rick says:

    I’d definitely be interested to know if this works with the RPi camera, this would make a very good setup for me if it does, as I have 4 RPi’s around the house that I could just attach a camera to and then feed it all to SecuritySpy.

  3. IP network cameras says:

    It is great to know that Webcam can also be treated as a IP Camera with some tricks. Thanks fot this post.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>