Change h.264 quality when using SinkWriter to encode video
I am using Microsoft Media Foundation to encode a H.264 video file. I am using the SinkWriter to create the video file. The input is a buffer ( MFVideoFormat_RGB32 ) where I draw the frames and the output is a MFVideoFormat_H264 . The encoding works and it creates a video file with my frames in it. But I want to set the quality for that video file. More specifically, I want to set the CODECAPI_AVEncCommonQuality property on the H.264 encoder. In order to get a handle to the H.264 encoder, I call GetServiceForStream on the SinkWriter. Then I set the CODECAPI_AVEncCommonQuality property. The