Welcome to MSDN Blogs Sign in | Join | Help

TimeCode Ranges from Windows Media Metadata

As a follow up to my previous post , I have updated the code to add the ability to extract SMPTE timecode ranges. 

 

The WMMetadataReader class (in WMMetadataReader.h) now has a public method like below:

System::Collections::Generic::List<SMPTETimeCodeRange^>^ GetSMPTERanges(String^ FilePath, int StreamIndex);

 

This allows you to explicitly get the time code ranges, for a specific video stream in a WMV file. If you want all the metadata, the GetStreamMetadata() method on the same class, now also calls the above method internally, and returns the time code ranges packaged in the WMStream.TimeCodeRanges property. The SMPTETimeCodeRange type is shown below.

SMPTETimeCodeRange

 

 

Note that the RangeNumber property stores the index of the range, in case the file has multiple time code ranges. The Start and the End property are of type string, and exposes the time code in the standard “hh:mm:ss:ff” format. To manipulate these time codes, convert them to absolute times or to otherwise work with them, you can use the very excellent TimeCode class from John Deutscher.

I have uploaded a new zip with the modified code here.

Published Saturday, November 14, 2009 2:46 PM by jitghosh

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: TimeCode Ranges from Windows Media Metadata

Great works, thanks!

Monday, November 16, 2009 4:51 PM by chrisy

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker