简体   繁体   English

调整MFT问题:Windows Media Foundation中的视频合成

[英]Resize MFT Issues: Video Composition in Windows Media Foundation

I'm trying to do composition with two separate video sources in Media Foundation. 我正在尝试使用Media Foundation中的两个单独的视频源进行合成。 I am attempting to encode a video with a video overlay. 我正在尝试使用视频叠加层对视频进行编码。 To do so I am attempting to use the Video Resizer on the smaller input. 为此,我尝试在较小的输入上使用Video Resizer

I've seen several threads on this, but I thought I'd ask around in any case. 我已经看到了几个线程,但是我想无论如何都要四处询问。

Basically the idea is to create two source readers and a sink writer. 基本上,这个想法是创建两个源读取器和一个接收器写入器。 The source files are h264, so I use the reader to decode into YUY2. 源文件是h264,因此我使用阅读器将其解码为YUY2。 While processing samples, I send the appropriate sample to the Resize MFT, then down the line (I haven't made it this far) I combine the two images to create the overlay effect with MFCopyImage. 在处理样本时,我将适当的样本发送到“调整大小” MFT,然后下一行(到目前为止,我还没有完成),我将两个图像组合在一起以创建带有MFCopyImage的叠加效果。

My question is: I am getting an E_INVALIDARG when I call ProcessInput on the Resize MFT. 我的问题是:当我在Resize MFT上调用ProcessInput时,我得到一个E_INVALIDARG。
To initialize the mft, I am giving it the appropriate type from the reader via SetInput Type. 为了初始化mft,我通过SetInput Type从读取器中给它适当的类型。 After that I am setting all the appropriate properties via the PropertyStore, and then updating the framesize for the output type of the MFT. 之后,我将通过PropertyStore设置所有适当的属性,然后为MFT的输出类型更新框架大小。 I have read the documentation and modeled my implementation according to the MFT Processing Model . 我已经阅读了文档,并根据MFT处理模型对实现进行了建模

None of these steps raise any red flags until I actually attempt to use ProcessInput. 在我实际尝试使用ProcessInput之前,这些步骤都不会引发任何危险信号。

Although I have limited experience in Windows Media Foundation, I have been able to use the Framerate DSP with success. 尽管我在Windows Media Foundation中的经验有限,但是我已经能够成功使用Framerate DSP。 I would appreciate any advice. 我将不胜感激任何建议。 Thank you! 谢谢!

对于陷入类似情况的其他人,我最终没有使用Resizer MFT,而是使用了工作量少得多的视频处理器MFT

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM