SVP:Plex Media Player

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

Plex.jpg

Setting up Plex (Windows, Mac), Plex HTPC (Windows), Plex Media Player (Windows, Linux, macOS)

  • versions used: Plex 1.95.2 (18 June 2024), Plex HTPC 1.63.1 (12 June 2024), PMP 2.58.0 (19 May 2020)
  • developer's web site


Don't confuse "Plex Media Player" with "Plex" or "Plex HTPC" - these are different applications!


Installation - Windows

  • Install Plex for Windows or Plex HTPC or Plex Media Player (discontinued)
  • 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.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\mpv-2.dll"
  • NOTE: SVP has mpv-1.dll while Plex starting from ver.1.48.2 (July 7, 2022) wants mpv-2.dll!
  • 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

Plex HTPC

  • Replace Plex's mpv-2.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\mpv-2.dll"
  • NOTE: SVP has mpv-1.dll while Plex HTPC wants mpv-2.dll!
  • Create mpv's configuration file in "C:\Users\<name>\AppData\Local\Plex HTPC\mpv.conf" with the following contents:
input-ipc-server=mpvpipe
hwdec-codecs=all
hr-seek-framedrop=no

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

  • macOS 13 or later: allow Terminal app to update other applications in System Settings -> Privacy & Security -> App Management -> Terminal = checked
  • Install Plex for Mac into /Applications
  • Run it for the first time, then exit

Plex for Mac

  • Warning! Latest mpv 0.38 is not compatible with latest Plex (as of June 2024)!
    You have to downgrade to mpv 0.36 for Plex to work (warning: this will also downgrade ffmpeg to 6.1.1 and few other dependecies):
brew uninstall mpv ffmpeg openvino tbb
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/284bd043e10e8f8e1bfb8b3f1a5c9c38a31cf53f/Formula/t/tbb.rb
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/ad1d7500578acba537b0f5fdcc92abb1e11fe3ca/Formula/o/openvino.rb
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/47b4541b3f54743e514ebd2ae15b3860a46abed8/Formula/f/ffmpeg.rb
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/1b673702d246947fd3753f5800d85daf9d5c94f5/Formula/m/mpv.rb
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install tbb.rb openvino.rb ffmpeg.rb mpv.rb
brew pin tbb openvino ffmpeg mpv
  • Replace Plex's libmpv.2.dylib with the one from Brew installation: /opt/homebrew/lib/libmpv.2.dylib (ARM) or /usr/local/lib/libmpv.2.dylib (Intel) -> /Applications/Plex.app/Contents/Frameworks/libmpv.2.dylib
rm -f /Applications/Plex.app/Contents/Frameworks/libmpv.2.dylib
ln -s /opt/homebrew/lib/libmpv.2.dylib /Applications/Plex.app/Contents/Frameworks/libmpv.2.dylib

or, for the Intel-based Macs:

ln -s /usr/local/lib/libmpv.2.dylib /Applications/Plex.app/Contents/Frameworks/libmpv.2.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"

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.