Re: [python-win32] Using win32gui.FindWindow() results in black or white screen

2021-06-03 Thread Greg Ewing

On 4/06/21 4:59 am, Dennis Lee Bieber wrote:

Many video apps don't display in "Windows". The window you grabbed is a
basically a hole through which the graphics chips are rendering and are not
available, and the render is not part of the window itself.

When grabbing the entire screen, you are getting the screen buffer
which includes the video.


Maybe you could find the size and position of the window, and
then extract the relevant part from a full screen capture?

--
Greg

___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Using win32gui.FindWindow() results in black or white screen

2021-06-03 Thread Tim Roberts

CodingMan125 wrote:



Dear, List Members using the FindWindow function from win32gui to find 
the window handle of a certain window through window name to enable 
video capture of certain window results in a black screen. Although 
trying the same code without a window handle to default it to 
capturing the whole screen results in a successful video capture, the 
same code however results in a black or white screen when trying to 
capture a specific window with window handle. How can I solve this?


In general, you can't.  From your description and from the comments in 
the code, I'm assuming you're trying to capture some kind of multimedia 
stream -- a movie playback or a camera live view.  In that case, the 
video stream is not actually contained in the application window.  
Instead, the video is rendered in its native format (usually a YUV 
format) into an offscreen region. That offscreen region is then used as 
a texture surface which the GPU's 3D engine renders onto the visible 
screen.  The application window remains a solid color, which is used as 
a chromakey (like a "green screen") to allow menus to be easily drawn on 
top.


--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.




smime.p7s
Description: S/MIME Cryptographic Signature
___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32