Do realtime mpv video parameter adjustments work yet in plex htpc?

hi all,

i tried plex htpc when it first came out but although the docs said i could send realtime parameter adjustments to mpv’s playing video (specifically, i wanted to adjust the video zoom level/parameter), everything i tried didn’t work :frowning:

did the plex devs fix this?

has anyone actually got realtime mpv adjustment commands to work (e.g. using autohotkey to map a keyboard key combo to adjust plex htpc’s mpv video zoom level in realtime)?

thx!

Will you please describe exactly what you’ve tried so we can help.

We support sending MPV arbitrary commands through our input mapping. Bind a key to to the structure below:

mpv:{command}: Sends a raw command into mpv. Example: mpv:set sub-scale=2.

See Input Mapping.md in the app support directory.

Hi,

Ok, so I finally figured out that you were probably talking about the ‘inputmaps.md’ file (please kindly remember that specific file name, thx).

I’ve now re-tried with the very latest Plex HTPC (1.3.1…) and Plex Media Server (on my Server PC)

And performed these steps:

  1. Copied keyboard.json from “C:\Users\sahud\AppData\Local\Plex HTPC\inputmaps\default” into “C:\Users\sahud\AppData\Local\Plex HTPC\inputmaps”

  2. Edited this line in that copied file "P": "play_pause",

  3. Made it read "P": "mpv:set video-zoom=-2", and saved it

  4. Launched Plex HTPC

Result = unfortunately doesn’t make the P keyboard key adjust the zoom level of video playing in Plex HTPC (actually it stops the P key from doing anything at all) :frowning:

Plz help! thx!!

Tested this and also ran into weird behavior. I mapped “G” to the example in inputmaps.md.

Jun 01, 2021 15:44:37.593 [0x100a62dc0] DEBUG - [InputManager] Input received: source: Keyboard keycode: G:3
Jun 01, 2021 15:44:37.593 [0x100a62dc0] DEBUG - [InputManager] Emit input action: ["G","mpv:set sub-scale=2"]
Jun 01, 2021 15:44:37.594 [0x100a62dc0] INFO - [InputManager] [InputConnector] Sending actions to UI: ["G","mpv:set sub-scale=2"]
Jun 01, 2021 15:44:45.340 [0x100a62dc0] ERROR - [MPVEngine/mpv] input: Command set: required argument value not set.
Jun 01, 2021 15:44:45.340 [0x100a62dc0] ERROR - [MPVEngine/mpv] input: Command was defined at main.
Jun 01, 2021 15:44:45.340 [0x100a62dc0] DEBUG - [InputManager] Input received: source: Keyboard keycode: G:1

Good chance we’ve got a bug fix to make.

This is the incorrect syntax. As you can see from the manual, you should do set attribute value and not set attribute=value.

1 Like

Thanks a lot Graham :). I’ll update our docs to avoid catching other users in the same trap.

1 Like

Made it read "P": "mpv:set video-zoom -2", NOW WORKS! THX!

Looks like you may have made another Plex Pass customer

and yes very important you update the docs! I’ve not been a Plex Pass customer for months because of this

also just figured out that the mpv “add” command also works

but please note that the mpv docs show a [ ] around the <value>, which you don’t use for add in Plex HTPC (doesn’t work with [ ] around)

from mpv docs regarding “add”:

add <name> [<value>]

Add the given value to the property or option. On overflow or underflow, clamp the property to the maximum. If <value> is omitted, assume 1.

Ah, the [] are used to indicate that value is optional.

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