ilia3101 / MLV-App

All in one MLV processing app.
https://mlv.app/
GNU General Public License v3.0
283 stars 29 forks source link

QtApp: Position slider jumps to wrong position #20

Closed masc4ii closed 7 years ago

masc4ii commented 7 years ago

Found by bouncyball: "It is very obvious when jumping/searching the small MLV like 30-80 frames long. Here is the MP4 screen recording demonstrating what I mean: Slider_bug.mp4"

bouncyball-git commented 7 years ago

Just one observation not directly related to this bug but I think interesting. If you hover/click mouse above slider and scroll the MLV clip by keyboard RIGHT and LEFT keys (e.g. press RIGHT key and hold it to play the clip) on my PC the playback speed seems even more then expected 23.976fps. Then why during normal playing FPS is no more then 14 for this exactly the same clip on the same PC? Please try yourself. Really interesting your opinion.

Edit: It could be frames are skipped during this process but I doubt it.

masc4ii commented 7 years ago

Hm... to try that all my available PCs and Macs are far to slow. But, if you play with the slider, everything is blocked and the new pics are rendered as fast as possible. The "real" playback is realized using timers (to catch the right frame). This may be slower... If I scroll on the slider I get 5fps and on playback I get also 5fps @1856x1056, or both 8fps @1856x790 (shown in the statusbar)

bouncyball-git commented 7 years ago

Can we try to make "real" playback temporarily as fast as possible (no timers, just a plain loop)? To test it on my PC.

masc4ii commented 7 years ago

Hm... that is not so easily done, because you need to quit the loop for rendering. If you do so with qApp.provessEvents() (needed for rendering in a loop), all other events will also block the loop for some milliseconds.

What you could try: change MainWindow.cpp, line 485, to: //Restart timer m_timerId = startTimer( (int)( 1 ) ); This means the timer will try each millisecond to render a picture, but only when the last try is ready. Much faster won't be possible. And deactivate "Drop Frame Mode" in Playback, now all frames will be shown.

Edit: tested and still get my 5fps.

bouncyball-git commented 7 years ago

Just did what you suggested. The fps is went up from 14 to 15 FPS :P. Thank you anyway.

masc4ii commented 7 years ago

Were debugging the file JumpSlider.cpp: calculated values are correct, also when slider jumps around. Problem seems to be deeper (in Qt?)

bouncyball-git commented 7 years ago

Good job! It Works beautifully! :) Exactly as was expected.

masc4ii commented 7 years ago

Okay, so 99a418a fixed it. Reason: pageStep was disturbing JumpSlider.

bouncyball-git commented 7 years ago

Cool :)