Incremental Seek for MPV/MPV-Android
1 minute read •
There are different steps, so let’s start w/ what is the same for each: the lua code. Note that the comment tell you how to edit the script so that incremental skip is more/less aggressive:
-- Create a lua file for this in `~/.config/mpv/scripts`
local seek_amount = 5 -- Skips 5s at a time
local seek_window = 2 -- how many seconds in between presses before button resets to normal 5s skips
local max_multiplier = 6 -- # of times before skips are capped (ie 5s * 6 = 30s max)
local last_seek_time = 0
local consecutive_seeks = 0
mp.
mp.
MPV (Desktop)
- Navigate to
~/.config/mpv/scripts - Create a file called
incrementalSeek.lua - Paste the lua code above
- Go to back a directory to
~/.config/mpvand open theinput.conffile - Paste the following:
LEFT script-binding seek_smart_back
RIGHT script-binding seek_smart
MPV-Android
- (Inside File Explorer/adb) Navigate to
android/media/It is likely empty. Create a folder calledis.xyz.mpvinside of it. - (Inside File Explorer/adb) In the newly created folder, create a file called
incrementalSeek.lua - Paste the lua code below
- (Inside MPV Settings) Go to
Advanced -> mpv.conf. On a new line, add:script=/sdcard/Android/media/is.xyz.mpv/incrementalSeek.lua - (Inside MPV Settings) Select touch gestures and change double tap left + double tap right to custom
- (Inside MPV Settings) Go to
Advanced -> input.confand paste the following:
0x10003 script-binding seek_smart
0x10001 script-binding seek_smart_back