Code Comments
Programming Forum and web based access to our favorite programming groups.Is there a video module so that I can write a Linux Perl script to record video coming over USB video cams? I'm not very experienced in Perl, but I sort of understand it. I'm more experienced with Pike, Python, and especially PHP. Right now I'm grasping at all options because I just found out that my office spent a whopping $30K on their video surveillance system, and was told it would be $13K for adding 3 more cameras to the 8 camera system, and I was thinking that I could do it for far less and pocket the profit while giving a customer a cheaper option. What about these side-thoughts: * What about recording multiple streams over multiple USB ports? (Think in the context of a security system.) * What about lossy compression? * What about recording only time slices? * How would you provide real-time video to a security guard, but then only write time-sliced, lossy compression to disk, saving disk space yet providing something very suitable for a security guard to watch live? * Side question -- ever run USB over long distances WITHOUT using a repeater that requires AC power? Did you get it to work with some sort of CAT5 or CAT6 arrangement?
Post Follow-up to this messagegooglemike@hotpop.com writes: > Is there a video module so that I can write a Linux Perl script to > record video coming over USB video cams? I'm not very experienced in > Perl, but I sort of understand it. At the moment there are no perl modules (that I know of <- disclaimer) that provides you with an API to grab video directly, but you could use perl to wrap linux executables that grab and encode/transcode video for you. I would try and find out: - which USB cameras supports the video4Linux interface. - Look at 'mencoder' and 'transcode' and see which fits your need the best. - Teach yourself perl so you can write nice wrapper-modules for either, and provide yourself with an api for grabbing video. :) I see no reason why it shouldn't be possible to do this. > What about these side-thoughts: > * What about recording multiple streams over multiple USB ports? > (Think in the context of a security system.) Shouldn't be a problem. You'll get into a problem with maximum usb-cable length, but having several small computers with several usb-cameras attached would be neat. > * What about lossy compression? video quality from usb-cameras will be poor (depending on price) anyway. Why not encode do MPEG-4 right away and use that for both live and stored feeds? > * What about recording only time slices? It should be very feasible to script this. > * How would you provide real-time video to a security guard, but then > only write time-sliced, lossy compression to disk, saving disk space > yet providing something very suitable for a security guard to watch > live? Storage today is pretty cheap and abundant. Why store only time slices? I see the point for long time storage and would suggest a solution for degrading the video over time. ie. after 1-3-6 months degrade to time sliced storage. I leave it up to you to investigate a solution. :) I see no problem implementing this in Perl, but my internal compass tells me we are entering the land of C at this point. :) Thomas -- : Thomas Malt.: tm@linpro.no ...: http://www.malt.no/ ...: +4797748504 : : Linpro AS...: info@linpro.no .: http://www.linpro.no/ .: +4722871180 : : :... >> Ledende på Linux i Norge >> Best på alt i verden :
Post Follow-up to this messagewrote: [ video recording ] > What about these side-thoughts: > > * What about recording multiple streams over multiple USB ports? (Think > in the context of a security system.) > > * What about lossy compression? > > * What about recording only time slices? > > * How would you provide real-time video to a security guard, but then > only write time-sliced, lossy compression to disk, saving disk space > yet providing something very suitable for a security guard to watch > live? Isn't there an OS project for Linux that does this? Check out Freshmeat. Perl sounds to me like a very very odd choice for a project like this. > * Side question -- ever run USB over long distances WITHOUT using a > repeater that requires AC power? Did you get it to work with some sort > of CAT5 or CAT6 arrangement? My computer BSoDs when I use a normal USB extension cable... -- John Small Perl scripts: http://johnbokma.com/perl/ Perl programmer available: http://castleamber.com/ Happy Customers: http://castleamber.com/testimonials.html
Post Follow-up to this messagewrote: > I now have to counter the CCTV or video over Ethernet solution. Someone > pointed out that the Linux drivers for CCTV or Video over Ethernet are > not readily available yet. Instead, USB video drivers are more readily > available. So then it comes down to the distance problem, which has now > been solved. Supposedly with this part, I can run USB over 100 feet: > > http://cpc.farnell.com/jsp/endecaSe...U=CS11725&N=401 Thanks, will find out if I can buy those here (Mexico). I want to be able to put my webcam on the roof :-) -- John Small Perl scripts: http://johnbokma.com/perl/ Perl programmer available: http://castleamber.com/ Happy Customers: http://castleamber.com/testimonials.html
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.