Click here to Skip to main content
13,351,661 members (51,303 online)
Click here to Skip to main content
Add your own
alternative version


67 bookmarked
Posted 25 Feb 2004

Trick: How to Capture Video Screen Shots

, 25 Feb 2004
Rate this:
Please Sign up or sign in to vote.
An article describing a trick to capture video screen shots.

Video Screen Shot


This article describes a "trick" on how to capture video screen shots, irrespective of the source (file, Webcast stream, TV-input).


My task is to capture a screen shot of a video being played. It is easy to capture a screen shot of a window. However with a video being played (e.g. with Media Player), you will capture the window border and a blank video surface. I am sure there is a way to do it with DirectX and DirectShow methods, however I could not find an article on it. If anyone knows the method or a link to an article on this topic, please let me know. HyperSnap-DX from Hyperionics seems to be the only one with the "proper" way of capturing a video screen shot.

Using the code

The demo application is started, CHogVideo will attempt open and pause the video hog.dat. This is to hog the video resources (*the trick*). You can then open your Media Player (or other video players) to play the video you wish to capture. Once the video is playing, start the capture under "Options".

There are no codes specific to this article. However here are a few links to related articles:

Points of Interest

Why it works?

My guess is that the hogging video, being the first video being played, gets priority to the hardware. Subsequent videos played have to use software rendering, which enables Windows GDI to capture a copy of the frame being played.

Do I need the CHogVideo class?

No. CHogVideo is just for demonstration. You could have just started playing a video file and paused it (say with Media Player). Open a second Media Player to play the intended video screen to capture.

When it will work?

The trick will work for if the video resource is hogged first. It will work for video players that utilize DirectX approach for playing the video (this includes Windows Media Player) regardless of the source (from file, Webcast stream, TV-input).

What about Full Screen mode?

Yes, it will also capture videos in full screen mode.


  • February 16, 2004 - First version.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Chiew Heng Wah
Malaysia Malaysia
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionHow to capture a direct show window Pin
neerajgoel1-Aug-06 2:42
memberneerajgoel1-Aug-06 2:42 
AnswerRe: How to capture a direct show window [modified] Pin
achainard1-Aug-06 3:09
memberachainard1-Aug-06 3:09 
AnswerRe: How to capture a direct show window Pin
Chiew Heng Wah1-Aug-06 17:46
memberChiew Heng Wah1-Aug-06 17:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.180111.1 | Last Updated 26 Feb 2004
Article Copyright 2004 by Chiew Heng Wah
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid