简体   繁体   English

如何创建一个DirectShow图形,它将等待传入的图像并将其作为帧添加到视频文件中?

[英]How to create a DirectShow graph which would wait for incoming images and add them as frames into video file?

How to create a DirectShow graph which would wait for incoming images and add them as frames into video file? 如何创建一个DirectShow图形,它将等待传入的图像并将其作为帧添加到视频文件中?

Using GraphEdit or with C\\C++\\C# 使用GraphEdit或C \\ C ++ \\ C#

So I want to have a graph which would work and wait for images incoming into him in any way you think is most easy (for example We can have a folder from where DSfilter would be able to take images) and insert that images as new frames of our video. 因此,我希望有一个可以工作的图形,并等待以您认为最简单的任何方式(例如,我们可以拥有一个文件夹,DSfilter可以在其中拍摄图像)将图像插入他的图像,并将其作为新帧插入我们的视频。

So how to do it? 那怎么办呢?

You need a source filter, multiplexor and file writer. 您需要一个源过滤器,多路复用器和文件编写器。 The multiplexor and file writer are stock components, but the source filter will be a custom filter. 多路复用器和文件编写器是常用组件,但是源过滤器将是自定义过滤器。 Look at the app source example on www.gdcl.co.uk for an example of a custom source filter that you can feed with frames from your app. 在www.gdcl.co.uk上查看应用程序源示例,以获取自定义源过滤器的示例,您可以将其与应用程序中的框架一起使用。

The graph will not be time-sensitive: the multiplexing is based on the timestamps attached to the samples, not on the elapsed time. 该图将不会对时间敏感:多路复用是基于样本的时间戳,而不是经过的时间。 So you set the graph running, and as a frame arrives, you attach a timestamp to it and deliver it via the source filter to the mux. 因此,您将图形设置为运行,并在到达帧时,将时间戳记附加到该时间戳记,并将其通过源过滤器传递到多路复用器。

G G

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在示例图形中添加样本采集器过滤器,以便可以使用DirectShow保存流式预览中的图像/视频? - How can i add a sample grabber filter to the graph i have so i can save images/video from the streaming preview using directshow? 在捕获视频[directshow.net]时如何添加图像(水印)? - How would you add an image (watermark) while capturing a video [directshow.net]? 如何将视频编码器添加到Windows以便DirectShow识别 - How to add a Video Encoder to windows to be recognized by DirectShow 在线程中创建DirectShow图 - Create DirectShow graph in thread 使用滞后过滤器时,如何防止DirectShow图形框架堆积? - How to keep DirectShow graph frames from bunching up when using a laggy filter? 如何使用其他文件重用DirectShow过滤器图 - How do you Reuse a DirectShow filter graph with different file 如何更改DirectShow视频的亮度? - How to change brightness of DirectShow video? 具有多个视频帧的DirectShow变换过滤器-与音频同步 - DirectShow transform filter with multiple video frames - Sync with audio C#如何保持DirectShow过滤器图形在视频窗口上运行的大小,最小化,设备丢失,重置? - C# How to keep the DirectShow filter graph running on video window resize, minimize, device lost, reset? 如何使用EmguCV获取视频文件的帧数? - How to get frames count of a video file with EmguCV?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM