Reputation: 447
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:
To maximize quality, I configured codec with the following parameters:
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
Upvotes: 3
Views: 1487
Reputation: 1
you need to set bit rate and quality by this step:
VARIANT controlModeVar;
InitVariantFromUInt32(eAVEncCommonRateControlMode_GlobalVBR,
&controlModeVar);
hr = CodeApi->SetValue(&CODECAPI_AVEncCommonRateControlMode,
&controlModeVar);
VARIANT quality;
InitVariantFromUInt32(BitRate, &quality);
hr = CodeApi->SetValue(&CODECAPI_AVEncCommonMeanBitRate,
&quality);
InitVariantFromUInt32(eAVEncCommonRateControlMode_Quality,
&controlModeVar);
hr = CodeApi->SetValue(&CODECAPI_AVEncCommonRateControlMode,
&controlModeVar);
InitVariantFromUInt32(H264QualityLevel, &quality);
hr = CodeApi->SetValue(&CODECAPI_AVEncCommonQuality, &quality);
the min os require windows8.
Upvotes: 0