koonix/mpv-selectformat

mpv plugin for selecting the format of internet videos.

Lua

36

64 commits

updated Dec 11, 2025

See the code

README

mpv-selectformat

An mpv plugin for selecting the format of internet videos on the fly.

Based on mpv-youtube-quality.

Folded

Unfolded

Installation

  1. Download selectformat.lua

  2. Copy selectformat.lua to your mpv scripts directory.

  3. Add a key binding to your mpv input.conf file to open the menu. Example: ctrl+f script-binding selectformat/menu

Features

  • Formats are grouped (folded) based on resolution, to reduce clutter.
  • Formats are properly sorted based on codec, protocol, etc.
  • Formats are fetched asynchronously as soon as an internet video starts.
  • The initially-loaded format is pre-selected in the menu.
  • More useful information about the formats is displayed compared to mpv-youtube-quality.

The following key bindings can be used to navigate the menu:

Key(s)Function
Up or kMove up
Down or jMove down
PageUp or Ctrl+uMove up 5 items
PageDown or Ctrl+dMove down 5 items
Home or gJump to the first item
End or GJump to the last item
Right or lUnfold the resolution under the cursor
Left or hFold the unfolded resolutions
EnterSelect the item under the cursor
Esc or qClose the menu

Available Options

Refer to the options section in selectformat.lua for available options and their default values.

These options can be configured using mpv's script-opts option.

Setting a Default Format

You can change the default format that mpv loads by configuring mpv's ytdl-format option in mpv.conf.

mpv
mpv-plugin
mpv-scripts
youtube
youtube-dl
yt-dlp

Contributors

demurky

64 commits

koonix/mpv-selectformat

mpv plugin for selecting the format of internet videos.

Lua

36

64 commits

updated Dec 11, 2025

See the code

README

mpv-selectformat

An mpv plugin for selecting the format of internet videos on the fly.

Based on mpv-youtube-quality.

Folded

Unfolded

Installation

  1. Download selectformat.lua

  2. Copy selectformat.lua to your mpv scripts directory.

  3. Add a key binding to your mpv input.conf file to open the menu. Example: ctrl+f script-binding selectformat/menu

Features

  • Formats are grouped (folded) based on resolution, to reduce clutter.
  • Formats are properly sorted based on codec, protocol, etc.
  • Formats are fetched asynchronously as soon as an internet video starts.
  • The initially-loaded format is pre-selected in the menu.
  • More useful information about the formats is displayed compared to mpv-youtube-quality.

The following key bindings can be used to navigate the menu:

Key(s)Function
Up or kMove up
Down or jMove down
PageUp or Ctrl+uMove up 5 items
PageDown or Ctrl+dMove down 5 items
Home or gJump to the first item
End or GJump to the last item
Right or lUnfold the resolution under the cursor
Left or hFold the unfolded resolutions
EnterSelect the item under the cursor
Esc or qClose the menu

Available Options

Refer to the options section in selectformat.lua for available options and their default values.

These options can be configured using mpv's script-opts option.

Setting a Default Format

You can change the default format that mpv loads by configuring mpv's ytdl-format option in mpv.conf.

mpv
mpv-plugin
mpv-scripts
youtube
youtube-dl
yt-dlp

Contributors

demurky

64 commits

Languages

Lua

100.0%