Re: Video and perl



Hi there,

I got the program almost working...
Anyway i could capture frames and data at the same time. Just my webcam was
not very reliable...
In the meantime a colleague came up with a different solution... and we
tested it and it works.
So I stopped tring this. Anyway your help was appreciated, and I am still
working around in perl :). to filter all the data.

Thanks Herman Gerritsen

On 1/15/07, Herman Gerritsen <perlmailing@xxxxxxxxx> wrote:

Hi there,

I have been using your script to capture images from my webcam. That works
nicely :)
I get about 2,333 frames a second. And that is good enough for now.
This means than I can get pictures from the webcam and data from my serial
port.

Sadly a new problem arises. I want to capture them both at the same time.
When i run my serial script it uses 100% of my CPU. Since it reads 1000
ASCII characters a second and simply saves them to a file, I can not believe
it really requires that much of my CPU (I am running a Intel Pentium 4 M
1.8 Ghz).
The image capture scripts uses about 8% of my CPU but when both scripts
run they don't seem to distribute CPU time. The serial script hogs it up and
makes my webcam driver crash (not the script though).

So I wonder is it possible to make a script use a maximum (like 90%)
amount of CPU?
I couldn't find it yet.
Right now I have both scripts working from a third script with forking.
They run nicely for 30 seconds or so and than the webcam driver crashes. So
it would e very nice if I could somehow tell one of these scripts to use
only some ammount of CPU time.

Anyway Thanks for all the help this far.

Greetings
Herman Gerritsen

On 1/12/07, Herman Gerritsen < perlmailing@xxxxxxxxx> wrote:
>
> Hi there again,
>
> I got the camera set up and working. The Logitech Quickcam drivers come
> with the kernel sources these days (version 2.6.19.2 works for me) So
> that is cleared up I can now record endlessly with ffmpeg :).
> Anyway the FFmpeg perl module is bugging me :( so I figured to go for
> the V4l solution.
> I also get the "[codec/RTjpeg] Error1" thing, I cannot find the patch on
> google... So if you would be so kind to mail it to me I would be gratefull.
>
> By the way I am running perl from a linux from scratch installation (
> www.linuxfromscratch.org) It is a great way to learn stuff.
> And yes it's handy to have Suse or whatever installed next to it :)
>
> Greetz
>
> On 1/12/07, zentara < zentara@xxxxxxxxxxxxxx> wrote:
> >
> > On Thu, 11 Jan 2007 15:10:32 +0100, perlmailing@xxxxxxxxx ("Herman
> > Gerritsen") wrote:
> >
> > >I have borrowed a Logitech Quickcam messenger (046d:08f0) from my
> > brother.
> > >Got the driver working (in essence it creates the /dev/video0) but it
> > keeps
> > >crashing my players.
> > >Mplayer and ffmpeg crashes, Xawtv manages to get moving images for
> > about a
> > >second and crashes afterwards.
> > >
> > >So got to figure that one out tonight, got good hopes it will work at
> > the
> > >end of the evening.
> > >
> >
> > There is alot that can go wrong with video, there are PAL, NTSC
> > selection, etc. Maybe you are not loading the right module
> > for the camera? Or the module needs something else preloaded?
> >
> > It sounds like you might have a system problem. If you have a few
> > extra gigs of disk space, maybe try installing a newer distro that
> > sets things up automatically, like SuSE.
> >
> > When I was learning, I always had a second boot to SuSE, so I could
> > get their various configuration files, which they usually auto-detect
> > and setup correctly.
> >
> > OpenSuSE can be downloaded for free.
> >
> > zentara
> >
> > --
> > I'm not really a human, but I play one on earth.
> > http://zentara.net/japh.html
> >
> > --
> > To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
> > For additional commands, e-mail: beginners-help@xxxxxxxx
> > http://learn.perl.org/
> >
> >
> >
>



Relevant Pages

  • Re: Video and perl
    ... I have been using your script to capture images from my webcam. ... When i run my serial script it uses 100% of my CPU. ...
    (perl.beginners)
  • Re: system hang up
    ... in a loop to capture the data. ... You can always write a script to look for high cpu burners and renice ... hogging cpu time. ...
    (comp.unix.aix)
  • Re: DBI Performance Issues
    ... use the cpu or the network hardware during remote tests. ... first the live script is run from a sun solaris machine using ... server machine. ...
    (comp.lang.perl.misc)
  • Re: Thermal Monitor & automatic shutdown on over temperature event
    ... My reading has led me to believe that the kernel can do at least the CPU ... > I wrote this small script using sensors to detect and warn high temps. ... I run the script with nohup. ... > echo temp OK: $TEMP ...
    (Debian-User)
  • Re: Best computer PC/network inventory software
    ... Neither program does everything you want, but you can usually work around things that they don't - for example, creating a script and running that script remotely on all systems to add Asset Tag info. ... Automatically capture PC info over the network, ...
    (microsoft.public.windows.server.general)