我使用shellFile类来获取视频详细信息,但它只适用于几种格式。以下代码不适用于.flv或.mkv文件。我没有任何错误只是一个空值。
ShellFile shellFile = ShellFile.FromFilePath(file.FullName);
label29.Text = (shellFile.Properties.System.Video.FrameRate.Value / 1000).ToString();
label27.Text = shellFile.Properties.System.Video.FrameHeight.Value.ToString() + " px";
label26.Text = shellFile.Properties.System.Video.FrameWidth.Value.ToString() + " px";
label28.Text = shellFile.Properties.System.Video.FrameWidth.Value.ToString() + "x" + shellFile.Properties.System.Video.FrameHeight.Value.ToString() + " px";
label9.Text = (shellFile.Properties.System.Video.TotalBitrate.Value / 1000).ToString() + " kb/s";