[SOLVED, already existed] Subtile and Audio offset shortcut

Feature request
Hi.

Is it possible to add a quick way to offset subtitles and audio via the keyboard or via plex remote on an iOS device?

When you try to offset subtitles via the normal menu way the subtitles are hidden by the menus and it's impossible to see if you moved the subtile in sync.
Also when watching a movie with bad audio sync it's less disturbing for the rest of the viewers in the room if one was able to slide the audio back of forth either via the keyboard or via plex remote. Then it can be done almost invisible.
A way to do it on the keyboard is to press A & ⇦ or ⇨ to slide the audio or S & ⇦ or ⇨ to slide the subtitles via the keyboard. On the iOS device I guess it would be even easier with graphics.

Would that not be a great feature?

//Niclas

This feature already exist, but it is hidden and you need to do some digging to find it.
Lucky for you I have dug for you already, and tried it. And it works, at least on my Mac with 0.9.5.4 Laika installed.

You need to create a keyboard.xml file in the keymaps directory which on the Mac is here: ~/Library/Application Support/userdata/keymaps
and on the PC here: C:\Users\[USERNAME]\AppData\Local\Plex\userdata\keymaps

The keyboard.xml should contain this:


<br />
<keymap><br />
  <global><br />
    <keyboard><br />
      <left mod="ctrl">subtitledelayminus</left><br />
      <right mod="ctrl">subtitledelayplus</right><br />
      <left mod="ctrl,shift">audiodelayminus</left><br />
      <right mod="ctrl,shift">audiodelayplus</right><br />
    </keyboard><br />
  </global><br />
</keymap><br />




With that example code you hold down ctrl and shift when pressing arrow right to put the audio offset ahead by 25ms. And if you only hold down ctrl and press the arrow it will control the subtitle delay. BUT, if you are on a Mac the Ctrl + arrow left is already in use by the system. So you might need to alter that in the Preferences for OSX. Or of course you can change the code to an unused combination. Good luck!

I have a mac and after creating the keyboard.xml like you described it works just as I wanted it to

You are welcome!



Changing topic title on my way out.

I’d like to add one nuance to this feature - remembering settings. Once I get the offset right, it’s only good for that viewing. If I go back (ie. stop a movie partway, start later)I have to redo the offset.



I'd just like to say thanks for this, quite helpful.
Secondly the location to place the XML file on windows was C:\Users\[USERNAME]\AppData\Local\Plex\userdata\keymaps

For the life of me I could not locate an XMBC folder, so I did some research on the wiki. http://wiki.plexapp.com/index.php/Keymap.xml

You are welcome fellow Plexian!
And sorry for the typo. I have corrected my post above!

Well, does all your media have the same offset? Because a solution for that already exists as well. Let me dig around a bit and post the solution for that.

Actually, it has been added to the Plex client nowadays, so you shouldn’t have to change the XML like I always have.

In the desktop client, go to ‘Preferences > System > Audio’

Set the “Audio Offset” appropriately. The value is in milliseconds (ms).



Let me know if it works. If it doesn’t we need to do it in the XML file.

Ah, bloody hell. I just realized that you might mean the subtitle offset. Well, I know that that can be done in the XML file.



On the Mac, open up /Users/USERNAME/Library/Application Support/Plex/userdata/guisettings.xml

In Windows I assume it is this path (someone please confirm): C:\Users[USERNAME]\AppData\Local\Plex\userdata\guisettings.xml



Search for:


<br />
<subtitledelay>0.000000</subtitledelay><br />




... and change it to:


<br />
<subtitledelay>0.200000</subtitledelay><br />




... if you want the subtitle to appear 0.2 seconds sooner (or is it later... hmm... can't remember, use a minus sign in front of the number to test the opposite).

While testing now I can't set it to 0.250000 for some reason. I know that was possible before, but now I can only set it to whole tenths of seconds. Will look into that in the future, but I assume that is fine enough for you at the moment.

Early 2021 clean-up: implemented