一台视频混合渲染器 9 (VMR9) 可以渲染更多视频流吗?
我使用相同数量的 VMR9 实例以 Windows 形式渲染多个视频流。我使用 DirectShowLib-2005 在 C# 中执行此操作。
如果需要显示 100 个视频,我将创建 100 个 FilterGraph (IFilterGraph2),每个 FilterGraph 将容纳一个 VMR9 实例 (VideoMixinRenderer9),每个实例将渲染 1 个视频流。
这会很快耗尽 RAM...
我可以让一个 VMR9 过滤器渲染多个视频流,这样我就可以减少 VMR9 实例的数量,并渲染更多数量的视频流吗?
任何帮助将不胜感激。
I am rendering a number of video streams in a Windows form, using the same number of VMR9 instances. I am doing this in C# using DirectShowLib-2005.
If there is a need to display 100 videos, I will create 100 FilterGraphs (IFilterGraph2) that will hold one VMR9 instance (VideoMixingRenderer9) each, that will each render 1 video stream.
This uses up the RAM quickly...
Can I make one VMR9 filter render more than one video stream, so I have less VMR9 instances, and more number of video streams rendered?
Any help will be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯...我想通了...如果有人有更好的示例,请在此处发布,我会将其标记为已接受的答案。
图表:
如果您在 GrapgEdit(或其他东西)中渲染它,它会显示第一个( Input0) 流和其下方的第二个流 (Input1),但我希望它们同时可见!
为此,必须对 VMR9 进行如下配置(错误处理和省略一些 VMR9 配置):
此后,流将在剪辑窗口的左上角和右下角部分呈现,并且它们都是正确显示和渲染!!!
如果您想显示更多视频流,只需
相应地设置NumberOfStreams
,并为每个流配置NormalizedRect
。这样我就可以使用一个 VMR9 实例渲染更多流,而且不需要担心 RAM 耗尽。现在VMR9真正的酷炫表现出来了...:D xD
PS
看起来 16 个流已经是极限了......
Well... I figured it out... if someone has a better example, please post it here, I will mark it as an accepted answer.
The graph:
If you render this in GrapgEdit (or something else) it displays the first (Input0) stream and the second one (Input1) underneath it, but I want them to be visible at the same time!
To do this, VMR9 must be configured as such (error handling and some VMR9 configuration omitted):
After this, the streams are rendered in top left and bottom right portion of the clipping window, and they are both shown and rendered correctly!!!
If you want to display more video streams, just
SetNumberOfStreams
accordingly, and configureNormalizedRect
for each one. This way I can render more streams with one VMR9 instance, and I don't need to worry about RAM running out.Now the true coolness of VMR9 shows up... :D xD
PS
It looks like 16 streams is the limit...