WebcamStudio is really processor intensive -- offload to CPU?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

WebcamStudio is really processor intensive -- offload to CPU?

WindPower
Hi, first thank you for WebcamStudio, so far it's the only (thus the best :D) application of this kind that I've seen on Linux and it's well implemented. Except that, well, it's slow and it uses only the CPU for merging all its streams together and produce an output image. How about offloading that to the GPU, which is far more adequate for the task, will do it faster, and will let the CPU breathe a little? Right now, I can screencast but not more than 4~6 frames per second, and on top of that the desktop and applications lag a lot because all the CPU is being consumed, which is both annoying and doesn't give viewers a good impression of Linux (which is what my eventual screencast would be about).

I know this is a lot of work and I'm not even sure if it's even possible in Java, but please consider it, because as the application grows, offloading it to the GPU will become more and more crucial as it might use more resources, and it will be harder to implement because the codebase will be larger. So I think it's a good idea to start thinking about it now :)

Thanks~
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WebcamStudio is really processor intensive -- offload to CPU?

Patrick Balleux
Hi WindPower,

Actually, it is possible in one way.  Java provides some routines to manipulate graphics on the GPU and I used those routines in previous version of WS4GL to lower the CPU usage...

The thing is that in the end, it wasn't faster...  I've made a lot of tests and reverted to work using the CPU instead of the GPU because on some computer, with a cheap graphic card, the results were really bad...

The high CPU usage is mostly due to these factors:
- The webcam capture size
- The Desktop capture size
- The webcam driver (strangely, some drivers require more resources)
- The transcoding when recording in a video file
- The flash player/recorder
- The video card itself

The mixing routines for the images are efficient.  Do this simple test:  Add many Text sources or Image sources...  You will see that the CPU usage stays really low with those...  So the high cpu usage is  in the capture not in the mixing.  I'm still trying to find ways to capture using less CPU, but mostly it is a problem at the GStreamer level (Webcams, movies) or Java level (Desktop capture).

In the version 0.52, you can also use a RFB stream (VNC) as a movie source to do screen captures.  But even using VNC will require a lot of CPU usage.  Simply use a regular VNC Viewer to connect to your desktop, and you will see that the capture routines will raise the CPU usage.


I am still trying to find better ways, but nothing came up yet...

Patrick


--------------------------------------
Patrick Balleux

WS4GL Project Manager
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WebcamStudio is really processor intensive -- offload to CPU?

WindPower
Good points, good points indeed. But I still think something needs to be made about performance. For example, reverse-engineer the ustream protocol so that Webcamstudio can upload frames directly to it ;) That'd be awesome and would require no Flash, no vloopback, and no fake webcam. But it's not easy :S

By the way, I meant the title of this thread to say "GPU", silly me...
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WebcamStudio is really processor intensive -- offload to CPU?

matthartley
Administrator
Looks like performance is being addressed. :) Check it out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WebcamStudio is really processor intensive -- offload to CPU?

Anthony
Has any progress been made with this, because webcamstudio is still running slow for me even with all the effects turned off.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WebcamStudio is really processor intensive -- offload to CPU?

benny
Hi,

Faced the same issue before... now my pc running slightly better by using pipeline instead of using "Sources"->"Desktop" in the menu...

before : pc looks hang when 2 desktop screen capture running
now: ok even 3 or more desktop screen capture running

hope this helps
Loading...