Skip to content

Makes mpv automatically invoke the "xrandr" tool to set the best suitable parameters for the display output

License

Notifications You must be signed in to change notification settings

jojju/mpv-plugin-xrandr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

mpv-plugin-xrandr

mpv plugin for setting display output parameters, e.g. the refresh rate, automatically to the best suitable value for playing the current file.

(This is currently implemented only for Unix systems which provide the "xrandr" command to control the X server. No Windows/Mac support yet.)

(written by Lutz Vieweg)

Rationale / Use Case:

Video replay looks choppy if the display refresh rate is not an even multiple of the frame rate the video is encoded at.

Many displays support different refresh rates, and for some of them, namely TVs, choosing the correct refresh rate is also important for the quality of computing interpolated frames for "smoother motion".

Setting the display to the best suitable refresh rate manually for each video you play is annoying, so this plugin aims at automatizing this task.

Prerequisites / Installation

In order to use xrand.lua, you only need to have mpv installed.

Usage:

mpv --script /path/to/xrandr.lua ...

(Or copy xrandr.lua to ~/.config/mpv/scripts/ for permanent default usage.)

Options:

Normally, you won't need to specify any options.

Optional blacklisting refresh rates:

You can set the script option "xrandr-blacklist" to a certain refresh rate or to a comma separated list of refresh rates that you don't want to be used at all. This can be done to address compatibility issues - e.g., when you know that your display can use 25 Hz, but if your computer tries to use that rate, your TV stays black, you can use

mpv --script-opts=xrandr-blacklist=25 ...

or if both 25 and 24 Hz are unusable, you could specify:

mpv --script-opts=xrandr-blacklist=[24,25]

Optional switching to a preferred output mode

In rare cases, e.g. when using a display that supports more different refresh rates for an output mode you do not usually use, you might want to have mpv switch to some preferred output mode during playback.

To do this, use "--script-opts=xrandr-output-mode", e.g., if you want to change to the "1920x1080" mode during playback, use:

mpv --script-opts=xrandr-output-mode=1920x1080 ...

DISCLAIMER

This software is provided as-is, without any warranties.

About

Makes mpv automatically invoke the "xrandr" tool to set the best suitable parameters for the display output

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%