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

More precise remaining time calculation, ui.py split #42

Draft
wants to merge 11 commits into
base: py3k
Choose a base branch
from

Conversation

sezanzeb
Copy link
Contributor

@sezanzeb sezanzeb commented Sep 6, 2020

More precise remaining time calculation by replicating how soundfiles are distributed among processes. It also calculates a correction factor based on historic calculations and actual outcomes. The leftover problems are, that the decoding speed of the source files depends on the format. If it werent for the uncertain encoding speed due to various settings, the only way to avoid that would be to generate a lookup table of type -> bitrate -> relative speed, query the closest value and multiplicate that on the second return value of get_progress in converter.py. Even worse, the conversion speed for files slows down over time, and I need to fit a linear function to it and do some integration and inversion stuff, and I can't do that quickly and need to properly verify what the hell I'm doing since it has been a few years since I learned that.

The progressbar doesn't reflect how many seconds of data have been converted anymore, but rather how much of the time has passed. As long as all processes are working, this is almost identical. This avoids having an almost full progressbar when a single process is still working on a large file that takes a long time to finish. Since this calculation happens only once per second, it is wrapped into a class that interpolates smoothly to the next value.

Created multiple files from ui.py, because that file was very long and contained multiple classes

@sezanzeb sezanzeb changed the title Precise remaining time calculation, ui.py split More precise remaining time calculation, ui.py split Sep 6, 2020
sezanzeb added 3 commits September 6, 2020 17:56
…aining-time-calculation

# Conflicts:
#	soundconverter/interface/ui.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant