home

Control video playback speed with media keys

I remapped the existing media control key paradigm to work better for video. This maps the existing keyboard visual and expected functionality (forward and back arrows, start/stop ) and adds only one more element to remember.

alt text

Specifically, these keys now have these functions:

I like this because I am doing more complex actions with intentional keyboard and mouse actions, such as switching to other videos. Traditionally, with music, it made more sense to be able to jump around the playlist.

I like the ability to jump back because if you miss something it’s very quick and easy to hear it again; if the key is -15 sec it is trivial to do 15, 20, or 45 seconds and that’s all that is needed for something one is paying attention to. This functionality is also difficult to get right with the mouse, as it takes a fair amount of attention to click at the expected spot and it’s always too far or not far enough, and the act of clicking tends to move the cursor which is sensitive to exact input location. Essentially, it’s almost not worth attempting to speed things up using the mouse interface.

With everything going remote, I am spending more time watching video lectures. Videos are useful because you can speed through parts you understand, and slow down or even repeat parts that are novel. I wanted to make this easier and require less focused attention.

Installation

Requirements

Video Speed Controller

Install the Chrome Browser extension Video Speed Controller. This allows the setting of keystrokes to control video playback.

Karabiner-Elements

Install Karabiner-Elements. This allows the mapping of physical keyboard keys to different key codes in software.

I used homebrew: brew cask install karabiner-elements

Settings

Go to Karabiner-Elements Preferences > Function keys…

… and map the following ‘Physical key’ to ‘To key’:

When you are done it should look like this:

alt text

Leave “use [function keys] as standard function keys” unchecked, leave Target device as “For all devices”.

Also, make sure your keyboard is checked under Karabiner-Elements Preferences > Devices.

alt text

Now the code sent when a key has pressed will be updated from this alt text

to this alt text

These new keys can be mapped in the Video Speed Controller settings.

Go to Video Speed Controller > Settings > Shortcuts and set the following:

When you are done it should look like this

alt text

Note: for image clarity I cleared keys that were not changed; these reset to default upon save.

The second parameter is the speed increment to change. I find that going beyond 2.5 makes the sound unusable and causes anxiety, and it takes too many clicks down to return to 1.0 is the increment is the default .25. Of course, you can tune these to your liking.

Usage

Open a YouTube video, you should see the playback speed in the upper left alt text

If you don’t see this, try pressing v for “Show/Hide controller”.

Now, press F9 and you should see the playback speed advance to 1.50 alt text

Note that F8 will work even when another screen is foremost, but the three we set up require the browser tab to be foremost to function.

What else would be interesting:

More background:

YouTube has a mechanism which can be controlled with the mouse. My method was to turn on closed captions, and start the video a bit fast (1.5x) and slow down when I needed to pay more attention. I prefer this to skipping ahead because it’s easy to miss comments about how to think about problems or concepts and there is more guesswork. While I liked the method, I found there was a lot of clicking involved and user attention required for the control.

We know about the jog wheel concept from professional video editing, and so I wanted to mimic this - but I did not want to acquire new hardware that would take up space on my desk. I also thought the software mapping would be the most difficult part, and I wanted to make sure this worked before considering spending any money.

Footnotes