How can I make a homebrew application the default for opening certain file types?
Solution 1:
Read the FAQ @ https://mpv.io -> Reference -> FAQ
How can I make mpv the default application for opening movie files on macOS (OSX)?
- Install mpv as an app with Homebrew:
$ brew cask install mpv
-
If you need an alias in Applications/Launchpad, open a Finder window at /usr/local/Caskroom/mpv/your_mpv_version/. In there the mpv.app bundle has been generated. While holding Cmd+Alt, drag this .app into the Applications folder.
-
Use duti to associate files with the application:
$ brew install duti $ duti -s io.mpv avi all $ duti -s io.mpv mkv all $ duti -s io.mpv mp4 all
Or you can do it macOS Finder
Find a video file you want to play in mpv and CMD + I to Get Info on it and then change the default app to be mpv and click Change All button. Rinse and repeat for other file types.