Slashdot Mirror


Security Camera-to-DVR Setup on Linux?

mrperkins asks: "I have been asked to help a friend setup a Linux DVR (Digital Video Recording) system for security cameras. Previously this has been done on Windows XP using Avermedia video capture cards from the MP3000 and MP5000 series, and using their bundled software. They have a Linux version but the software is horribly broken. The Windows software allows playback/recording/backup from 4-16 cameras. This works reasonably well but certainly has it's share of problems - the PC's hardware being only one. Can this be done on Linux using Free Software and compatible hardware? I have heard that the frame rates achievable under video4linux are simply too slow, but I would like to prove otherwise! Are there any software packages that can do this kind of thing (not just a single stream but a fully featured package)? Also, what cards (pref. up to max $200US) would you recommend? If anyone is already doing this kind of thing please let me know what you're using!"

36 comments

  1. If someone knew the answer.... by Anonymous Coward · · Score: 0

    If someone knew the answer to that, they'd be rich already as you would know.

  2. Low Frame Rates? No Problem. by acramon1 · · Score: 3, Informative

    Although the frame rates may be low (I don't know, never tried), I can't imagine a necessity for high frame rates when it comes to digital recording for security. Certainly 5 FPS should be enough to get a good shot at a criminal in the act.

    But if you don't want to take any chances, I suppose the higher the FPS, the better.

    1. Re:Low Frame Rates? No Problem. by TykeClone · · Score: 2, Informative
      Actually, wouldn't even 1 FPS be good enough for security - people don't move fast enough to pass the entire field of view for the camera in less than a second.

      The best solution would be to take several pictures per second when movement is detected within the field of view.

      --
      A fine is a tax you pay for doing wrong and a tax is a fine you pay for doing all right.
    2. Re:Low Frame Rates? No Problem. by asteinberg · · Score: 3, Informative

      Try Motion. I've messed around with it in the past and it seems to work great.

      --
      The first ever Ultimate Frisbee video game: here (now
    3. Re:Low Frame Rates? No Problem. by Directrix1 · · Score: 1

      As far as hardware goes does anybody have any thoughts on the Osprey 100.

      --
      Occam's razor is the blind faith in the natural selection of least resistance and in universal oversimplification. -- EF
    4. Re:Low Frame Rates? No Problem. by daveashcroft · · Score: 1

      Hmmm, wanting more than 5FPS for "security" recording can mean only one thing......he is setting up a bank of camera's in the shower room in the women's dorm.

      Otherwise, 5FPS is way enough.....most systems i have come across (no pun intended) are 1 or 0.5 FPS.

    5. Re:Low Frame Rates? No Problem. by Roadmaster · · Score: 1

      what if you get robbed by the flash? i bet superman could also move fat enough eh? eh? what about that?

  3. I've been looking for this too - by chuckcolby · · Score: 3, Interesting
    I've been casting about for this as well. So far, the best one I've found is here. Check it out, it's pretty feature rich. Like anything, it will take a little up front configuration.

    Don't forget to donate!

    --
    We all get along together like tornadoes and trailer parks.
    1. Re:I've been looking for this too - by Anonymous Coward · · Score: 0

      The problem is that most of the cards listed on ZoneMinder's site are uncompressed video cards. IF you want to store a week's history of video (not just when motion was detected...) good luck. If you put one of these in a 7-11, there will be continuous motion, so the amount saved would be very little.

      I had a similar project, and used Hauppage WinTV PVR cards. These output to MPEG2 pre-compressed, so you can just save the stream to hard drive easily. (or use mencoder to do some transforms.)

  4. Motion by angst_ridden_hipster · · Score: 4, Informative

    Try Motion.

    I have a security system for my house running on an older version of Motion. This is what can happen when a gadget-freak has a paranoid girlfriend...

    The system has more than three and fewer than nine cameras, some obvious, some concealed in and around the house. Each camera goes into a BT878-compatible card (some dedicated cards, some multiport).

    When motion is detected, I can capture on the order of 10-15 fps (not at stunning resolution, admittedly, but 320x240 pixels is good enough for me). If there is motion on two or more cameras, the frame rate decreases. Captured images are saved as timestamped JPEGs in a hierarchical directory structure, along with MPEGs that are assembled of each incident. This is not a particularly mighty machine; it's an Athlon 1800+ with 512MB memory. The limiting factor tends to be the PCI bus when you have a lot of cameras.

    Motion supports some nice features. You can set noise and motion detection threshholds on a per-camera basis. You can use a 256-level grayscale image for a sensitivity map, so you can mask certain regions out or decrease their contribution to triggering the recording (useful if plants sway in the breeze). You can label individual cameras with descriptive text ("Front Door"), and all frames are time and date stamped.

    I have some custom scripts that manage disk space consumption, deleting the oldest data when drive capacity goes below a set level. I can maintain several week's worth of data in normal conditions. I monitor my setup with a secured Apache setup that groks the file layout, and provides some additional telemetry.

    If you need to view data in realtime (normally, I don't), you can use something like Cambozola. If you look at the Motion email archives, you'll find postings on how to run multiple Cambozola applets in a single browser window.

    You can do cool stuff, like linking motion detection alarms to scripts. When a known burglary suspect was seen casing the joint, I had some of the cameras send an email to page my phone when they detected motion. Some of the images captured were useful for the police in an ongoing investigation.

    Also noteworthy, Motion has one of the friendliest and most helpful communities of any OS project I've been involved with. The mailing list is a great resource, and the maintainers will often go out of their way to help on even the most bone-headed newbie configuration questions on unsupported hardware.

    --
    Eloi, Eloi, lema sabachtani?
    www.fogbound.net
    1. Re:Motion by GigsVT · · Score: 2, Interesting

      I have a very similar setup. It's mostly only limited by the number of PCI slots you have.

      I didn't bother with "outdoor rated" cameras. I just used cheap B+W cube cameras, put a line of silicone around any seals on them, and used artic silver thermal epoxy to glue a small heat sink on the back of them (they get surprisingly hot).

      The outdoor ones aren't in direct weather, but generally under eaves and the like.

      Good move not saying exactly how many cameras you have, I would have probably let that slip. :)

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    2. Re:Motion by bergeron76 · · Score: 2, Funny


      This is what can happen when a gadget-freak has a paranoid girlfriend...


      Translation:

      The lengths a paranoid gadget-freak will go to protect his only girlfriend ever.

      (parent - I'm just joking; your post is very insightful)

      --
      Don't think that a small group of dedicated individuals can't change the world. It's the only thing that ever has.
    3. Re:Motion by kabocox · · Score: 3, Funny

      Just make sure you never give out your address on /. You'd find dozens of geeks coming by your house just to drool at the video setup.

    4. Re:Motion by angst_ridden_hipster · · Score: 1

      Hey! Be nice!

      I suppose the system could look like a paranoid's nightmarish control system. After all, I could easily use it to monitor all my girlfriend's activities, when she comes and goes, what visitors are at the house, etc. But that's a double-edged sword -- she can monitor me just as easily. Then again, either of us have the ability to go and deactivate the system (or delete files). I can see how a system like this could be a divorce lawyer's wet dream.

      We've been living in this house for four years. In the first two years, we were burglarized twice -- that's enough to induce some paranoia. Where I grew up, you left your doors unlocked and your car keys hanging by the front door, so it's a real mental shift for me.

      In any case, the cameras are just a backup system in case the alarm system doesn't stop a burglar, and they somehow escape the teeth of my vicious, vicious housecat.

      --
      Eloi, Eloi, lema sabachtani?
      www.fogbound.net
    5. Re:Motion by dna_(c)(tm)(r) · · Score: 1

      Motion triggers camera, /. crowd drooling on the patio. This could be a whole new way to /. a server. Can somebody set up a mirror before it goes down ?

    6. Re:Motion by spaceyhackerlady · · Score: 2, Interesting

      Allow me to second the suggestion for Motion.

      I've quietly run a security camera with Motion in my cubicle at work for a couple of years now. It's picked up lots of interesting things, and cost a bad security guard his job.

      Hardware? I've experimented. My current setup is a Logitech QuickCam Pro 4000 on USB. I tried a cheapie BT878 card but wasn't happy with the results. The hardware is a 733 MHz Pentium 3 running a heavily patched and upgraded system that started life as RedHat 7.3.

      If things look interesting during the day I use CamStream and mjpegtools to make timelapse videos of the view out my window.

      ...laura

  5. Why not take the easy way out... by CliffH · · Score: 2, Insightful

    ... and either:

    1) Use XP because that does do the job

    or

    2) Buy some Axis cameras, spool the captures to your Linux box (preferably with time stamping turned on in the Axis camera), make some mpeg or DiVX videos from the captured images, timestamp as you save them (setup a cron job to do this), and then backup to a secure place.

    I've done a few of these installs now and either one of those ways will work. You will ALWAYS have trade-offs (easy route is going to be an XP solution, the more involved route but negligibly cheaper is going to be the Axis solution) so choose wisely. If anyone comes up with another way, I would love to hear it.

    CliffH

    --
    sigs are like a box of chocolates, they all suck remove the underscores to email me
  6. Use the windows product by np_bernstein · · Score: 4, Insightful


    I'm a unix administrator. I believe in unix's flexibility and open architecture allows for better system administration, and thus better service/uptime/etc. However, I also firmly believe in using the best tool for the job. If a windows system will allow you to do what you need to do with a minimal amount of work, and a linux solution is not available, or will require a lot of work, use the windows program. That's just common sense.



    --
    RandomAndInteresting.comdefending the world from stupidity since 1979
    1. Re:Use the windows product by karnal · · Score: 1, Flamebait

      You're new here, aren't you?

      --
      Karnal
    2. Re:Use the windows product by CaptainTux · · Score: 2, Insightful
      I definately support using the right too for the job (which, in this case, does seem to be Windows) but think about this: The *only* reason this is easier on Windows is because someone took the time to make it happen. If someone were to do the same thing on Linux then it would broaden the market and allow future users more choice. So, by doing this on Linux instead of Windows the OP wins in two ways: 1) he gets his DVR based security cam setup on Linux and 2) he contributes something to the community so that others looking for the same thing will have options.

      Solutions like these will stay in the Windows world until someone takes the time to bring them to Linux. Why not someone who has an itch?

      --
      Anthony Papillion
      Advanced Data Concepts, Inc.
      "Quality Custom Software and IT Services"
  7. Rolling your own by KingOfBLASH · · Score: 2, Informative

    Rolling your own through a shell script shouldn't be hard. MPlayer supports grabbing video and compressing it on the fly (see link). So create 2 shell scripts, one to switch files for each camera (have an alpha and beta file), and one to backup the files to your favorite media. Then run a cron job. Every hour (or day) switch the files and do whatever you need with the files. It should even be possible to create redundant copies across the network, so you can keep a copy safe.

  8. This is for pr0n, right? by Anonymous Coward · · Score: 0

    Who wants to bet that this an elaborate plan to wire the female dorms with cameras?

  9. You must be new here... by wronskyMan · · Score: 1


    Posting a question about security cameras on Slashdot! We know that only the Big Bad Government(tm) uses them.
    </flameproof suit>

    --
    --- You shall know the truth, and the truth shall make you mad- Neal (not Cowboy) Boortz
  10. I'll be doing something similar shortly by shepd · · Score: 1

    Using the Microjack 4-eyes card (way cheaper than 4 separate capture cards). It's got 4 inputs and a BT878 encoder so I have a good feeling I'll get it working.

    The software I'll use is ZoneMinder.

    I'll post my success. :-)

    --
    If you could be told what you can see or read, then it follows that you could be told what to say or think - BoC
    1. Re:I'll be doing something similar shortly by Dibblah · · Score: 2, Informative

      In fact, it has one input, internally multiplexed into the card. Your app will have to grok this.

      What this means is the maximum frame rate while running all inputs is somewhere under 15fps / card, switching between the inputs as required between frames, which is still acceptable.

      I'd also suggest looking on ebay

      Unless, of course, you're paranoid enough not to give your address to someone that is selling security gear.

  11. linux toys by techgeek10101 · · Score: 0

    I recently picked up a book entitled Linux Toys by Christopher Negus (link here). Pretty kewl book with a dvr how-to project (all source code on cd).

  12. I know this one by thefiish · · Score: 3, Informative

    Disclaimer: I sell these & other dvr type products.

    If you are going for Windows use a GeoVision card.
    -Their variety of features is better than most. -The question of stability comes down to the OS. The application runs fine for months - Streaming via net, Remote recording etc etc

    If you go Linux you can try the HiCap card. It also has a windows software package. The Linux software is not as good as the Windows one but for a home user its pretty good. These cards only go up to 200fps, so for PAL you are limited for 8 cameras for Real-time Display.

    Please note that I am still searching for a card supported by Linux that has every feature I would like to sell but for a home user these are more than enough for basic door monitoring while blocking out that waving tree to use motion detection.

    Both cards support up 16 cameras - depending on the model with the smallest being 4 (still has same features). Motion etc & pretty must anything else you want.

    Price range AU$400-2000.
    Google for links. Id be biased :D

    --
    and the monkey flips the switch
    1. Re:I know this one by thefiish · · Score: 1

      Sorry. I should probably point out that these cards refers to the HiCap brand only. The GeoVisions go up to 400/480 PAL/NTSC.

      I work for neither of these companies & purely sell similar equipment.

      --
      and the monkey flips the switch
  13. linux sec. cams by bobsalt · · Score: 2, Interesting

    I don't record full motion as what I am doing is just for security purposes. I setup up a location with 4-8 Panasonic cameras. they come in different flavors. kx-hcm270 is a wireless outdoor model. It can pan and tilt and has pretty good range. I've gotten over a 1000' range using a wap11 with an ext omni. I set the cameras to upload a pic every 5 seconds. I set up scripts that embed a time stamp on the pic using image magicks convert command. I have a bunch of folders that I share out so people can go back up to 88 hours to look at the pics, at the end of 88 hours, I use ffmpeg to pack the days images into a mpeg file. works great, if someone is interested, I will put together a howto on it.

    1. Re:linux sec. cams by pbulteel73 · · Score: 1

      I would be interested. I've been looking for this type of setup and haven't started on one yet. When I get it started I'd gladly document the steps I take to put a How-To together. Part of what I'm planning on doing goes hand-in-hand with my MisterHouse home automation setup.

    2. Re:linux sec. cams by bobsalt · · Score: 1

      k, I will do something similar to what I did here...
      http://rrust.com/linuxpdfserver_howto.html
      what me to drop you an email at your website when I'm done with it?

  14. On the other hand.... by JeffTL · · Score: 1

    ...how do we knowthat Windows is the best tool for the job?

    It might be if there is no network connectivity (a functionality limitation for keeping the worms out). Windows is pretty high maintenance, too.

  15. I do this. by Zurk · · Score: 1

    I sell DVRs based on a CDROM ISO image of debian linux (boots sraight from ROM, so no problems with disks failing etc) and custom software which runs on top of linux.
    i use a modified BTTV based card (or a hardware ASIC for more than 4 cameras) with several patches to the regular bttv drivers for multiple inputs and a java application to handle the parsing and recording.
    If youre looking for unix based DVRs with multiple cameras i can sell you a unit for upto 64 cameras at rates of up to 2000+ fps.

  16. isn't this just TIVO with muxed input on the video by pensivemusic · · Score: 1

    a real simple kludge would be to have your Linux based TIVO recorder capture line signals fed from a video mux box. receiving input signals any attached video cams. treat the signal like a programmed channel on cable or sat? is ... http://www.computing.net/linux/wwwboard/forum/2537 5.html ... helpful?

  17. Elvis by severett · · Score: 1

    From the website:
    Linux Video Surveillance AKA eLViS provides a user interface for watching motion frames captured by the motion program as JPEG files. eLViS lets you view up to four motion threads and has a simple configuration panel to setup the motion.conf file and eLViS configurations.

    eLViS is intended to be used as a low cost security monitoring system. For that reason we have chosen Linux for the high reliability and flexible licensing of software.

    We recommend that you use eLViS on a standalone Linux system that is dedicated to this task.

    http://www.silicontao.com/software/lvs/doc/infor ma tion.html

  18. Check out the CamTrace by herve76 · · Score: 0

    http://camtrace.nerim.net/francais/produits/ligh t-tech.htm