Home > Archive > PERL Modules > April 2005 > Recording Video with a Perl Module
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Recording Video with a Perl Module
|
|
| googlemike@hotpop.com 2005-04-07, 3:56 am |
| 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?
| |
| Thomas Malt 2005-04-07, 3:56 am |
| googlemike@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 :
| |
| John Bokma 2005-04-07, 3:56 am |
| wrote:
[ 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
| |
| John Bokma 2005-04-11, 3:56 pm |
| wrote:
> 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
|
|
|
|
|