VB.NET - DirectX.AudioVideoPlayback 给出的帧大小不正确?
嘿,制作一个媒体播放器,需要了解一些东西。
我有一个读取文件信息的菜单,但由于某种原因,当我打开一个我知道尺寸为 1280x720 的视频时,宽度和高度变为 1292x758。
编辑:
当我打开一个 640x480 的视频时,它说它是 656x518
那个,并且弹出一个额外的预览框,因为:
labFR.Text = "Frame rate: " & Strings.FormatNumber((1 / AudioVideoPlayback.Video.FromFile(labinput.text, True).AverageTimePerFrame), 3)
需要播放该视频,以便我可以获得帧速率,但是一旦我有了帧率?
使用 VB.NET Framework 4.0 工作。 (VS2010)
非常感谢这些问题的答案。
Hey, making a media player and need to know something.
I have a menu which reads file info, but for some reason, when I open a video that I KNOW is 1280x720, the width and height come up as 1292x758.
Edit:
When I open a video which is 640x480, it says it's 656x518
That, and an extra preview box pops up due to:
labFR.Text = "Frame rate: " & Strings.FormatNumber((1 / AudioVideoPlayback.Video.FromFile(labinput.text, True).AverageTimePerFrame), 3)
This needs to be playing so I can get the frame rate, but how to I close it once I have the frame rate?
Working in VB.NET Framework 4.0. (VS2010)
Answers to either of these problems are highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
知道了。我必须在所有模块之外将视频调暗,并将自动播放设置为 false,然后我可以从视频中获取所有属性,而无需不断地在多个线程上打开视频。
然后我所要做的就是使用“openerfile”及其属性来实现我的愿望。
Got it. I have to Dim the Video outside of all the modules with autoplay set to false, then I can grab all the properties from the video without constantly opening the video on several threads over and over.
Then all I have to do is use "openerfile" and its properties for what I wish.