Forums > Jitter

jit.dx.grab and performance problems

Dec 15 2006 | 6:27 pm

Hi there

I’m pretty new at this and have a problem. I’ve been searching around a bit on the net and in this forum but I never really found what I was looking for. I am capturing from a USB webcam, analyzing the movement and want it to be reflected in a movie. For example, if something moves fast across the screen, the movie will go faster.

The tracking is working fine but I have some performance issues. First I tried using the camera input and a mov file. When I run the patch with the camera only, I get around 50-80fps on the camera input. When I run the patch with the movie only, I get 25fps on the movie (the speed it has been set to). However, if I run both at the same time, both drop to around 5-7fps.

My second attempt was to use Flash instead of a mov and this pushed the fps to around 12-14 for both. Still not very good though.

It is running on a XP PC with a Core Duo 1.66 with 1GB RAM.

Anybody got some hints?

Dec 16 2006 | 8:51 pm

Dec 16 2006 | 9:26 pm


Could you send us a patch, so we could see what’s going on? (you might have
bunch of pwindows, @sync 1, etc)

Also, in which codec are your movies compressed? For my uses, PhotoJPEG@75%
is the best.


Dec 17 2006 | 8:12 pm

Hi guys and thanks for the replies!

Sorry for my late reply. I don’t have the patch right here right now but after intensive research I found out that it’s too much work for the computer to do everything at once. Using a USB webcam, analyzing the input from it, creating blobs, playing music, doing algorithms based on the webcam and applying it to the music. Then also run a Flash file in 1024×768 with parameters being sent to it all the time was just too much for it to handle. We tried mov, Flash and even OpenGL – with OpenGL performing the best, but everything got the CPU running at 100% and tracking running at 15-20% speed.

I can see that others have tried something similar and are suggesting Flashserver, so I will try to send it to another machine and see what happens. This will almost certainly solve the problem.

I will also try to test it on a computer with a high-end graphics card. I assume that OpenGL will run on the GPU automatically? This might also be a solution.

Dec 18 2006 | 11:13 am

For performances, I have been using two computers; one for the music and another for jitter-related things. The communication between them is per MIDI. Some things I have managed to scale down enough so that I can track, control OpenGL routines and use Max-based music routines all at the same time, but there are definite limits (the biggest probably being my graphic-card). Slowly, I am trying to gather information about performance issues, but this takes time. Questions come to mind such as:
Will a frame-grabber use less CPU-resources than a USB-Camera?
Will a firewire-camera use less resources?
Research in these lists have yielded much useful information, but I also need to test my own patches with other machines and benchmark the performance and/or look for the limits of various approaches. All pertinent information is most welcome.

Viewing 5 posts - 1 through 5 (of 5 total)

Forums > Jitter