Linux

Sync mpv, VLC, Plex And MPC-BE/MPC-HC With Trakt.tv Using Trakt Scrobbler


Trakt Scrobbler Linux vlc mpv plex

Trakt Scrobbler is a Trakt.tv scrobbler for Linux, macOS and Windows, which supports VLC, MPV, MPC-BE/MPC-HC and Plex (doesn’t require a Plex Pass).

The tool is controlled from the command line. After the initial setup, Trakt Scrobbler runs in the background, monitoring what’s playing (movies / TV show episodes) in the media players you configure, and sending this information to Trakt.tv. It also displays optional desktop notifications when scrobbling begins and ends.

New to Trakt.tv? This is a website that automatically keeps track of what you’re watching, kind of like last.fm and libre.fm, but for TV shows and movies. Thanks to this, you can see a history of your past watched movies and TV shows, allowing you for example to see that TV show episode to watch next (especially useful if you take a long break and want to continue watching a TV show from where you left off). 

Trakt.tv also includes TV show and movie recommendations based on your previously watched media, and there’s also an upcoming TV shows schedule, so you can see when new episodes are released for your favorite TV shows.

Trakt Scrobbler features:

  • Currently, it supports VLC, Plex, MPV and MPC-BE/MPC-HC media players, with the possibility of adding support for new media players in the future
  • Command line interface to control the service
  • Automatic media info extraction using guessit, a python library that extracts information from a video filename
  • Optional folder whitelisting, which can be used to only scrobble media files from certain folders
  • Optional notifications that notifies the user when the scrobbling starts / pauyses / stops
  • For cases when it misidentifies the files, you can specify a regex to manually extract the necessary details
  • Proxy support

It’s also worth mentioning that the application can be set to start automatically on system startup, or you can run it manually, when you need it.

You might also like: Watch Synchronized Videos With Your Remote Friends Using Syncplay (Linux, macOS, Windows)

Trakt Scrobbler installation and quick setup guide

Installation

Arch Linux / Manjaro users can install Trakt scrobbler by using an AUR package.

For other Linux distributions, macOS and Microsoft Windows, see the Trakt Scrobbler Installation page for how to install it. 

Since I like to make the installation instructions easier for new users, below you’ll find what I consider more complete installation instructions for Debian / Ubuntu / Linux Mint / Pop!_OS (and other Linux distributions based on Debian / Ubuntu) and Fedora.

The Trakt Scobbler wiki recommends installing this tool using pipx, a tool to install and run Python applications in isolated environments. To be able to use pipx, you’ll need to install Python3 venv (it allows creating lightweight virtual environments for Python) and pip (a Python package installer). You can also install an optional libnotify package to allow Trakt Scrobbler to send desktop notifications. Install these packages as follows:

  • Debian / Ubuntu / Linux Mint / Pop!_OS / Elementary OS / Zorin OS / etc.:
sudo apt install python3-venv python3-pip libnotify-bin
sudo dnf install python3-pip python3-virtualenv libnotify

Now you’ll need to install pipx using pip (this is the same no matter what Linux distribution you’re using):

python3 -m pip install --user pipx

python3 -m pipx ensurepath

The second command (pipx ensurepath) adds the ~/.local/bin folder to your PATH. Some Linux distributions don’t have this folder in PATH, and this command fixes that. After running that command, if ~/.local/bin wasn’t already in your PATH, you’ll get a message telling you to open a new terminal or re-login. Do that.

Now you can use pipx to install Trakt Scrobbler (this is the same no matter what Linux distribution you’re using):

pipx install trakt-scrobbler

The Trakt Scrobbler installation is now complete. It’s time to configure Trakt Scrobbler and the media players you want to use with it.

In case you want to uninstall Trakt Scrobbler, you can use:

pipx uninstall trakt-scrobbler

When you want to upgrade Trakt Scrobbler, use:

pipx upgrade trakt-scrobbler

Trakt Scrobbler initial setup process

Run the initial setup process for Trakt Scrobbler. This allows you to choose the media players to be monitored, authorize the application with Trakt.tv, optionally set whitelisted folders so only media from those folders will be scrobbled to Trakt.tv, enable the Trakt Scrobbler autostart service, and start the scrobbler service now:

trakts init

If you don’t enable the autostart sevice for the Trakt Scrobbler, you’ll need to run it manually each time you want to use it (using trakts run).

You’ll also need to setup the media player(s) you want to use with Trakt Scrobbler to allow scrobbling. There’s a Trakt Scrobbler wiki page which explains how to do this for VLC, Plex, mpv and MPC-BE/MPC-HC.

A note for setting this up with mpv on Linux, as the Trakt Scrobbler wiki is a bit ambiguous about this: to be able to use Trakt Scrobbler with mpv, open ~/.config/mpv/mpv.conf with a text editor (create this file if it doesn’t exist; e.g. to open it with Gedit: gedit ~/.config/mpv/mpv.conf), and at the top of this file, paste the following line: input-ipc-server=/tmp/mpvsocket.

For further information on configuring and controlling Trakt Scrobbler, see its CLI reference wiki page.

You might also like: VLC BitTorrent Plugin Streams Video Torrents Without Waiting For The Complete Download