如何在SinkWriter中配置编码器设置 [英] how to configure encoder settings in SinkWriter
问题描述
我是Media Foundation开发的新手,我在使用SinkWriter时遇到了一些问题。
I'm new to Media Foundation development and I have some questions in using SinkWriter.
我已经知道了我可以使用SinkWriter写入磁盘上的文件,如此处所述 https://msdn.microsoft.com/en-us/library/windows/desktop/ff819477(v = vs.85).aspx
I already know that I can use SinkWriter to write in to a file on disk like described here https://msdn.microsoft.com/en-us/library/windows/desktop/ff819477(v=vs.85).aspx
我只需要调用 MFCreateSinkWriterFromURL,然后设置medrateype,如帧率,分辨率
和像素格式等。最后调用 WriteSample to writing frames。
I just need to call MFCreateSinkWriterFromURL, then set mediatype like framerate, resolution
and pixel format, etc. And finally call WriteSample to write frames.
我想要做的是生成带有H.264视频的MP4文件。 但我还希望对H.264编码器设置有更多控制,例如品质因数,
缓冲区大小等,我认为这些控件仅适用于H.264 MFT。
所以我只想知道,我怎么能使用 H. 264 MFT和SinkWriter。
So I just want to know, how could I use the H.264 MFT together with SinkWriter.
谢谢
推荐答案
您可以尝试将H264 MFT添加到拓扑中,并在SinkWriter的两侧设置相同的H264格式。
You can try adding H264 MFT to your topology, and set the same H264 format on both sides of the SinkWriter.
这篇关于如何在SinkWriter中配置编码器设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!