Installation on Linux - woodruffw/ff2mpv GitHub Wiki
Welcome to the ff2mpv installation instructions for Linux distributions.
This page assumes that you've already installed the addon from AMO or chrome store. If you haven't yet, do it before continuing.
Dependencies
[!WARNING]
yt-dlprequires a JS runtime for full youtube support. Instructions to setup the EJS is documented here: https://github.com/yt-dlp/yt-dlp/wiki/EJS.
Chromium browsers and Firefox
Install using script (recommended)
- Clone the repository to any place in your system using git or download as zip and extract the files.
- Make sure that the
install.shis executable by using the commandchmod +x install.sh - From your terminal call the
install.shscript and provide the name of your browser as first argument. Valid browsers:- chromium
- chrome
- brave
- edge
- firefox
Example of use:
$ ./install.sh chrome
Note: Opera uses same path to NativeMessagingHosts as Chrome, so you can use chrome switch for Opera browser
Install custom browsers
- Follow the first two steps above
- Call the script and use
custom-chromium(if based on chromium) orcustom-firefox(if based on firefox) as the first argument and the path for theNativeMessagingHostsdirectory as a second argument
Chromium example:
$ ./install.sh custom-chromium $HOME/.config/chromium
Firefox example:
$ ./install.sh custom-firefox $HOME/.mozilla
Install manually
Firefox
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's executable. Both scripts work the same. -
Copy
ff2mpv.jsoninto~/.mozilla/native-messaging-hosts/. -
Open
~/.mozilla/native-messaging-hosts/ff2mpv.jsonin your preferred editor, and change thepathfield to the path where you saved eitherff2mpvorff2mpv.py -
After that, everything should work.
Chromium
-
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.jsoninto 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 theNativeMessagingHostsdirectory. -
Open the copied version of
ff2mpv-chromium.jsonfrom the last step in your preferred editor, and change thepathfield to the path where you saved eitherff2mpvorff2mpv.py.