1
votes

I am developing an server application that stream high quality real-time video of a windows application.

Looking at the advantages of H.264, I am planning to use this format for video stream. I know there are many third party codecs, but can I use windows media foundation API to encode captured frames to H.264 stream instead?

That would be great if you can guide me to a sample app for this.

I am planning to use C++ for my server application.

Any advice will be appreciated!

1

1 Answers

2
votes

Yes, you can use Windows Media Foundation.

Here is an encode example:

https://msdn.microsoft.com/en-us/library/windows/desktop/ff819477(v=vs.85).aspx

Change the format from MFVideoFormat_WMV3 to MFVideoFormat_H264. You may have to implement your own IMFSinkWriter.