如何在 C# 中混合两个视频流? [英] How can I mix two streams of Video in C#?

查看:43
本文介绍了如何在 C# 中混合两个视频流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去,我使用 Managed Direct X 和 DirectShow.Net 将视频播放到简单网格上的纹理.然后,我使用相同的技术将多个视频源组合到一个纹理中,使用通过纹理公开的各种功能将这些流混合在一起.这是 2 年前的一个非常有趣的实验,非常适合在 Managed Dirext X 仍在开发和支持(不再支持)时的目的,与 DirectShow.Net 类似 - 它似乎没有更新自 2007 年 7 月起.

In the past I have used Managed Direct X and DirectShow.Net to play a video to a texture on a simple mesh. I have then used this same technique to combine multiple video sources into a single texture, using the various capabilities exposed through textures to blend these streams together. This was a very interesting experiment 2 years ago and was quite suitable for the purpose when Managed Dirext X was still being developed and supported (which is no longer is) and similarly with DirectShow.Net - it doesn't seem like it has been updated since July 2007.

我希望再次涉足这个领域,并想知道如何在 C# 中实现这一点,而不使用折旧或报废的 API,以及如何最好地处理它.

I'm looking to venture in to this space again and would like to know how this can be done in C#, without using depreciated or end-of-life API's and how best to approach it.

推荐答案

在 WPF 中很容易做到.

It's very easy to do in WPF.

使用两个 MediaElement 控件,一个在另一个之上,并使上面的一个 50% 透明.

Use two MediaElement controls, one above the other, and make the upper one 50% transparent.

但是,我认为不可能将其保存到新视频中

However, I don't think it's possible to save it into a new video

这篇关于如何在 C# 中混合两个视频流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆