Jump to content
  • Advertisement
Sign in to follow this  
kimryo

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

This topic is 3633 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!