Sign in to follow this  

DirectShow: Get height and width of a movie

This topic is 4801 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, does anyone know how i can get the height and width of a movie without loading it into a window? I know you can query the graph for the video window, and then call ->get_Width() and ->get_Height(), but that is very cumbersome. I just want to create a preview bitmap of a movie after the user selects it. I can get the length and type etc of the movie using the Media Detector, just from the filename, so i presume there has to be a similar way for finding width and height?! thanks ----------- [EDIT] Its ok thanks, ive found the solution, you need to use get_StreamMediaType() on the media detector. From there you can get the VIDEOINFOHEADER which contains a BITMAPHEADER. [Edited by - Skute on November 25, 2004 6:19:57 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this