How can I use mpv to get the current frame position and seek to a specific frame? #17240
-
|
In mpv, most seeking operations are based on time. I am looking for a way to use frames as the seeking unit instead. A simple use case would be: get the current frame position, then jump to the 10th frame after it, or the 10th frame before it. The approach I have found so far is to first convert time to frames using the FPS, perform the calculation in frames, and then convert the result back to time for seeking. I am not sure whether this is the correct approach. Is there any simpler or more direct way to achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
estimated-frame-number property can get the current frame position, |
Beta Was this translation helpful? Give feedback.
estimated-frame-number property can get the current frame position,
frame-step command supports relative frame number jumps ( e.g. frame-step -10 seek )