Before I open a bug report for this, if it is a bug, I thought I’d check on here that I’m doing this the right way first.
I want to use mpv as my default video player under Haiku. Currently, when I click on a mp4 file it gets played with MediaPlayer.
What tried doing:
Right click .mp4 file → Add-ons → FileType
Now in the File type box I have video/mp4 which looks correct to me so next I click on Select in the Preferred application pane, I select the Haiku disk from the file selector drop down menu → System → bin → mpv then click on Open and I get the error:
Could not retrieve application signature
Is it not possible to use mpv as the default Tracker video player? I installed mpv from the HaikuDepot. mpv works fine when run from the terminal.
This is because mpv doesn’t have an app signature. If feel that it’s a bug open an issue at Haikuports tracker. IMHO, in this regard, mpv suffers from same problem than it’s ancestor mplayer. They are both powerful tools but without a proper configuration file, they are needing options on command line. That’s why they are most of time used with front-ends and therefore no app signature was added. You will find some of these (like SMplayer or QMPlay2) in HaikuDepot.
Under Linux I just use mpv under MATE (caja), GNOME (nautilus/ Files) etc without a GUI. I don’t have any need for a GUI for mpv and I doubt any GUI would let me configure it how I want it anyway, I just copy my mpv config file into place and I’m done.
Gave this one a try (while also updating mpv to version 0.35.1).
Sadly, there seems to be a longstanding issue with Haiku not handling this situation correctly, where the system fails to properly pass the arguments to “non be apps” with B_ARGV_ONLY set (https://dev.haiku-os.org/ticket/11893).
Making mpv work with Open with will either require patching mpv (beyond my skills or even will), or fixing that mentioned ticket. (the latter would be preferable, of course, to avoid having to patch individual apps in the future).
Tried removing B_ARGV_ONLY: same result (just a spike of CPU usage when mpv gets called, and immediately exits (same with open application/x-vnd.mpv.io-mpv /boot/home/test.mp4).
EDIT:
For those wondering why (like me ), I’ll quote @nephele’s comment on that #11893 ticket:
Ah, yes… now I notice I had three “zombie” mpv threads. It indeed keeps open, but can’t see how you’re supposed to interact with it (no mpv window/prompt to interact with).
I realise mpv isn’t a part of Haiku but mpv works fine from the Haiku terminal but not via Tracker so I’d say this sounds like a bug in Tracker or Haiku somewhere because using mpv like this works on every Linux/BSD distro and desktop that I’ve tried.