sindresorhus/gifski-app

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Display estimate as a range #130

kornelski posted onGitHub

The estimate could be displayed as a range, e.g.: 0.5MB-2MB. This could be done simply by calculating estimate twice, with different assumptions (fudge factors).

Displaying it as a range would communicate to users that it's not an actual expected file size, and would communicate how imprecise the estimate is, so they would be less surprised when it's off.


with different assumptions (fudge factors).

What would the different assumptions be?

posted by sindresorhus over 5 years ago

Magic constants for compression ratio and influence of quality. They are typical/guessed fudge factors, so it's valid to vary them.

posted by kornelski over 5 years ago

Any kind of improved accuracy for expectations is good, I think.

<img width="201" alt="estimated" src="https://user-images.githubusercontent.com/868251/74587104-1566fd00-4fb4-11ea-9ef2-618ece3680fd.png"> <img width="126" alt="actual" src="https://user-images.githubusercontent.com/868251/74587105-17c95700-4fb4-11ea-83d4-f9e3acb2828e.png">

posted by jsejcksn about 5 years ago

From https://github.com/sindresorhus/Gifski/pull/205#issuecomment-714612557:

For lower/upper guesstimate I had in mind plugging in different constants/assumptions into the algorithm.

What would those constants/assumptions be? This issue is a bit vague on how exactly it should be solved.

posted by sindresorhus over 4 years ago
        let frameCount = duration * frameRateSlider.doubleValue
        let dimensions = resizableDimensions.changed(dimensionsType: .pixels).currentDimensions.value
        var fileSize = (Double(dimensions.width) * Double(dimensions.height) * frameCount) / 3
        fileSize = fileSize * (qualitySlider.doubleValue + 1.5) / 2.5

The / 3 part is a guess of compression ratio. It could be /5 and /2 for example.

posted by kornelski over 4 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests