-
Notifications
You must be signed in to change notification settings - Fork 52
Installation on macOS
Welcome to the ff2mpv installation instructions for macOS.
This page assumes that you've already installed the addon from AMO. If you haven't yet, do it before continuing.
STOP: Before following the steps below, consider using the install.sh
script provided in the repository. Installing with the script should be as simple as:
$ ./install.sh
Only follow the steps below if you have not used the install script.
-
Save either
ff2mpv
(the Ruby script) orff2mpv.py
(the Python script) to somewhere on your machine, and make sure that it has the executable bit set. Both scripts work the same. -
Copy
ff2mpv.json
into~/Library/Application Support/Mozilla/NativeMessagingHosts/
. -
Open
~/Library/Application Support/Mozilla/NativeMessagingHosts/ff2mpv.json
in your preferred editor, and change thepath
field to the path where you saved eitherff2mpv
orff2mpv.py
. -
After that, everything should work...
...unless you're using a copy of MPV installed in an applications folder, e.g., /Applications
. In that case, you need to modify your script of choice a bit:
For ff2mpv
, change
pid = spawn "mpv", "--no-terminal", "--", url, in: :close, out: :close, err: :close
to
pid = spawn "/Applications/mpv.app/Contents/MacOS/mpv", "--no-terminal", "--", url, in: :close, out: :close, err: :close
For ff2mpv.py
. change
args = ['mpv', '--no-terminal', '--', url]
to
args = ['/Applications/mpv.app/Contents/MacOS/mpv', '--no-terminal', '--', url]
Adjust as appropriate if you've used a different Applications
folder.
- Clone the repository to any place in your system using git or download as zip and extract the files.
- Make sure that the
install-chromium.sh
is executable by using the commandchmod +x install-chromium.sh
- From your terminal call the
install-chromium.sh
script and provide the name of your browser as first argument. Valid browsers:- chromium
- chrome
- brave
- edge
$ ./install-chromium.sh chrome
- Follow the first two steps above
- Call the script and pass
custom
as the first argument and the path for theNativeMessagingHosts
as a second argument
$ ./install-chromium.sh custom $HOME/Library/Application Support/Google/Chrome
-
Save either
ff2mpv
(the Ruby script) orff2mpv.py
(the Python script) to somewhere on your machine, and make sure that it's executable. Both scripts work the same. -
Copy
ff2mpv-chromium.json
into your native messaging hosts directory and rename it toff2mpv.json
. The location of this directory varies by installation and Chrome variant; see Google's documentation or your specific browser's documentation for more information for the location of theNativeMessagingHosts
directory. -
Open the copied version of
ff2mpv-chromium.json
from the last step in your preferred editor, and change thepath
field to the path where you saved eitherff2mpv
orff2mpv.py
.
NOTE: If mpv is not in your path, you can add it in your configuration files or modify either ff2mpv
or ff2mpv.py
as described in the Firefox installation instructions.