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.




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.

Comments (1)

  1. chrisy says:

    Great works, thanks!

Skip to main content