SVP:Plex Media Player

From SmoothVideo Project
(Redirected from SVP:Plex)
Jump to navigation Jump to search

Plex.jpg

Setting up Plex Media Player (Windows, Linux, macOS) or Plex for Windows


Don't confuse "Plex Media Player" with "Plex for Windows" and "Plex for Mac" - these are different applications!


Installation - Windows

  • Install Plex for Windows (preferably) or Plex Media Player
  • Install mpv shared library package from the SVP's installer
  • Run Utilities -> Set environment variables OR adjust a few system settings manually to allow Plex find the Vapoursynth installation:
    • add SVP 4\mpv64 folder to the PATH environment variable
    • add new env variable called PYTHONPATH, containing the same SVP 4\mpv64 path

How to manuallly set environment variables

Plex for Windows

  • Replace Plex's "mpv-1.dll" with the one from "SVP 4\mpv64\": copy "C:\Program Files (x86)\SVP 4\mpv64\mpv-1.dll" to "C:\Program Files\Plex\Plex\"
  • Create mpv's configuration file in "C:\Users\<name>\AppData\Local\Plex\mpv.conf" with the following contents:
input-ipc-server=mpvpipe
hwdec-codecs=all
hr-seek-framedrop=no
  • Note for versions earlier than 1.26 (December 22, 2020): mpv.conf path must be "C:\Users\<name>\AppData\Roaming\mpv\Plex.exe\mpv.conf"

Plex Media Player

  • PMP 2.58 is not compatible with mpv 0.33 and later! Here's the direct link to the last compatible mpv-1.dll build.
  • Replace Plex's "mpv-1.dll" with the one from "SVP 4\mpv64\": copy "C:\Program Files (x86)\SVP 4\mpv64\mpv-1.dll" to "C:\Program Files\Plex\Plex Media Player\"
  • Create mpv's configuration file in "C:\Users\<name>\AppData\Local\PlexMediaPlayer\mpv.conf" with the following contents:
input-ipc-server=mpvpipe
hwdec-codecs=all
hr-seek-framedrop=no
  • Turn on hardware video decoder: edit "C:\Users\<name>\AppData\Local\PlexMediaPlayer\plexmediaplayer.conf", find the line containing "hardwareDecoding" and set it to
"hardwareDecoding": "copy",

Installation - macOS

  • Install Plex for Mac (preferably) or Plex Media Player into /Applications
  • Run it for the first time, then exit
  • Note for Apple M1: as of July 2021, Plex is x86-only, so you have to additionally install x86 version of Homebrew:
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 brew install mpv

Plex for Mac

  • Replace Plex's libmpv.1.dylib with the one from Brew installation: /usr/local/lib/libmpv.1.dylib -> /Applications/Plex.app/Contents/Frameworks/libmpv.1.dylib
mv "/Applications/Plex.app/Contents/Frameworks/libmpv.1.dylib" "/Applications/Plex.app/Contents/Frameworks/libmpv.1.backup"
ln -s /usr/local/lib/libmpv.1.dylib "/Applications/Plex.app/Contents/Frameworks/libmpv.1.dylib"
  • Create mpv's configuration file in "~/Library/Application Support/Plex/mpv.conf" with the following contents:
input-ipc-server=/tmp/mpvsocket
hr-seek-framedrop=no

From the Terminal:

echo "input-ipc-server=/tmp/mpvsocket" >> ~/"Library/Application Support/Plex/mpv.conf"

Plex Media Player

  • PMP 2.58 is not compatible with mpv 0.33 and later!
  • Replace Plex's libmpv.1.dylib with the one from Brew installation: /usr/local/lib/libmpv.1.dylib -> /Applications/Plex Media Player.app/Contents/Frameworks/libmpv.1.dylib
mv "/Applications/Plex Media Player.app/Contents/Frameworks/libmpv.1.dylib" "/Applications/Plex Media Player.app/Contents/Frameworks/libmpv.1.backup"
ln -s /usr/local/lib/libmpv.1.dylib "/Applications/Plex Media Player.app/Contents/Frameworks/libmpv.1.dylib"
  • Create mpv's configuration file in "~/Library/Application Support/Plex Media Player/mpv.conf" with the following contents:
input-ipc-server=/tmp/mpvsocket
hr-seek-framedrop=no

From the Terminal:

echo "input-ipc-server=/tmp/mpvsocket" >> ~/"Library/Application Support/Plex Media Player/mpv.conf"
  • Turn on hardware video decoder: edit "~/Library/Application Support/Plex Media Player/plexmediaplayer.conf", find the line containing "hardwareDecoding" and set it to
"hardwareDecoding": "copy",

Recommended minimal mpv.conf:

input-ipc-server=/tmp/mpvsocket
hwdec-codecs=all
hwdec=auto-copy
hr-seek-framedrop=no
opengl-early-flush=no

Troubleshooting

If you get the playback error - An error occurred trying to play <video title> - turn off secure connections in the Plex Server settings:

Plex Server -> Settings -> Network, set Secure connections to Disabled and restart Plex Media Player.