Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Screen Codec

1 view
Skip to first unread message

Alessandro Angeli [MVP::DigitalMedia]

unread,
Mar 30, 2005, 3:18:06 AM3/30/05
to
Video Enhancement Developer wrote:

> Does anyone know of a way to grab video playing on the
> screen using either the screen codec or some other
> method? Currently when I capture I just get a black area
> where the video is being displayed. I assume that is
> because the video is displayed in a different plane. Can
> the screen codec or some other codec access the video?

The codec is irrelevant. Screen capture captures the
screen's bitmap, but videos are rendered on an overlay
surface for performance and quality reasons. Disable the
hardware video acceleration in the global display settings
(Control Panel -> Display), DirectX settings (dxdiag.exe) or
player settings (if any). Beside "hardware video
acceleration", this setting can be named "overlay" or
"DirectDraw overlay".

--

// Alessandro Angeli
// MVP :: Digital Media
// a dot angeli at psynet dot net


sasha

unread,
Mar 30, 2005, 12:21:53 PM3/30/05
to
Video Enhancement Developer wrote:
> Does anyone know of a way to grab video playing on the screen using either
> the screen codec or some other method? Currently when I capture I just get a
> black area where the video is being displayed. I assume that is because the
> video is displayed in a different plane. Can the screen codec or some other
> codec access the video?
>
> Thanks,

The suggestion that Mr. Angeli makes will certainly work, but it's a bit
drastic. What you can do in your app is grab the overlay surface. This
way video will be displayed on the primary surface which you will be
able to capture.

Of course, if WMP was started before your app, this approach won't work.

.a

SW

unread,
Mar 30, 2005, 2:09:04 PM3/30/05
to
Both are wonderful suggestions but let me explain what I am really needing to
do and see if anyone has suggestions. The company I work for develops
software to enhance video. We receive surveillance videos from various
vendors. There are approximately 400+ vendors with their own proprietary
format for saving video. Generally the vendors provide a player that one can
view the saved video. We need to process/enhance the video but it is in some
non-standard format that is not compatible with most systems. We would like
to grab the video as it is being played at the rate it is being played.
There are several catches to being able to do this - one being some players
do bitblts and do not use the overlay plane while some do. Second,
determining when a new frame is present to know to grab is the major
question. This challenge led me to look further into using the encoder.
Third, I can NOT disable the hardware acceleration since that would change
the quality and rate of display of the video player and the video that I am
grabbing. I have tried many, many approaches from grabbing bitmaps,
surfaces, encoders, etc. None seem to completely do what I need to do. Any
suggestions how to address these challenges?

Thanks,

sasha

unread,
Mar 30, 2005, 3:50:34 PM3/30/05
to
SW wrote:
> suggestions how to address these challenges?
>

The best approach would be for the players' vendors to provide APIs for
reading videos frame by frame. Don't know how feasible that is.

But in general, I think not going through overlay surface won't degrade
video quality too much. So you can grab the overlay surface/reduce HD
acceleration (you don't need to go all the way to no acceleration) and
use Media Encoder to capture a specific window.

hth,
.a

0 new messages