Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: eumagga0x2a on August 23, 2016, 12:53:45 PM

Title: Excessively jerky position slider jumps back to keyframe-1 when released
Post by: eumagga0x2a on August 23, 2016, 12:53:45 PM
Testcase: https://www.youtube.com/watch?v=2-QbUQUaB24 (https://www.youtube.com/watch?v=2-QbUQUaB24), use the webm video with the format code 43. Any other short video with only a few I-frames will do.

STR:


Actual Results:
The slider trembles erratically while being dragged, jumps back to the second keyframe when released.

Expected Results:
The slider position updates first when the mouse has reached the position of the next keyframe (no high frequency visualisation of internal seeking), stays at the last reached keyframe when released.

I understand that the mouse wheel works fine  :)
Title: Re: Excessively jerky position slider jumps back to keyframe-1 when released
Post by: Jan Gruuthuse on August 23, 2016, 01:33:26 PM
Does playing with: Avidemux Menu: Edit: Preferences: [Display]

[v] Limit Refresh Rate
Refresh Rate Cap (ms) [100]

Help? Eventually  raising or lowering the value.
Title: Re: Excessively jerky position slider jumps back to keyframe-1 when released
Post by: eumagga0x2a on August 23, 2016, 01:40:28 PM
No, this setting has no effect.
Title: Re: Excessively jerky position slider jumps back to keyframe-1 when released
Post by: Jan Gruuthuse on August 23, 2016, 01:54:01 PM
use up/down or left right arrow key

keyframes are over 2 seconds, has something to do with rewind and GUI refresh. Mean did explain sometime ago. I forgot where and what.
Title: Re: Excessively jerky position slider jumps back to keyframe-1 when released
Post by: Jan Gruuthuse on August 23, 2016, 01:56:31 PM
Behaviour like when scrolling through this video: vp8 540x360 (3:2) 23.976fps elephants-dream 8.6 MB
File (8.17 MB total) vp8 540x360 (3:2) 23.976fps elephants-dream.webm
Will be deleted on 30 August, 2016
Download link: https://we.tl/By0A3xwLt6
Title: Re: Excessively jerky position slider jumps back to keyframe-1 when released
Post by: eumagga0x2a on September 04, 2016, 09:46:57 AM
Quote from: Jan Gruuthuse on August 23, 2016, 01:54:01 PM
keyframes are over 2 seconds, has something to do with rewind and GUI refresh. Mean did explain sometime ago. I forgot where and what.

I dare to push the topic gently in hope for an enlightening comment on the statement above or even for a luxury of a fix at least for jumping to previous keyframe on drag release, not addressing superfluous intermittent paint events on mouse drag. I suspected

void MainWindow::thumbSlider_valueEmitted(int value)
{
        if (value > 0)
                nextIntraFrame();
        else
                previousIntraFrame();
}


at Q_gui2.cpp:285 to be relevant, but was obviously wrong.
Title: Re: Excessively jerky position slider jumps back to keyframe-1 when released
Post by: eumagga0x2a on September 05, 2016, 09:04:50 AM
Slider going to the previous keyframe on mouse release is fixed by [UI/Qt] Try to avoid multiple scale event, ending up in multiple go to previous kf events (https://github.com/mean00/avidemux2/commit/a7034966054e6dd02d3fb37cfd41318f2386cb9e) except for the last keyframe (!= last frame) in a video: dragging the slider beyond this keyframe still results in the slider jumping to the previous keyframe.

If only it were possible to avoid frequent paint events on every mouse move while holding, visualising seeks up to the mouse position and back to the keyframe (slider trembling, feeling jerky)...

Thanks a lot!
Title: Re: Excessively jerky position slider jumps back to keyframe-1 when released
Post by: eumagga0x2a on September 11, 2016, 10:42:30 AM
In a sense fixed by [UI] Tweak slider dragging behaviour (https://github.com/mean00/avidemux2/commit/c0ce0daea3c81c4a9f46583a7b26fc2d010c9561), together with the issue mentioned in Slider position doesn't advance on mouse hold, rewind on mouse hold works (http://avidemux.org/smif/index.php/topic,17105.0.html), thanks a lot!

While the slider doesn't visualise internal seeks anymore, the new solution ties it to the mouse position. IMVHO an ideal solution would still let the slider reflect the exact playback position as shown in the video window. When dragged, the code should check if the mouse has reached the position of the next (or previous) keyframe (aren't they all already stored in the .idx2 file so no actual decoding is necessary?) and trigger ACT_NextKFrame (or ACT_PreviousKFrame) on this event. This should update the slider position, until the mouse moves past the next keyframe position.