Home

Awesome

quality-menu

A userscript for MPV that allows you to change the streamed video and audio quality (ytdl-format) on the fly.

Simply open the video or audio menu, select your prefered format and confirm your choice. The keybindings for opening the menus are configured in input.conf, and everthing else is configured in quality-menu.conf.

Note: Version 4.2.0 and later require mpv 0.39.0. Anyone on an older version of mpv can use version 4.1.2 instead.

screenshot

Features

OSC extension

(optional) An extended version of the OSC is available that includes a button to display the quality menu.

screenshot

PLEASE NOTE: This conflicts with other scripts that modify the OSC. Merging this OSC modification others is certainly possible. Depending on how the osc is modified, the osc.patch might apply cleanly, but you have to make sure the filename in the patch lines up with the filename of your files.

Installation

  1. Save the quality-menu.lua into your scripts directory

  2. Set key bindings in input.conf

    F     script-binding quality_menu/video_formats_toggle
    Alt+f script-binding quality_menu/audio_formats_toggle
    

    (optional) Ctrl+r script-binding quality_menu/reload

  3. (optional) Save the quality-menu.conf into your script-opts directory (next to the scripts directory, create if it doesn't exist)

  4. (optional) UI integration (pick one)

    • For OSC: Save the quality-menu-osc.lua into your scripts directory and put osc=no in your mpv.conf
    • For uosc (each is optional)
      1. Add the video and audio menu to the uosc menu by appending #! ... to your key bindings in input.conf
      F     script-binding quality_menu/video_formats_toggle #! Stream Quality > Video
      Alt+f script-binding quality_menu/audio_formats_toggle #! Stream Quality > Audio
      
      1. quality-menu already overwrites the builtin uosc command stream-quality, so it already works well out of the box. For even deeper UI integration you can add buttons to the contols= option in your uosc.conf
        1. <!has_many_video,video,stream>command:theaters:script-binding quality_menu/video_formats_toggle#@vformats>1?Video
        2. <!has_many_audio,has_audio,stream>command:graphic_eq:script-binding quality_menu/audio_formats_toggle#@aformats>1?Audio

Plans For Future Enhancement

Credit