I use the
mpv video player to play all videos on my mac, though I also have
VLC installed. The problem is that after a while my default video application changes to VLC (and/or Quicktime, depending on the file type/extension) without any apparent reason and trying to change it back gives an error.
What it looks like
The whole process is a bit weird and this doesn't happen always, but when it does, it looks like this every single time:
I double click on a video file, and it opens up in
mpv(since it is set as the default video application for a lot of formats i.e.
The video ends (or I close it) and open another video. It opens in
VLC. At this point, the video file icons still identify
mpvas the default application and are listed under it in Finder, until I change directories.
Get Info / Inspectorto set the default app (It correctly shows the VLC video icon since that is the default at this point).
Here's the Weird Thing 1:
mpvis greyed out in the application list (It's not usually).
But still selecting
Addgives this error:
You can't change the item "My Video.mkv" to always open in the selected application.
The item is either locked or damaged, or in a folder you don't have permission to modify (error code -9499).
Here's the Weird Thing 2: Since I have no choice but to close inspector at this point, mpv becomes the default app automatically after closing it. But when opening a video, the OS thinks that I am opening MPV for the first time and shows this dialog:
You are opening the application "mpv" for the first time. Are you sure you want to open this application?
The application is in a folder named "HEAD-xxxxxxx". To see the application in the Finder without opening it, click Show Application.
The thing to note here, is that if I don't even attempt to change the application,
VLC(or QuickTime) would remain the default. So even though I was unable to "successfully" set
mpvas the default, it becomes the default as soon as I close the file
Inspector / Get Infodialog.
mpvremains the default video app for an indeterminate period of time until it happens again
While this has been happening for months now, I've been unable to consistently reproduce the issue or pinpoint the cause. It just happens™️, sometimes twice in one day, sometimes after weeks.
What I've tried
- Tried upgrading MPV
- Completely removed and tried installing from different sources
- Homebrew binary with bundle (using this currently)
- Homebrew cask
- Compiled release from the official website/github