Feature Request - r/R move subtitle up/down

With mpv you can move subtitles up/down with keyboard shortcut r/R (including pgs subtitles). This feature does not seem to work on Plex Player for Windows. Being able to move subtitles into letterbox would be great.

Close the player software.

Look at this article: https://support.plex.tv/articles/plex-htpc-input-maps/
It sends you down into the file system, to the folder which holds the configuration of the Plex player.
If you are now in the subfolder inputmaps, go one folder level upwards.
If you now see the file mpv.conf.md, you are in the right place.
Now create a new subfolder named scripts (if it isn’t already in existence)

Now, create a new text file (use a text-only editor like notepad.exe on Windows. Don’t use a full-blown wordprocessor like MS Word etc.)
Copy this into the text file:

function round(num, numDecimalPlaces)
    local mult = 10^(numDecimalPlaces or 0)
    return math.floor(num * mult + 0.5) / mult
end

function subDown()
    mp.command("add sub-pos +1")
    sub_pos = mp.get_property("sub-pos")
    sub_pos = round(sub_pos, 2)
    mp.osd_message("subtitle position: "..sub_pos, 0.5)
end

function subUp()
    mp.command("add sub-pos -1")
    sub_pos = mp.get_property("sub-pos")
    sub_pos = round(sub_pos, 2)
    mp.osd_message("subtitle position: "..sub_pos, 0.5)
end

mp.add_forced_key_binding("r", "subDown", subDown)
mp.add_forced_key_binding("R", "subUp", subUp)

and save it as e.g. subpos-keybinds.txt,
into our new folder scripts.
Now rename the file and change the file name extension from .txt to .lua.

This method works for both “Plex HTPC” and “Plex for Windows/Mac/Linux”.
The only difference is the name of the configuration folder,
which is just Plex, instead of Plex HTPC. (at least on Windows and MacOS)

If you really want to use the r key, you might additionally have to edit the default keyboard-inputmap and comment out the binding of the r key to seek-backward. Follow the first link above to learn how to do this.
Or pick a different key which is not already in use.

1 Like

Thank you! This works very well.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.