[英]Frame rate of video file in universal windows platform
How can I access frame rate of video file in Windows 10 application? 如何在Windows 10应用程序中访问视频文件的帧频 ?
I tried external libraries like MediaInfoNet , or taglib for reading metadata, but these are not compactible with UWP (at least nuget is telling me this). 我尝试使用MediaInfoNet或taglib之类的外部库来读取元数据,但是这些库无法用UWP压缩(至少nuget告诉了我这一点)。 Also MediaElement seems pretty evolved, but has no FPS property.
MediaElement看起来也很进化,但是没有FPS属性。
Is there any option? 有什么选择吗?
After all it is easy. 毕竟这很容易。
List<string> encodingPropertiesToRetrieve = new List<string>();
encodingPropertiesToRetrieve.Add("System.Video.FrameRate");
IDictionary<string, object> encodingProperties = await file.Properties.RetrievePropertiesAsync(encodingPropertiesToRetrieve);
uint frameRateX1000 = (uint)encodingProperties["System.Video.FrameRate"];
Where file is Windows.Storage.StorageFile 其中文件是Windows.Storage.StorageFile
FrameRate is multiply by 1000. FrameRate乘以1000。
More info about Metadata Properties for Media Files . 有关媒体文件的元数据属性的更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.