



Changing other flags like present and maxrate can drastically influence the file size.Īs a future vision, it would be interesting to estimate the exponential ratio of the CRF considering different combinations of present between initial and final file, since an initial file in present ultrafast offers ample opportunity for size reduction if encoded in a preset slow.Modern web development every year applies new standards for performance. It is worth noting that the exponential ratio of 12.85% between CRF and file size seems adequate ONLY when all other flags are the same. Resulting in a required CRF22.3/slow to reduce a original file in h264/crf18/slow from 3500MB to 2000MB. I recommend rounding to 1 decimal point and adding 0.2 points (lower 3% in final size) to minimize the estimation error exceeding the maximum desired size. Initial video with encode profile in CRF 18 preset slow, 3,500mb.Size final = (size_crf18 * (1-0.1285)^(crf-18))Īnd isolating the CRF variable, estimate the CRF needed to achieve an objective video sizeĬRF needed = 18 + LOG(size_goal/size_crf18)/LOG(1-0,1285) The exponential factor I found in my tests was: 12.85% for each additional CRF point Having the data, just apply an exponential regression to find the factor that minimizes estimation error. Initial file encoded in "CRF18 and present slow".īy sliding dozens of conversions from this initial file, keeping the present slow and increasing the CRF by 0.2 points, it is possible to generate a data matrix to assess the influence of the final file size from changes in the CRF. To estimate final size of different CRF values, let's proceed with the assumption below: If the initial file has not been reencoded at all, converting to CRF18 (imperceptible loss of quality to the eye) will already cause a large decrease in file size.

It is not possible to estimate a final video size without assuming the encode situation of the video to be converted.
