How to install mpv on windows
Using git master is recommended.
All binary packages are unofficial third-party builds.
Unofficial third-party builds.
djinn/mpv_osx/
If you want bleeding edge functionality, link against git versions of FFmpeg or if a package for your platform is not available or updated, you can build mpv from source code. The helper build scripts are recommended for most users since they perform a static build of FFmpeg and libass as well as mpv.
Distributions usually package outdated, unmaintained, and unsupported versions of mpv. This is especially true for popular distros like Debian and Ubuntu. You are recommended to use mpv-build or third-party packages instead. All of these packages are unofficial.
Nogooduser / mpv setup guide.md
Guide to installing mpv
Note: This guide is for the git version of mpv maintained by shinchiro. Although lachs0r also maintains windows builds, they are not updated often and are more annoying to setup if you want customization.
Go to https://sourceforge.net/projects/mpv-player-windows/files/
1.1 Open the folder 64bit or 32bit, depending on your operating system (don’t click «Download Latest Version»!)
1.2 Download the most recent file in the folder, which should automatically be at the top (confirm the date otherwise)
1.3 Create a folder where you want mpv to be installed, move the 7z file there and select «extract here» (alternatively you can just do «extract to. » and then create the folder from there). You may delete the 7z file after this.
Open the folder «installer» that’s inside the root folder and run the files «mpv-install.bat» and «configure-opengl-hq.bat» as administrator. (to run a file as administrator simply right click it and select «run as adminsitrator»). A CMD window will open up and start running the scripts, and once they are done running they will tell you you can press any key to exit.
After this mpv should be available as a player option in Windows and video files should now be associated with it as well.
- Go back to the main mpv folder and run the file updater.bat as administrator.
3.1 A CMD window will open up and check for updates. It will tell you you have the latest version of mpv and then ask if you want to download youtube-dl since you don’t have it yet. Press y (for yes) and then press enter and it should start downloading youtube-dl. Once it is done it’ll tell you can press any key to exit.
(The reason you want youtube-dl is because it is required to stream video to mpv.)
At this stage MPV is fully configured and working with the default options.
Below I will give you extra steps for what I believe is a better MPV experience than the default
- In the folder «mpv» that’s inside the root folder you should find a file called «mpv.conf». This is mpv’s configuration file.
Open this file with any text editor (highly recommend using Notepad++ for this.) and you should see it has 2 lines:
Every new line in this file is a new option that overwrites a default option in mpv. Lines preceded by a # are skipped so you can use them for comments as well.
Add these lines beneath the first two:
Explanation for what these settings do:
- Screenshot-directory is where your screenshots will go. By default they will be saved in the same directory as the file you’re playing is in.
- volume-max limits the max volume to 100 instead of the default 125, you don’t want boosted volume since it distorts stuff.
- keep-open makes it so mpv does not close after playing a file
- hls-bitrate is the bitrate for hls streams, and you want this to be the maximum possible value unless you’re on a metered connection.
- autofit-larger is how big the mpv window can be when you first open a file. By default it has no restrictions and can be bigger than your screen’s resolution. I have set it so that it never goes over 80% of your screen’s width or height, which I believe is pretty optimal.
There are WAY more settings you can toy with, but these are just some base changes I believe are helpful and not too intrusive. For every setting available in mpv please visit: https://mpv.io/manual/stable/
Mpv does not generate thumbnails by default, meaning you will need a third party tool if you want thumbnails in your videos. I personally use icaros, so that’s what I will be recommending here.
- First go to: https://www.majorgeeks.com/files/details/icaros.html
- Select one of the two download options that say «Download@MajorGeeks» to download the installer and then install icaros.
- After icaros is installed, launch it and in the «thumbnailing» tab change the preset to «video only» (this will generate thumbnails for video files only)
- Lastly, click on the tab «cache» until it says «enabled (dynamic)»
That’s it, you can now close icaros and it will be running in your background and generate thumbnails without you even knowing it’s there.
Changing or assigning hotkeys
Note: if you’re migrating from MPC or VLC I have a simpler solution for you underneath so keep reading and skip this first step if you want.
If you want to configure the keys yourself, in the same «mpv» folder where the mpv.conf is, create a new text file named «input», then change the extension from «.txt» to «.conf» This will be your keybindings file that will overwrite mpv’s default keys.
You can check the official documentation with all the commands and other info here https://mpv.io/manual/stable/#input-conf
But the general (and simplest) formula for setting a key input usually varies between these 4 syntaxes:
If you are migrating from VLC or MPC there are also user created pre-made input.conf files you can get instead of having to make your own, I will leave those here (simply right click and choose save as to save them)
Put the file you want in that «mpv» folder I mentioned previously and you should be good to go.
I will not be teaching you what keys are best as this is up to preference. Please search and read the documentation for what you want to do.
MPV is able to run several kinds of scripts to enhance its functions, to the point where it can even become a completely different player.
I can’t ever tell you every script that exists, so I’m just gonna tell you how to install them and the ones I personally recommend. At the bottom you can find a list with a ton more scripts you can read up on.
Installing scripts is easy. In the same «mpv» folder where you have mpv.conf and input.conf just create a folder named «scripts». Then just move any script files you want there (and remove them from there if you no longer want them)
Scripts I personally use:
Autoload creates a playlist of the directory the file you opened is in. Meaning when you open a single file, if there is a file after it in the same folder you can skip to it, and if there’s a file before you can go back to it. By default mpv cannot do this unilike MPC and VLC.
Webm is a webm creation tool I use a LOT. You probably need to configure the webm script itself to better suit your needs but I’m not gonna get into that here.
Copy and Paste is just a small script I use that lets me use ctrl+v to paste a url onto an mpv window, because by default you must drag urls.
How to install mpv on windows
Compiling for Windows
Compiling for Windows is supported with MinGW-w64. This can be used to produce both 32-bit and 64-bit executables, and it works for building on Windows and cross-compiling from Linux and Cygwin. MinGW-w64 is available from: http://mingw-w64.sourceforge.net.
While building a complete MinGW-w64 toolchain yourself is possible, there are a few build environments and scripts to help ease the process, such as MSYS2 and MXE. Note that MinGW environments included in Linux distributions are often broken, outdated and useless, and usually don’t use MinGW-w64.
Warning: the original MinGW (http://www.mingw.org) is unsupported.
When cross-compiling, you have to run mpv’s configure with these arguments:
MXE makes it very easy to bootstrap a complete MingGW-w64 environment from a Linux machine. See a working example below.
Alternatively, you can try mingw-w64-cmake, which bootstraps a MinGW-w64 environment and builds mpv and dependencies.
Example with MXE
Native compilation with MSYS2
For Windows developers looking to get started quickly, MSYS2 can be used to compile mpv natively on a Windows machine. The MSYS2 repositories have binary packages for most of mpv’s dependencies, so the process should only involve building mpv itself.
To build 64-bit mpv on Windows:
Both the i686 and the x86_64 version of MSYS2 can build 32-bit and 64-bit mpv binaries when running on a 64-bit version of Windows, but the x86_64 version is preferred since the larger address space makes it less prone to fork() errors.
Start a MinGW-w64 shell ( mingw64.exe ). Note: This is different from the MSYS2 shell that is started from the final installation dialog. You must close that shell and open a new one.
For a 32-bit build, use mingw32.exe .
To prevent errors during post-install, the MSYS2 core runtime must be updated separately.
Installing mpv dependencies
Clone the latest mpv from git and install waf. Note: /usr/bin/python3 is invoked directly here, since an MSYS2 version of Python is required.
Finally, compile and install mpv. Binaries will be installed to /mingw64/bin or /mingw32/bin .
Or, compile and install both libmpv and mpv:
Linking libmpv with MSVC programs
mpv/libmpv cannot be built with Visual Studio (Microsoft is too incompetent to support C99/C11 properly and/or hates open source and Linux too much to seriously do it). But you can build C++ programs in Visual Studio and link them with a libmpv built with MinGW.
To do this, you need a Visual Studio which supports stdint.h (recent ones do), and you need to create a import library for the mpv DLL:
The string in the /name: parameter must match the filename of the DLL (this is simply the filename the MSVC linker will use). The mpv.def can be retrieved from the mpv build directory, or can be produced by MingGW’s gendef.exe helper from the mpv DLL.
Static linking is not possible.
If you want to run mpv from the MinGW-w64 shell, you will find the experience much more pleasant if you use the winpty utility
If you want to move / copy mpv.exe and mpv.com to somewhere other than /mingw64/bin/ for use outside the MinGW-w64 shell, they will still depend on DLLs in that folder. The simplest solution is to add C:\msys64\mingw64\bin to the windows system %PATH% . Beware though that this can cause problems or confusion in Cygwin if that is also installed on the machine.
Use of the ANGLE OpenGL backend requires a copy of the D3D compiler DLL that matches the version of the D3D SDK that ANGLE was built with ( d3dcompiler_43.dll in case of MinGW-built ANGLE) in the path or in the same folder as mpv. It must be of the same architecture (x86_64 / i686) as the mpv you compiled. You can find copies here:
How to install mpv on windows
mpv-install.bat
This script sets up file associations for mpv on Windows.
- Make sure you have the latest build of mpv. Official builds are here: https://mpv.srsfckn.biz/
- Download the zip: https://github.com/rossy/mpv-install/archive/master.zip
Note: Make sure you use the above link. Don’t use GitHub’s «Raw» links on the files themselves, since these have incorrect line-endings, which cause the script to crash. (See #7.) - Copy the .bat files and the .ico to the same directory as mpv.exe
- Run mpv-install.bat as administrator. Note: For an unattended install, use the /u switch.
- Use the Default Programs and AutoPlay control panels to make mpv the default player
- Creates file associations for several video and audio file types
- Registers mpv with the Default Programs control panel
- Puts mpv in the «Open with» menu for all video and audio files
- Registers mpv.exe so it can be used from the Run dialog and the Start Menu
- Adds mpv as an AutoPlay handler for Blu-rays and DVDs
- Works when reinstalled to a different folder than the one it was in previously. (File associations created by the «Open with» menu have trouble with this.)
What it doesn’t do
- Add mpv to the %PATH%
- Enable thumbnails for all media types (use Icaros for this)
- Allow multiple files to be selected and opened as a playlist. This is harder than it sounds and it can’t be done with a simple script. As a workaround, you can create a shortcut to mpv.exe in the «Send to» menu.
How to uninstall
To remove all traces of this script from your computer, run mpv-uninstall.bat as administrator.
Note: This is not necessary if you want to reinstall mpv later (in a different folder, for example,) only if you want to remove it completely. To reinstall, just run mpv-install.bat again.
Should work on Windows Vista and up, tested with Windows Vista, 7, 8.1 and 10. These scripts were written for personal use and released with the hope that they would be useful, but without any warranty.
About
Sets up file associations for mpv on Windows