locked
How to check WMV File's key frame time spacing? RRS feed

  • Question

  •  

    hi;

     

    I have a wmv file and I want to know the time spacing between the key frame in this file,

     

    if there are some utilityies and what can i do ?

     

    thanks

    Monday, July 7, 2008 5:46 AM

Answers

  • There isn't a (standard) metadata attribute that you can query for in ASF (WMV) to get the keyframe spacing.  And, in fact, keyframe spacing can vary quite a bit within a given file; for example, keyframes can be closer together in segments where the image changes a lot, and farther apart where the image is more static (like a talking head). 

     

    Your best bet might be to write a tool that uses the IWMSyncReader to do a pass over the file, reading the compressed frames and noting which ones are keyframes.  (This should be quick enough, so long as you keep the WMSyncReader in the compressed domain.)  The WMSyncReader sample in the Windows Media Format SDK should give you a general idea of how to use IWMSyncReader.

     

    Hope that helps...

     

    Tuesday, July 8, 2008 11:27 PM

All replies

  • There isn't a (standard) metadata attribute that you can query for in ASF (WMV) to get the keyframe spacing.  And, in fact, keyframe spacing can vary quite a bit within a given file; for example, keyframes can be closer together in segments where the image changes a lot, and farther apart where the image is more static (like a talking head). 

     

    Your best bet might be to write a tool that uses the IWMSyncReader to do a pass over the file, reading the compressed frames and noting which ones are keyframes.  (This should be quick enough, so long as you keep the WMSyncReader in the compressed domain.)  The WMSyncReader sample in the Windows Media Format SDK should give you a general idea of how to use IWMSyncReader.

     

    Hope that helps...

     

    Tuesday, July 8, 2008 11:27 PM
  • thanks a lot.

    Wednesday, July 9, 2008 1:24 AM