从字节数组播放视频
我正在使用 Visual Basic .NET,我想播放我拥有的字节数组中的视频,但不先将其保存在磁盘上。直接来自该数组。我尝试了一段时间的 directshow lib,但没有找到播放它的方法。 WMP也不起作用。
有什么想法吗?
I am using visual basic .NET and I want to play a video from a byte array that I have, but without saving it first at the disk. Directly from that array. I tried the directshow lib for a while but didn't managed to find a way to play it. WMP didn't worked either.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有可以从内存中流式传输的库存组件,但是该任务或多或少有良好的通用解决方案。从所谓的文件源(异步)过滤器< /a>,这是通用文件/数据访问器。如果您可以提供一个从内存中流式传输的类似/兼容的源过滤器,那么它会很棒并且一次可以覆盖多种格式。
如果您在 VB.NET 和一般托管代码中很难做到这一点,那么您可能需要第三方解决方案。因此,您最终可能会得到一个更简单的解决方法,将数据保存到临时文件中并从那里播放。
There is no stock component to stream from memory, however the task has more or less good generic solution. A number of files/formats are playable starting from so called File Source (Async) Filter, which is a generic file/data accessor. If you could provide a similar/compatible source filter which streams from memory, it would wokd great and cover a number of formats at a time.
Provided that you are going to have hard time doing it in VB.NET, and in managed code in general, you will perhaps need a third party solution for this. So you might eventually end up with a much easier workaround to save data into temporary file and play it from there.