News:

--

Main Menu

Faster seek possible?

Started by BlackPaw, November 22, 2020, 02:01:17 PM

Previous topic - Next topic

BlackPaw

Is it possible to seek to next keyframe but set parametars to seek to every third keyframe. All other seek options even CTRL shift and arrows (4sec seek) are slower in comparison to keyframe seeking.

I have really long 4+hours long 60fps 1080p videos that I want to edit, and keyframes are every second, but it's taking me too long to cut out the parts I need from the video because of the slow seek.

eumagga0x2a

You may want to try using the thumb slider / jog shuttle (and use the latest nightly for many other unrelated reasons, of course).

Dragging the navigation slider works in a similar way.

eumagga0x2a

#2
Reading your request more attentively, I see that both solutions are not fully satisfactory: the thumb slider doesn't skip keyframes while the navigation slider seek (which skips keyframes) may be too coarse if video is very long.

There is a scripting command seekKeyFrame(int step) which would achieve the goal when called in the scripting console like

adm = Avidemux()
adm.seekKeyFrame(3)

for seeking forward jumping over two keyframes and

adm.seekKeyFrame(-3)
for doing the same backward, but there are no means of assigning it to a button or (better) a keyboard shortcut.

By all means, did you enable HW accelerated decoding in Avidemux preferences? If your graphics card can decode the codec used to compress these videos in hardware, letting it do all the heavy lifting should massively speed up decoding compared to doing everything on the CPU.

BlackPaw

How do I execute those console commands? Can I bind them to a hotkey?

eumagga0x2a


BlackPaw

Okay I was getting errors before but now it works. This is exactly what I needed, if only there was a way to make a hotkey or edit the original function of the "go to next keyframe" button.

And I enabled HW accelaration and the 4sec seek works perfect now... Except I have another problem now, after I hold ctrlshiftrightarrow for a while it seeks fine and then suddenly stops.

eumagga0x2a

Quote from: BlackPaw on November 22, 2020, 03:50:19 PMif only there was a way to make a hotkey or edit the original function of the "go to next keyframe" button.

As the application is open source, you could really easily create a custom version with e.g. seek to previous/next black frame repurposed + assign keyboard shortcuts to them.

Quote from: BlackPaw on November 22, 2020, 03:50:19 PMAnd I enabled HW accelaration and the 4sec seek works perfect now...

Time-based navigation is not really fit for this purpose as it needs to decode all the frames from the last keyframe before the target time till the target.

Quote from: BlackPaw on November 22, 2020, 03:50:19 PMExcept I have another problem now, after I hold ctrlshiftrightarrow for a while it seeks fine and then suddenly stops.

Are you using the latest nightly? The log (admlog.txt from %localappdata%\avidemux\ directory) might tell what really happens.