在视频文件C#和DirectShow的开头添加图像? [英] Adding an image at the start of Video file C# and DirectShow?

查看:142
本文介绍了在视频文件C#和DirectShow的开头添加图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有用于录制来自网络摄像头的视频并以 filename.wmv格式存储的代码。
现在我想在视频开始处添加图像

i have code which record an video from webcam and store in "filename.wmv" format. now i want to add an image at the start of video

如何使用DirectshowLib或任何其他lib做到这一点?
是否可以使用DirectShow?

How can i do this by using DirectshowLib or any other lib? Is it possible by using DirectShow?

对于我的视频编码,请访问此链接

For my Video Recoding code go to this link

推荐答案

很难将图像添加到已经保存的视频的开头。如果在录制时能够做到这一点,则可以使用我在提供的链接的答案中建议的相同技术,只是不绘制覆盖层,而是将整个帧替换为图像。

It will be difficult to add image to the start of already saved video. If you are able to do it at the time of recording, you can use same technique I proposed in an answer to the link you provided, just don't draw overlay, but replace the whole frame with your image.

对于那些不会单击链接的人,这里是文本:

For those who won't click on the link, here's the text:


我是在软件中执行此操作,将 SampleGrabber 过滤器插入到图形中,并在图片到达后将其转换为 Bitmap 对象,然后使用 Graphics 对其进行绘制。

I'm doing it in my software in a way that SampleGrabber filter is inserted into a graph, and upon arrival of a picture, I convert it to Bitmap object, then draw on it with Graphics.

这篇关于在视频文件C#和DirectShow的开头添加图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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