Currently I am using the Media Foundation SDK to convert Images to a H.264 video using the following example from Microsoft.
https://msdn.microsoft.com/en-us/library/windows/desktop/ff819477(v=vs.85).aspx
I have encountered an issue when adjusting the MF_MT_FRAME_SIZE of the media type object used for input, it would seem that if the resolution is higher then monitor the computer is connected to the call to SetInputMediaType for the IMFSinkWriter object returns an HRESULT error code 0xc00d36b4 which means invalid MediaType, which makes me wonder if any MediaType you create is limited by your resolution? The differences in my code from the example are the following constants defined at the top.
const UINT32 VIDEO_WIDTH = 2048;
const UINT32 VIDEO_HEIGHT = 1088;
const GUID VIDEO_ENCODING_FORMAT = MFVideoFormat_H264;
I am pretty sure that Windows H.264 encoder has a max resolution depending on your version of Windows. Try encoding to 1920 x 1080.
The max resolution of your H.264 encoder is likely independent from your screen resolution.
User contributions licensed under CC BY-SA 3.0