Lossless h265 is now actually lossless

This commit is contained in:
N00MKRAD 2021-05-04 09:03:20 +02:00
parent f8d7537e31
commit a77a1eb3b7
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ namespace Flowframes.Media
if (codec == Codec.H265)
{
string preset = Config.Get("ffEncPreset").ToLower().Remove(" ");
args += $"-crf {Config.GetInt("h265Crf")} -preset {preset} -pix_fmt yuv420p";
int crf = Config.GetInt("h265Crf");
args += $"-crf {(crf > 0 ? crf.ToString() : "-x265-params lossless=1")} -preset {preset} -pix_fmt yuv420p";
}
if (codec == Codec.H264NVENC)