Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Unable to read certain mp4 file attributes using Windows Media SDK Media.GetItemInfo Method

$
0
0
I am using the WMPLib to obtain various attribute on H.264 encoded mp4 files. I encode them either with Intel GPU or use a CPU software encoder. In either case, somewhat randomly, some files that were encoded will not return valid attributes using the Windows Media Player's WMPLIB method getIteminfo ( ). It returns null values on attributes such as FrameRate, or zero values on Duration, Width, Height, etc. Yet, I can play these files with the Window Media Player application, and using Mediaarea's MediaInfo, all attributes seem to be in place. I've seen this happen in both Windows 7 and Windows 10.  Interestingly,I discovered, if I make a copy of the 'bad' mp4 file using Windows Explorer, the copy will then return valid attributes for framerate, Duration, etc.  This works for all the files that originally produced invalid values. How can I diagnose this? 

Viewing all articles
Browse latest Browse all 8156


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>