views:

187

answers:

5

Hi,

I was wondering how do software like GotoMeeting capture desktop. I can do a full screen (or block by block) capture using GDI but that just seems too wasteful to me. Also I have looked into Mirror devices but I was wondering if there's a simpler technique or a library out there which does this.

I need fast and efficient desktop screen capture (10p15 fps) which I am eventually going to convert into a video file and integrate with my application to send the captured feed over the network or something.

Thanks!

A: 

What language?

.NET provides Graphics.CopyFromScreen.

Anon.
Well, I wanted a language neutral answer, more like a discussion of techniques than API calls. CopyFromScreen will do a bit by bit transfer, which like I mentioned, is kind of wasteful for me. Doing this operation 10-15 times a second on a not so powerful notebook will either make it noticeable or drain the notebook's battery or may be both. So something more efficient is needed.
verma
If there was a more efficient method, don't you think that the core .NET library would use it? If you want a "more efficient" way, it's going to involve not capturing the screen itself.
Anon.
Well, I am not saying that the .NET CopyFromScreen call is not efficient, I am just saying that for my specific case I think its wasteful. I don't want to capture the whole screen just to figure that the screen hasn't changed at all.
verma
One optimisation you could do it see if there has been any mouse movement or keyboard events since the last screen shot. If there wasn't then don't capture again.Except this wouldn't help with any windows that update themselves regardless of input, i.e. animations, videos etc.
Matt Warren
A: 

I would either:

  • Do full screen captures, and then perform image processing to isolate parts of the screen that have changed to save bandwidth.

-OR-

Andy West
Fullscreen Image Processing, hmm .. I have always isolated the image into blocks and looked for deltas, but I guess I haven't really thought about it as image processing. This means I can use the programmable GPUs to take some load off the CPU and do fast delta-detection. Awesome.
verma
+1  A: 

Yes, taking a screen capture and finding the diff between previous capture would be a good way to reduce bandwidth on transmission by sending the changes across only, of course this is similar to video encoding techniques which does this block by block.

Still means you need to do a capture plus extra processing for getting the difference, i.e, encoding it.

petantik
A: 

by using the Mirror devices you can get both the updated Rectangle that are change and also pointer to the Screen. updated Rectangle pointer point to all the rectangle that are change , these rectangle are the change rectangle that are frequently changing. filter out some of the rectangle because in one second you can get 1000 of rectangles.

Abdul jalil
A: 

i got 20 to 30 frame per second using memory driver i am display on my picture box but when i get full screen update then these frame are buffered. as picture box is slow and have change to my own component this is some how fast but not good on full screen as well averge i display 10 fps in full screen. i am facing problem in rendering frames i can capture 20 to 30 frames per second but my rendering is 8 to 10 full screen frames in one second . if any one has achive rendering frames in full screen please replay me.

Abdul jalil