Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display estimate as a range #130

Open
kornelski opened this issue Sep 6, 2019 · 5 comments
Open

Display estimate as a range #130

kornelski opened this issue Sep 6, 2019 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kornelski
Copy link
Collaborator

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.

@sindresorhus
Copy link
Owner

with different assumptions (fudge factors).

What would the different assumptions be?

@kornelski
Copy link
Collaborator Author

kornelski commented Sep 7, 2019

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

@jsejcksn
Copy link

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

estimated

actual

@sindresorhus
Copy link
Owner

From #205 (comment):

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.

@kornelski
Copy link
Collaborator Author

kornelski commented Oct 24, 2020

		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.

@sindresorhus sindresorhus added enhancement New feature or request help wanted Extra attention is needed labels Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants