Git Product home page Git Product logo

mpv-install's Introduction

mpv-install.bat

This script sets up file associations for mpv on Windows.

How to install

  1. Make sure you have the latest build of mpv. Official builds are here: https://mpv.srsfckn.biz/
  2. 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.)
  3. Copy the .bat files and the .ico to the same directory as mpv.exe
  4. Run mpv-install.bat as administrator. Note: For an unattended install, use the /u switch.
  5. Use the Default Programs and AutoPlay control panels to make mpv the default player

What it does

  • 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.

Disclaimer

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.

mpv-install's People

Contributors

rossy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpv-install's Issues

How on earth do "Default programs" work?

This is actually not a bug report.

I copied most of this project's mpv-install.bat into my own project, which is a music (only) player. But for some strange reason, after executing the modified batch file, my player still does not apper in the Default programs listing.

My batch is here: https://github.com/ondras/mp/blob/gh-pages/bin/reg.bat

Everything else works -- extension association, Open with... item, verbs, icons. Just the program itself is apparently not registered properly.

Perhaps the reason for this is that my program is not an executable, but rather a mp.bat run-script (https://github.com/ondras/mp/blob/gh-pages/bin/mp.bat)? Are only .exe files allowed in the Default programs listing?

I am also not exactly sure how the RegisteredApplications -> Capabilities linking works, because the Capabilities registry key does not reference the binary itself; instead, it only lists the programs' ProgIds. Where do the program Icon, Company, Website (these are shown in the Default programs) come from?

Thanks for any insights into this. Or a suggestion how to debug this weird stuff.

Run as Administrator Bug

Despite Right Clicking and Run-ning as Administrator, the dialog kept instructing me to actually right click and click on "Run as Administrator".

Work around:
Right click on .bat file, and remove the following code:

:: Make sure the script is running as admin
call :ensure_admin

Once the above step was done, the script worked perfectly.

Many file types not set as default on Windows 11

So the script is supposed to(?) set many files like .avi as default, but only about half of listed file types get set as default, and non-default all have to be changed manually. It doesn't seem to behave like it did on Windows 10.

Screenshot 2021-11-26 210405

open current folder in mpv

In you can use mpv . to open current folder as playlist. Can you implement this in this script? You can place in extended context menu of a folder.

No closing quote in command value

So, after using mpv-install.bat and checking regedit to see how mpv.exe is invoked I see something like that:
"B:\blah\blah\mpv.exe" -- "%L
Take a note that there is no closing quote!
Is that as intended or not I do not know but if it isn't some one need to run a string replace like this:
From \"%%%%L"
To \"%%%%L\""

Suggestion: split audio/video assoc

Serves me right I guess, should've read the random .bat from the Internet then run it as admin.
But still. I have a separate audio player I really like, so it was rather unexpected. Probably not just me.

mpv+youtube-dl-binding asks for path

Hello ,

i have installed MPV on Windows + your install.bat ;

now i would like to use it with the Watch with MPV extension on Firefox

it asks for a full path where mpv is located;
should i use this path where MPV is located or is there another one because of the install.bat?

thank you

Add mpv folder to start menu folder

To mimic standard installation on windows. I found it can be useful. A folder can have:

  • mpv shortcut
  • open cmd in current folder
  • mpv-uninstall.bat shortcut
  • manual.pdf shortcut
  • etc..

start menu folder located in %AppData%\Microsoft\Windows\Start Menu\Programs

WEBM Not Being Associated

WEBM isn't being associated to MPV despite it coming up on the output while it's running the batch file for the asssociations. Not sure why, but if anyone knows or how to fix that would be great.
I have no issues with other file types, seems to be just webm.

Support MIME types of image formats?

Hi @rossy, kickass utility. Great work!

But did you know that mpv is the best image viewer in the world? Modern GUI, lightning fast GPU-accelerated pan and zoom and rotation, lightning fast image loading, and with my Blackbox, Gallerizer, Colorbox and Leapfrog (https://github.com/mpv-player/mpv/wiki/User-Scripts) utilities, the navigation is incredibly good. Keyboard-based folder navigation, auto-generated playlists for all files in all subfolders of the given folder, ability to jump by +/- any number of images ("forward by 1, forward by 10" etc are all keybindable), and ability to jump to random images, and much more. And colorbox takes care of enhancing the images in realtime with filters such as contrast, saturation, sharpness, etc. Other utilities such as "auto-keep-gui-open.lua" (from my repo too) will ensure that mpv doesn't auto-close after the final image (playlist entry) is reached. And "cycle-video-rotate.lua" (yet another from my repo) gives you lossless rotation of the photos.

Sure, it took a bunch of utilities to make mpv this good, but nothing else beats it as an image viewer on any platform. Nothing else is as fast, powerful, scriptable and easy to navigate.

That begs the question: Would you be up for adding photo mime types to the registration so that mpv can be chosen as default photo viewer in Windows?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.