From: Jason S. <jas...@gm...> - 2012-12-17 20:50:16
|
For what it's worth (and those interested) I have what I consider to be a pretty rock solid setup, which still includes Motion to some degree. Originally I was running this from a Raspberry Pi, which is why I wanted to trim Motion's resources as much as possible. I have since retired the Raspberry Pi because its USB/NIC relationship creates enough of a bottleneck for me that I wanted more speed. The USB ports and NIC are bound under a single USB hub, so speeds get shared between, which is a headache if you're sending a decent amount of data over the network to the R-Pi which is saving to a USB hard drive. Meh. Now I have Ubuntu Server 12.04.1 running on a nettop, which is nice because I have my trusty USB 2.0 speeds as well as gigabit back in the mix, along with very admirable energy efficiency. My cameras are saving to a Samba share with 24/7 H264 streams. This is done via the cameras web interface, as there are network storage options there which can point to Samba shares. Between these two cameras, I am saturating the network by a combined total of about 1.2-1.3 MB/s, which to be honest with you, is downright amazing. Two feeds, 1280x800, 20 FPS each, and I'm not even at 1.5 MB/s. My only problem is, at the end of the day I have all of these feeds. Well fortunately Motion still plays an extremely important key role in the situation. Motion is set up to scan the MJPG stream (of course) at 1 FPS. The actual motion capture is set to center, so any time things move, I get a singular centered shot of that event. I reference these snapshots first. If I find out Mr. UPS man dropped off a box at 11 AM, I can view back the feed in amazing quality to see if Mr. UPS man gently placed my package on the door step or if he John Elway'd it to the step. It makes it even nicer when I tied Apache into the mix, so I can view my snapshots from anywhere for a rough idea of what happened when based on a singular snapshot, full well knowing the full blown feeds are there if need be. Love it. Even though I did manage to get Motion decently trimmed down in size, it became less important when I swapped out the Raspberry Pi for a nettop. Zero complaints since, even though I'm still very much a fan of my R-Pi. The only downside to my setup (and I mean ONLY downside) is the disk usage, but I have an automatic script to wipe out any feed older than 5 days, so it keeps a rotating door going which is very nice. The lower resource footprint of full time recording and only 1 FPS motion detection is very nice as well, especially since I'm not using a mammoth server. If and when Motion ever integrates H264 support, I'll be using it first chance I get. Until then, MJPG can do its job with 1 FPS snapshots and the rest will be handled by other services. Thanks for all of the prior help fellas! On Mon, Dec 17, 2012 at 2:26 PM, Roman Gaufman <hac...@gm...> wrote: > Can you give more details on how you use opencv in your set up? - wouldn't > that negate using motion? > > If using net cams may as well just copy the H264 straight to the hard > drive and use opencv for detection, no? > > Sent from my iPad > > On 10 Dec 2012, at 19:22, Steve Goldsmith <sg...@gm...> wrote: > > I've used motion for several years with multiple cameras (at least three). > I now have four cameras. I started off with a 2GHz AMD CPU and frame rates > as high as 16 FPS with three netcams using MJPEG. This machine hovered > around 50% CPU (I'm not so much worried about the load value since motion > is almost always CPU bound). I recorded MPEG4s and best JPEG. > > To conserve power I consolidated to one PC with 6 cores and 16 GB RAM that > is used as a virtual host server. I now run motion with three vCPUs and it > never goes too far above 40% with four cameras. Over the years I found > center and best were a waste of CPU since the image usually wasn't the best > or centered. What I do now is only produce MPEG4s without any JPEGs. I then > send a message to a Gearman server running OpenCV that can detect people > out of images without impacting motion's performance since OpenCV's > HOGDetectMultiScale is very CPU intensive. > > Any ways, if you cheese down the power and thus the performance you will > be hard pressed to use motion effectively. > > > On Mon, Dec 10, 2012 at 1:39 PM, Joel Avery <joe...@ya...> wrote: > >> Yes, my suggestion is a bit of a money vs. <something else> tradeoff. >> That money gets in the way of lots of things. I needed a good excuse to buy >> a new laptop...... >> >> Perhaps the load is being caused partly by selecting "best". Motion needs >> to figure out what is best and I really have no idea what best means. It >> might merely mean the picture with the most changed pixels (which might >> be better to be called "most"), or it might be a far more complex >> algorithm which takes more things into account and involves some post >> analysis of the full set of pictures. >> >> I dump all the pictures and then sample every 15th or 20th to provide my >> quick summary - this gives me a picture every five seconds during the >> event. It kind of sounds like what you want to accomplish with best. >> >> Also some features might put more load on the system - I am thinking >> things like: minimum_motion_frames and pre_capture. These would seem to >> make motion continually think harder about things other than picture >> analysis. There likely are more options that fall into this camp, but these >> come to mind right away. >> >> I've given up trying to figure out lightswitch, but it would seem to >> involve another pass through the picture. >> >> Perhaps smartmask optimizes things. Although it would take effort to >> build the mask, it would reduce the number of pixels of analysis later. >> >> I have jpg quality set at 90. >> >> >> >> Joel >> >> ------------------------------ >> *From:* Jason Sauders <jas...@gm...> >> *To:* Joel Avery <joe...@ya...>; Motion discussion list < >> mot...@li...> >> *Sent:* Monday, December 10, 2012 12:43:35 PM >> >> *Subject:* Re: [Motion-user] Trim Motion's System Resources? >> >> I appreciate the suggestion, but I'm not sure that'll be overly necessary >> in my case when you consider the 150 dollar cost. Currently I have my >> cameras saving 24/7 H264 feeds directly to the Raspberry Pi via Samba. The >> onboard interface allows for this to happen. I went this route after I >> realized Motion and H264 were likely not going to happen. The reason I >> would like to still use Motion is because I'd like to take single snapshots >> via Motion of each motion event. That way I can look through 25 jpg's and >> see what happened in the last few hours without looking through a few hours >> of feeds. Doing this allows me to have the higher quality video feeds I >> want with very minimal network overhead, but utilizing Motion in the >> process allows me to easily and quickly scan the events to see what took >> place. As a result, I don't *need* Motion, but dang it would be nice to >> have. I would be much more likely to give up Motion than to drop 150 on an >> Atom powered device, simply because right now spending even 150 is kind of >> asking a lot. >> >> I do however think my camera streams are set to 1 fps for their mjpg >> profile in the camera's interface, but I'll make sure. I'll also look into >> the minimum frame that was suggested above. Thanks for the insight everyone! >> >> >> On Mon, Dec 10, 2012 at 10:48 AM, Joel Avery <joe...@ya...> wrote: >> >> For comparison: >> >> A year or so back, my motion server ran a 266 MHz processor on an ancient >> computer. I recall the load was less than one normally - it might have even >> been as low as .50. I had a single USB camera at 320x240 at 2 fps and >> despeckle turned off and the webserver running at 1 fps. I was running with >> a smartmask and an auto tuning threshold (even though the documentation >> said it did not work). I likely had other things tuned as well, but they >> don't come to mind right now. It ran on a Ubuntu command line only >> installation. I don't recall it being an overly complex job of tuning >> the system to under one via tuning the motion.conf file. I reduced the >> picture size and disabled despeckle at the same time and it was enough. >> >> I retired that device (with its 2.5 Gb hard drive) in favour of a first >> generation Aspire One netbook. It monitors 2 netcams at 640x480 at 4 fps, >> webservers at 1fps with the rest of the options set as above or at default >> if not above (if I remember correctly). So, it should be consuming more >> power as it has twice the number of cameras and the despeckled pictures are >> four times the size - it would seem to be doing eight times the work. >> >> This server (which also runs nfs, ntp, dns and ssh as my Internet server) >> is running at about .30 right now. It is also a command line only version >> of Ubuntu. The processor is a single core two thread chip: Intel(R) >> Atom(TM) CPU N270 @ 1.60GHz stepping 02 with 3191.71 BogoMIPS per thread >> (compared to a total of 550 BogoMIPS on the old AMD K7). >> >> Before I converted this to a server, I seem to recall that this device >> consumed less than 10 Watts in steady state operation as a laptop (although >> wireless might have been off). I retired the K7 and sacrificed the laptop >> to save power. >> >> Oh, neither generated movies - I can do that with convert later. They >> just captured jpgs with locate on. >> >> If you are concerned about power but don't want too much complexity, I >> picked up a new Aspire One netbook on Christmas day last year for $150 (in >> Canada). It burns between 5 and 6 Watts running Ubuntu. >> >> >> Joel >> >> ------------------------------ >> *From:* Jason Sauders <jas...@gm...> >> *To:* Motion discussion list <mot...@li...> >> *Sent:* Monday, December 10, 2012 8:39:28 AM >> *Subject:* Re: [Motion-user] Trim Motion's System Resources? >> >> That's a good idea, but it goes against the grain of what I'm trying to >> do. I don't need the horsepower of my other server to run all day every >> day, especially with knowing it's just eating electricity. It's like >> driving a bus to work everyday when a Honda would work perfectly. That's >> why I'm utilizing the Raspberry Pi as my primary server since it's only >> eating 3 watts when in use and the fact that I really only need samba and >> preferably motion, so I don't really need a quad core box for these >> services. I'll look into the other suggestions though. Thanks! >> -J >> Sent from my Android >> On Dec 10, 2012 2:25 AM, "Bob Bob" <bob...@bi...> wrote: >> >> Hi Jason >> >> I seem to remember that the "despeckle EedDl" line can be modified in a >> big way for lowering CPU utilisation. Thought I saw an old post on that. >> >> Using PPMs instead of JPGs also helps, but you'll get lots of file I/O >> and large files. >> >> Rotate other than 0 also increases the load. >> >> I don't know the Raspberry at all but if it is LAN connected you could >> always run motion on more grunty PC and use the Pi as a video streamer. >> >> Cheers Bob >> >> On 10/12/12 16:22, Jason Sauders wrote: >> >> Just to set the stage, I'm in no way shape or form suggesting that Motion >> needs trimming. I am however tinkering with Motion on a Raspberry Pi, which >> we all know is a super cool but super low powered mini computer. I have it >> modestly overclocked at 800 MHz but I'm finding that Motion is still the >> root cause of the Pi running at a sustained load of 3.50. If I stop Motion >> and leave samba, ssh, irssi, etc running, it calms down to about 0.30 load >> in no time. I'm not attempting to get that kind of load with Motion >> running, but I am curious if there's anything I can do to help tame the >> load a bit. >> >> In Motion, I'm running two cameras, 1280x800, 1 FPS each, with no video >> recordings - simply jpgs. I have no webcam running on either camera. For >> the jpg shots that are taken, I have "best" selected, so as far as I >> understand I'm getting one jpg per motion detected event. >> >> I've gone through the config files a few times, but I'm not sure where >> else I can cut corners. Is 1 FPS the absolute bottom number? Or is there >> somehow a way to effectively do .5 FPS (one frame per two seconds)? I tried >> lowering the resolution as low as 176x144, and while it helped, it was a >> very modest decrease. >> >> I know I may be asking a lot out of the Raspberry Pi, but if there's >> any way to help trim Motion to downplay the "top" numbers a bit, I'd be all >> for it. Is there anything else I can do? >> >> Thanks in advance! >> >> >> >> >> ------------------------------------------------------------------------------ >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d >> _______________________________________________ >> Motion-user mailing list >> Mot...@li... >> https://lists.sourceforge.net/lists/listinfo/motion-user >> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome >> >> >> >> ------------------------------------------------------------------------------ >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d >> _______________________________________________ >> Motion-user mailing list >> Mot...@li... >> https://lists.sourceforge.net/lists/listinfo/motion-user >> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome >> >> >> >> >> ------------------------------------------------------------------------------ >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d >> _______________________________________________ >> Motion-user mailing list >> Mot...@li... >> https://lists.sourceforge.net/lists/listinfo/motion-user >> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d >> _______________________________________________ >> Motion-user mailing list >> Mot...@li... >> https://lists.sourceforge.net/lists/listinfo/motion-user >> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome >> >> > > > -- > Steven P. Goldsmith > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > > _______________________________________________ > Motion-user mailing list > Mot...@li... > https://lists.sourceforge.net/lists/listinfo/motion-user > http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Motion-user mailing list > Mot...@li... > https://lists.sourceforge.net/lists/listinfo/motion-user > http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome > > |