Sign in to follow this  

How to retrieve total length and FPS of a wmv clip by WMV Format SDK

This topic is 3415 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

How to retrieve total length of a wmv clip, any media time format(frames, seconds, etc) is ok. I've already search through the SDK document, it seems there is no explicit function to get this information. Loop through all file by GetNextSample to get total munber of frames would crash performance. And how to get the fps of a regular wmv clip? While the WMVIDEOINFOHEADER's AvgTimePerFrame is always empty by document. Any indication is appreciate. Thx in advance.

Share this post


Link to post
Share on other sites
Get total length of wmv via IWMHeaderInfo depends on whether the header of wmv stored TotalFrames attribute, while most of files do not saved with this attribute, so it is no a way to go;
Get fps via GetNextSample's return value maybe the 100% way to get fps, but, I've ever got a wrong value while the file can be normally play by Windows Media Player(Maybe the file is corrupt, but how can Windows media player play it rightly?).

Any one got any ideas?
Thx in advance.

Share this post


Link to post
Share on other sites

This topic is 3415 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this