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

Show a more fine grained progress bar #3597

Merged
merged 11 commits into from
Oct 19, 2020

Conversation

eisneinechse
Copy link
Collaborator

The progress bar and the windows title of the export window are updated more often and the precision of the percentage shown is adjusted automatically so that during the export with slow encoders and/or long clips the feedback that the program isn't crashed is still there.

depending on how long the last display ago was done.
Also display at least every second.
This should help users to recognise that the export is still
ongoing when the ecoder is slow and the clip is long.
Needs more fine tuning and a method that combines the output that
is now done at various locations in the code
Emit final exported frame (with elapsed time) and seconds_run
would not be set
if afterpoint < 1:
afterpoint = 1
if afterpoint > 5:
afterpoint = 5
Copy link
Contributor

@SuslikV SuslikV Jul 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What these "magical" numbers is about?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the number of digits after the decimal point. Here they are set to a minimum of 1 and a maximum of 5. One was the previous default value 4.1f .
More than 5 doesn't make sense as in total this would be a higher precision than 7 digits. At 60 fps and 86400 seconds a day that would be 5,184,000 frames per day.
I have more of a problem with the maximum time between updates; I think 1 second is too low. 2 or 5 seconds might be better.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm against if (x < 20) in the code when there is no comment why 20 was chosen here. Sometimes people like to make constants or variables that are much easier to modify later:

max_digits = 20; //max number of digits after the decimal point
if (x < max_digits) ...

Copy link
Collaborator Author

@eisneinechse eisneinechse Jul 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I will make a change to this PR soon adding comments.
Today I might not have the time, soon.
Maybe also explain the calculation with the log10

@eisneinechse
Copy link
Collaborator Author

@ferdnyc Could you please look at this. It shows the progress bar far more often updated for slow encoding runs. This is very helpful for slow computers and/or slow encoders.

@jonoomph
Copy link
Member

Thanks @eisneinechse. I would like to merge this one, but I would kindly request we update some of the new variable names (old_part, new_part), and do some code cleanup, comments, better variable names, etc... Otherwise I fear I'll never figure out what this stuff means in the future. 😄 Thx!

@jonoomph
Copy link
Member

LGTM! Thanks @eisneinechse

@jonoomph jonoomph merged commit 537c044 into OpenShot:develop Oct 19, 2020
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.

3 participants