I'm writing an application which records PC's screen in realtime and encodes it with Media Foundation h264 codec. The quality of a resulting video stays high if a picture on the screen doesn't have many dynamic changes. If a picture has many dynamic changes (fast scrolling of a web page, for example) then video quality becomes very low. This sounds like a low bitrate problem, but reference OSX recording application works fine with the same settings.
Codec configuration:
- 25 fps
- 1364 x 768 resolution
- baseline profile
- 1.2 MBit bitrate
To maximize quality, I configured codec with the following parameters:
- CODECAPI_AVEncCommonRateControlMode = eAVEncCommonRateControlMode_Quality
- CODECAPI_AVEncCommonQuality = 100
- CODECAPI_AVEncAdaptiveMode = eAVEncAdaptiveMode_FrameRate
- CODECAPI_AVEncMPVGOPSize = 10
Unfortunately, this doesn't help much. The only setting that has the real effect is bitrate.
An example video, that demonstrates the problem: https://www.dropbox.com/s/b26odaeyaygxigo/10-22-2016_15.08.17.mp4?dl=1