Einzelnen Beitrag anzeigen

Renate Schaaf

Registriert seit: 25. Jun 2020
Ort: Lippe
114 Beiträge
 
Delphi 11 Alexandria
 
#2

AW: Bitmaps2Video für Windows Media Foundation

  Alt 27. Mai 2023, 19:45
Errata: uToolsWMF hat eine unit Z_prof in der uses-Liste. Einfach entfernen. Kommt davon, wenn man zu viel Zeug im path hat.

Inzwischen habe ich glaube ich rausgefunden, wie man die Qualität verbessern kann.
Um Zeile 270 rum in uBitmap2VideoWMF.pas die folgenden Änderungen machen:

Code:
if succeeded(hr) then
    hr := MFCreateAttributes(attribs, 4); //<--------- change to 4 here
  // this enables hardware encoding, if the GPU supports it
  if succeeded(hr) then
    hr := attribs.SetUINT32(MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, UInt32(True));
  // this seems to improve the quality of H264 and H265-encodings:
  {*************** add this *********************************}
  // this enables the encoder to use quality based settings
  if succeeded(hr) then
    hr := attribs.SetUINT32(CODECAPI_AVEncCommonRateControlMode, 3);
  {**************** /add this *******************************}
  if succeeded(hr) then
    hr := attribs.SetUINT32(CODECAPI_AVEncCommonQuality, 100);
  if succeeded(hr) then
    hr := attribs.SetUINT32(CODECAPI_AVEncCommonQualityVsSpeed, 100);
Renate
  Mit Zitat antworten Zitat