Page 1 of 1

DirectX & Screen Captures

Posted: 28 Jun 2005 09:20
by Noyce
Hi,

While using VLC (0.8.0) I'll hit the scroll lock button, and then use my image capturing software ("Snag-It") to take a pic of a video scene.
99% of the time, here's what I get:

Image

OR...

Image

However, once in a blue moon, it'll work and I'll get a working capture.
Another strange point to add is that I'm always able to successfully capture images if I load the video in "VirtualDub"

Anyway, and feedback on what I need to do to get working image caps of video in VLC would be greatly appreciated. :wink:

Posted: 28 Jun 2005 09:29
by rsaccon
Update to versio 0.82, it has built-in snapshot function !!

Posted: 28 Jun 2005 20:33
by Noyce
Update to versio 0.82, it has built-in snapshot function !!
I forgot to mention that I already tried the later versions and got the same result. I'm just using 0.8.0 because it's less buggy.

So the issue still remains - can anyone offer any ideas/tips on what do here?
Thanks again.

Posted: 29 Jun 2005 14:55
by The DJ
Use version 0.8.2, Run you movie
Select Menu->VIdeo->Snapshot

And the snapshot will be in your My Pictures folder.

Posted: 11 Jul 2005 00:13
by Noyce
Use version 0.8.2, Run you movie
Select Menu->VIdeo->Snapshot

And the snapshot will be in your My Pictures folder.
:| Thanks for the response, but the whole point of my inquiry is to find out why the combination of snag-it & vlc almost never work and on occasion do - I am not looking for an alternative method - I'd like to fix the current one.
It must be a matter of proper settings or something else I need to tweak.
(I must emphasize that the version number of vlc is irrelevant, as I've troubleshooted with multiple versions, including the latest.)

Can anyone else offer any insight or tips?
Thanks.

Posted: 11 Jul 2005 12:39
by dionoea
if you're running several instances (or video outputs) of VLC, only the first one will use overlay ... so your screen shots will work on the other instances.

Posted: 11 Jul 2005 21:40
by Noyce
if you're running several instances (or video outputs) of VLC, only the first one will use overlay ... so your screen shots will work on the other instances.
Thanks for the reply dionoea :)
I don't quite follow you, but I can tell you that I only ever use one instance of VLC at a time...

Anyone know why it works very rarely and doesn't most of the time?

Screenshots

Posted: 12 Jul 2005 02:15
by Fakeout
The underlying cause as to why you cannot capture the VLC screen has to do with how Windows draws the pixels to the screen and how your screen-capture program grabs this data. Most applications rely on the windows framework to handle the graphics, and windows draws everything to an offscreen buffer, and then draw all the pixels at once to the current frame (what you see). Most screen capture applications just dump the raw data from the offscreen buffer to a file, which works for most things.

However, applications that use streaming video can go around the windows framework and will draw their pixels to what's called an "Overlay surface". Basically, think of the overlay surface as a direct link to the video memory so the application can get increased performance, less overhead and can directly access so video card features for image enhancement. The downside is that since the pixels never get written to the buffer, your screen capture application will capture a black or corrupt image.

How do you get around this? Three ways I know of:

1) Check your screen capture application and see if it has an option to capture overlay surfaces. It might be an option for something like "capture DVD playback" or "Direct3D games". I used HyperSnapDX in the past and I know you could set an option to capture surfaces.

2) Disable video accelleration. Go to Start->Settings->Control Panel->Display->Settings->Advanced->Troubleshoot and move the Hardware Accelleration bar all the way to the left (None). Click OK. This should temporarily force your video card to use the buffer memory instead of the overlay surface. Try capturing with this set to None, and be sure to switch it back to Full when you are finished.

3) As was suggested, try opening 2 instances of VLC. VLC will only set the first window to Overlay, so you should be able to play a video and capture it in the 2nd window (I haven't tried this method myself).

-Fakeout

Re: Screenshots

Posted: 12 Jul 2005 03:01
by Noyce
The underlying cause as to why you cannot capture the VLC screen has to do with how Windows draws the pixels to the screen and how your screen-capture program grabs this data. Most applications rely on the windows framework to handle the graphics, and windows draws everything to an offscreen buffer, and then draw all the pixels at once to the current frame (what you see). Most screen capture applications just dump the raw data from the offscreen buffer to a file, which works for most things.

However, applications that use streaming video can go around the windows framework and will draw their pixels to what's called an "Overlay surface". Basically, think of the overlay surface as a direct link to the video memory so the application can get increased performance, less overhead and can directly access so video card features for image enhancement. The downside is that since the pixels never get written to the buffer, your screen capture application will capture a black or corrupt image.

How do you get around this? Three ways I know of:

1) Check your screen capture application and see if it has an option to capture overlay surfaces. It might be an option for something like "capture DVD playback" or "Direct3D games". I used HyperSnapDX in the past and I know you could set an option to capture surfaces.

2) Disable video accelleration. Go to Start->Settings->Control Panel->Display->Settings->Advanced->Troubleshoot and move the Hardware Accelleration bar all the way to the left (None). Click OK. This should temporarily force your video card to use the buffer memory instead of the overlay surface. Try capturing with this set to None, and be sure to switch it back to Full when you are finished.

3) As was suggested, try opening 2 instances of VLC. VLC will only set the first window to Overlay, so you should be able to play a video and capture it in the 2nd window (I haven't tried this method myself).

-Fakeout
I don't have the overlay surfaces option in Snag-It, but I'll try the other suggestions next time I make an image cap...
Many thanks, Fakeout :) :wink:

Posted: 12 Aug 2005 17:18
by guest1
Thanks for the explanation, Fakeout. I didn't quite understand the first work around you mentioned for the screenshot problem in VLC.

You mentioned :
"1) Check your screen capture application and see if it has an option to capture overlay surfaces. It might be an option for something like "capture DVD playback" or "Direct3D games". I used HyperSnapDX in the past and I know you could set an option to capture surfaces."

Did you mean we need to disable overlay option in VLC for better snapshot performance? The command to do it is,

vlc --nooverlay

Is this correct?

Thanks,
Guest

Posted: 13 Aug 2005 02:19
by zcot
Did you mean we need to disable overlay option in VLC for better snapshot performance?
no this is not what he meant.. he meant setup your capture program to capture from the vid overlay. It may not have that capability.

If you disable overlay in vlc, then as you might get better "performance" from the capture program, -the performance of vlc with the operating system will go down.
1) Check your screen capture application and see if it has an option to capture overlay surfaces. It might be an option for something like "capture DVD playback" or "Direct3D games". I used HyperSnapDX in the past and I know you could set an option to capture surfaces.
What "capture DVD playback" or "Direct3D games" means in technical terms is that the capture program will utilize capturing from overlay(because often dvd playback and direct3d games use the overlay concept)... -just like the first sentence says "see if it has an option to capture overlay surfaces".

and I will add a 4th possibility and the last one you would want to use.

4) Disable overlay in VLC.

I think the priorities for a solution should be in this order:

1. Get your capture program to support the advanced features(overlay).

1a. Use a different capture technic that DOES support the overlay concept(this includes finding another capture program if needed).

2. Run a second instance of VLC and capture from that.

3. Use the built-in capture feature of VLC(.png or .jpg).

4. Temporarily disable overlay used by VLC.

5. Temporarily disable video acceleration from within the operating system.

Posted: 24 Dec 2005 23:41
by Noyce
Hello again ;)

Even after trying the subsequent suggestions from posters Fakeout & zcot, I have been unable to resolve this screen capture issue. :|
If there are any other suggestions, please post! Thanks. :D