Shell32在windows8.1及其windows10中获取视频帧宽度

weixin_38058520 2017-06-08 10:22:53
 
在windows7下我使用下面的代码获取视频的帧高度和宽度
Shell32.ShellClass sh = new Shell32.ShellClass();
Shell32.Folder dir = sh.NameSpace(Path.GetDirectoryName(path));
Shell32.FolderItem item = dir.ParseName(Path.GetFileName(path));
string  videoWidth=dir.GetDetailsOf(item, 285);
string videoHeight=dir.GetDetailsOf(item, 283);
或者
                Dictionary<string, string> dic = new Dictionary<string, string>();
                int i = 0;
                while (true)
                {
                    //获取属性名称  
                    string key = dir.GetDetailsOf(null, i);
                    if (string.IsNullOrEmpty(key))
                    {
                        //当无属性可取时,退出循环  
                        break;
                    }
                    //获取属性值  
                    string value = dir.GetDetailsOf(item, i);
                    dic.Add(key, value);
                    DeveloperLogger.Debug(i + "__" + key + "___" + value);
                    i++;
                }
以上两种都在windows7下都可以获取到视频的帧宽度和帧高度,但在Windows8.1和Windows10中就无法获取了?
请问在Windows8.1和Windows10应该怎样获取?
...全文
11 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复

476

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧