{"id":13551864,"url":"https://github.com/iwalton3/plex-mpv-shim","last_synced_at":"2025-04-11T11:50:53.120Z","repository":{"id":40063990,"uuid":"202855346","full_name":"iwalton3/plex-mpv-shim","owner":"iwalton3","description":"Cast media from Plex Mobile and Web apps to MPV. (Unofficial)","archived":false,"fork":false,"pushed_at":"2025-03-17T20:10:54.000Z","size":243,"stargazers_count":377,"open_issues_count":70,"forks_count":24,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-04T04:01:30.916Z","etag":null,"topics":["mpv","plex"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iwalton3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://paypal.me/iwalton3"]}},"created_at":"2019-08-17T08:26:12.000Z","updated_at":"2025-03-31T01:23:09.000Z","dependencies_parsed_at":"2024-01-13T16:26:28.572Z","dependency_job_id":"6285d502-c275-427e-ac66-0807632255ee","html_url":"https://github.com/iwalton3/plex-mpv-shim","commit_stats":{"total_commits":219,"total_committers":9,"mean_commits":"24.333333333333332","dds":"0.31506849315068497","last_synced_commit":"2545a70707d57766f82bab56ea4f2da231be5583"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwalton3%2Fplex-mpv-shim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwalton3%2Fplex-mpv-shim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwalton3%2Fplex-mpv-shim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwalton3%2Fplex-mpv-shim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iwalton3","download_url":"https://codeload.github.com/iwalton3/plex-mpv-shim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248389970,"owners_count":21095702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mpv","plex"],"created_at":"2024-08-01T12:01:54.701Z","updated_at":"2025-04-11T11:50:53.081Z","avatar_url":"https://github.com/iwalton3.png","language":"Python","funding_links":["https://paypal.me/iwalton3"],"categories":["Python","Other"],"sub_categories":[],"readme":"# MPV Shim for Plex\n\nMPV Shim is a simple and lightweight Plex client, with support for Windows\nand Linux. Think of it as an open source Chromecast for Plex. You can cast almost\nanything from Plex and it will Direct Play. Subtitles are fully supported, and\nthere are tools to manage them like no other Plex client.\n\n## Getting Started\n\nIf you are on Windows, simply [download the binary](https://github.com/iwalton3/plex-mpv-shim/releases).\nIf you are using Linux or OSX, please see the [Linux Installation](https://github.com/iwalton3/plex-mpv-shim/blob/master/README.md#linux-installation) or [OSX Installation](https://github.com/iwalton3/plex-mpv-shim/blob/master/README.md#osx-installation) sections below.\n\nTo use the client, simply launch it and cast your media from another Plex application.\nThe mobile and web applications are supported. You do not have to log in to the client\nor set it up in any other way.\n\nIf you want to use the web application to cast, you must either be on the same network as\na Plex server (an empty one will work) or install the [MPV Shim Local Connection](https://greasyfork.org/en/scripts/398049-mpv-shim-local-connection) user script.\n\nThe application runs with a notification icon by default. You can use this to view the application log, open the config folder, and open the application menu.\n\n## Advanced Features\n\n### Menu\n\nTo open the menu, press **c** on your computer or **home** within the Plex mobile apps.\n\nThe menu enables you to:\n - Adjust video transcoding quality.\n - Change the default transcoder settings.\n - Change subtitles or audio, while knowing the track names.\n - Change subtitles or audio for an entire series at once.\n - Mark the media as unwatched and quit.\n - Configure shader packs and SVP profiles.\n\nOn your computer, use the arrow keys, enter, and escape to navigate. On your phone, use\nthe arrow buttons, ok, back, and home to navigate. (The option for remote controls is\nshown next to the name of the client when you select it from the cast menu.)\n\nPlease also note that the on-screen controller for MPV (if available) cannot change the\naudio and subtitle track configurations for transcoded media. It also cannot load external\nsubtitles. You must either use the menu or the application you casted from.\n\n### Shader Packs \n\nShader packs are a recent feature addition that allows you to easily use advanced video\nshaders and video quality settings. These usually require a lot of configuration to use,\nbut MPV Shim's default shader pack comes with [FSRCNNX](https://github.com/igv/FSRCNN-TensorFlow)\nand [Anime4K](https://github.com/bloc97/Anime4K) preconfigured. Try experimenting with video\nprofiles! It may greatly improve your experience.\n\nShader Packs are ready to use as of the most recent MPV Shim version. To use, simply\nnavigate to the **Video Playback Profiles** option and select a profile.\n\nFor details on the shader settings, please see [default-shader-pack](https://github.com/iwalton3/default-shader-pack).\nIf you would like to customize the shader pack, there are details in the configuration section.\n\n### SVP Integration\n\nSVP integration allows you to easily configure SVP support, change profiles, and enable/disable\nSVP without having to exit the player. It is not enabled by default, please see the configuration\ninstructions for instructions on how to enable it.\n\n### Keyboard Shortcuts\n\nThis program supports most of the [keyboard shortcuts from MPV](https://mpv.io/manual/stable/#interactive-control). The custom keyboard shortcuts are:\n\n - \u003c \u003e to skip episodes\n - q to close player\n - w to mark watched and skip\n - u to mark unwatched and quit\n - c to open the menu\n\nHere are the notable MPV keyboard shortcuts:\n\n - space - Pause/Play\n - left/right - Seek by 5 seconds\n - up/down - Seek by 1 minute\n - s - Take a screenshot\n - S - Take a screenshot without subtitles\n - f - Toggle fullscreen\n - ,/. - Seek by individual frames\n - \\[/\\] - Change video speed by 10%\n - {/} - Change video speed by 50%\n - backspace - Reset speed\n - m - Mute\n - d - Enable/disable deinterlace\n - Ctrl+Shift+Left/Right - Adjust subtitle delay.\n\n## Configuration\n\nThe configuration file is located in different places depending on your platform. You can open the\nconfiguration folder using the systray icon. When you launch the program on Linux or OSX from the terminal,\nthe location of the config file will be printed. The locations are:\n - Windows - `%appdata%\\plex-mpv-shim\\conf.json`\n - Linux - `~/.config/plex-mpv-shim/conf.json`\n - Mac OSX - `Library/Application Support/plex-mpv-shim/conf.json`\n - CygWin - `~/.config/plex-mpv-shim/conf.json`\n\nYou can specify a custom configuration folder with the `--config` option.\n\n### Transcoding\n\nYou can adjust the basic transcoder settings via the menu.\n\n- `always_transcode` - This will tell the client to always transcode, without asking. Default: `false`\n    - This may be useful if you are using limited hardware that cannot handle advanced codecs.\n    - You may have some luck changing `client_profile` in the configuration to a more restrictive one.\n- `auto_transcode` - This will ask the server to determine if transcoding is suggested. Default: `true`\n    - `transcode_kbps` - Transcode bandwidth to request. Default: `2000`\n    - `direct_limit` - Also limit direct play to `transcode_kbps`. Default: `false`\n    - Note that `direct_limit` cannot be overriden without changing `transcode_kbps`.\n    - If `direct_limit` is not set, the player assumes the server will set the limit.\n- `adaptive_transcode` - Tell the server to adjust the quality while streaming. Default: `false`\n\n### Shell Command Triggers\n\nYou can execute shell commands on media state using the config file:\n\n - `media_ended_cmd` - When all media has played.\n - `pre_media_cmd` - Before the player displays. (Will wait for finish.)\n - `stop_cmd` - After stopping the player.\n - `idle_cmd` - After no activity for `idle_cmd_delay` seconds.\n\n### Subtitle Visual Settings\n\nAll of these settings apply to direct play and are adjustable through the controlling app. Note that some may not work depending on the subtitle codec. Subtitle position and color are not available for transcodes.\n\n - `subtitle_size` - The size of the subtitles, in percent. Default: `100`\n - `subtitle_color` - The color of the subtitles, in hex. Default: `#FFFFFFFF`\n - `subtitle_position` - The position (top, bottom, middle). Default: `bottom`\n\n### External MPV\n\nThe client now supports using an external copy of MPV, including one that is running prior to starting\nthe client. This may be useful if your distribution only provides MPV as a binary executable (instead\nof as a shared library), or to connect to MPV-based GUI players. Please note that SMPlayer exhibits\nstrange behaviour when controlled in this manner. External MPV is currently the only working backend\nfor media playback on OSX.\n\n- `mpv_ext` - Enable usage of the external player by default. Default: `false`\n    - The external player may still be used by default if `libmpv1` is not available.\n- `mpv_ext_path` - The path to the `mpv` binary to use. By default it uses the one in the PATH. Default: `null`\n    - If you are using Windows, make sure to use two backslashes. Example: `C:\\\\path\\\\to\\\\mpv.exe`\n- `mpv_ext_ipc` - The path to the socket to control MPV. Default: `null`\n    - If unset, the socket is a randomly selected temp file.\n    - On Windows, this is just a name for the socket, not a path like on Linux.\n- `mpv_ext_start` - Start a managed copy of MPV with the client. Default: `true`\n    - If not specified, the user must start MPV prior to launching the client.\n    - MPV must be launched with `--input-ipc-server=[value of mpv_ext_ipc]`.\n- `mpv_ext_no_ovr` - Disable built-in mpv configuration files and use user defaults.\n    - Please note that some scripts and settings, such as ones to keep MPV open, may break\n      functionality in MPV Shim.\n\n### Keyboard Shortcuts\n\nYou can reconfigure the custom keyboard shortcuts. You can also set them to `null` to disable the shortcut. Please note that disabling keyboard shortcuts may make some features unusable. Additionally, if you remap `q`, using the default shortcut will crash the player.\n\n - `kb_stop` - Stop playback and close MPV. (Default: `q`)\n - `kb_prev` - Go to the previous video. (Default: `\u003c`)\n - `kb_next` - Go to the next video. (Default: `\u003e`)\n - `kb_watched` - Mark the video as watched and skip. (Default: `w`)\n - `kb_unwatched` - Mark the video as unwatched and quit. (Default: `u`)\n - `kb_menu` - Open the configuration menu. (Default: `c`)\n - `kb_menu_esc` - Leave the menu. Exits fullscreen otherwise. (Default: `esc`)\n - `kb_menu_ok` - \"ok\" for menu. (Default: `enter`)\n - `kb_menu_left` - \"left\" for menu. Seeks otherwise. (Default: `left`)\n - `kb_menu_right` - \"right\" for menu. Seeks otherwise. (Default: `right`)\n - `kb_menu_up` - \"up\" for menu. Seeks otherwise. (Default: `up`)\n - `kb_menu_down` - \"down\" for menu. Seeks otherwise. (Default: `down`)\n - `kb_pause` - Pause. Also \"ok\" for menu. (Default: `space`)\n - `kb_debug` - Trigger `pdb` debugger. (Default: `~`)\n - `seek_up` - Time to seek for \"up\" key. (Default: `60`)\n - `seek_down` - Time to seek for \"down\" key. (Default: `-60`)\n - `seek_right` - Time to seek for \"right\" key. (Default: `5`)\n - `seek_left` - Time to seek for \"left\" key. (Default: `-5`)\n\n### Shader Packs\n\nShader packs allow you to import MPV config and shader presets into MPV Shim and easily switch\nbetween them at runtime through the built-in menu. This enables easy usage and switching of\nadvanced MPV video playback options, such as video upscaling, while being easy to use.\n\nIf you select one of the presets from the shader pack, it will override some MPV configurations\nand any shaders manually specified in `mpv.conf`. If you would like to customize the shader pack,\nuse `shader_pack_custom`.\n\n - `shader_pack_enable` - Enable shader pack. (Default: `true`)\n - `shader_pack_custom` - Enable to use a custom shader pack. (Default: `false`)\n    - If you enable this, it will copy the default shader pack to the `shader_pack` config folder.\n    - This initial copy will only happen if the `shader_pack` folder didn't exist.\n    - This shader pack will then be used instead of the built-in one from then on.\n - `shader_pack_remember` - Automatically remember the last used shader profile. (Default: `true`)\n - `shader_pack_profile` - The default profile to use. (Default: `null`)\n    - If you use `shader_pack_remember`, this will be updated when you set a profile through the UI.\n - `shader_pack_subtype` - The profile group to use. The default pack contains `lq` and `hq` groups. Use `hq` if you have a fancy graphics card.\n\n### SVP Integration\n\nTo enable SVP integration, set `svp_enable` to `true` and enable \"External control via HTTP\" within SVP\nunder Settings \u003e Control options. Adjust the `svp_url` and `svp_socket` settings if needed.\n\n - `svp_enable` - Enable SVP integration. (Default: `false`)\n - `svp_url` - URL for SVP web API. (Default: `http://127.0.0.1:9901/`)\n - `svp_socket` - Custom MPV socket to use for SVP.\n    - Default on Windows: `mpvpipe`\n    - Default on other platforms: `/tmp/mpvsocket`\n\nCurrently on Windows the built-in MPV does not work with SVP. You must download MPV yourself.\n\n - Download the latest MPV build [from here](https://sourceforge.net/projects/mpv-player-windows/files/64bit/).\n - Follow the [vapoursynth instructions](https://github.com/shinchiro/mpv-winbuild-cmake/wiki/Setup-vapoursynth-for-mpv).\n     - Make sure to use the latest Python, not Python 3.7.\n - In the config file, set `mpv_ext` to `true` and `mpv_ext_path` to the path to `mpv.exe`.\n     - Make sure to use two backslashes per each backslash in the path.\n\n### Other Configuration Options\n\n - `player_name` - The name of the player that appears in the cast menu. Initially set from your hostname.\n - `http_port` - The TCP port to listen on for Plex to control the player. Default: `3000`\n - `enable_play_queue` - Enable play queue support. Default: `true`\n    - If you disable this, the application will queue media based on the series.\n    - This is a legacy feature. It is not regularly tested.\n - `client_uuid` - The identifier for the client. Set to a random value on first run.\n - `audio_ac3passthrough` - Does not work. Currently only changes transcoder settings. Default: `false`\n - `audio_dtspassthrough` - Does not work. Currently only changes transcoder settings. Default: `false`\n - `allow_http` - Allow insecure Plex server connections. Default: `false`\n    - This may be useful if you are using a Plex server offline or not signed in.\n - `client_profile` - The client profile for transcoding. Default: `Plex Home Theater`\n    - It may be useful to change this on limited hardware.\n    - If you change this, it should be changed to a profile that supports `hls` streaming.\n - `sanitize_output` - Prevent Plex tokens from being printed to the console. Default: `true`\n - `fullscreen` - Fullscreen the player when starting playback. Default: `true`\n - `enable_gui` - Enable the system tray icon and GUI features. Default: `true`\n - `media_key_seek` - Use the media next/prev keys to seek instead of skip episodes. Default: `false`\n - `enable_osc` - Enable the MPV on-screen controller. Default: `true`\n    - It may be useful to disable this if you are using an external player that already provides a user interface.\n - `log_decisions` - Log the full playback URLs. Default: `false`\n - `mpv_log_level` - Log level to use for mpv. Default: `info`\n    - Options: fatal, error, warn, info, v, debug, trace\n - `idle_when_paused` - Consider the player idle when paused. Default: `false`\n - `stop_idle` - Stop the player when idle. (Requires `idle_when_paused`.) Default: `false`\n - `skip_intro_always` - Always skip intros, without asking. Default: `false`\n - `skip_intro_prompt` - Prompt to skip intro via seeking. Default: `true`\n - `skip_credits_always` - Always skip credits, without asking. Default: `false`\n - `skip_credits_prompt` - Prompt to skip credits via seeking. Default: `true`\n - `menu_mouse` - Enable mouse support in the menu. Default: `true`\n     - This requires MPV to be compiled with lua support.\n\n### MPV Configuration\n\nYou can configure mpv directly using the `mpv.conf` and `input.conf` files. (It is in the same folder as `conf.json`.)\nThis may be useful for customizing video upscaling, keyboard shortcuts, or controlling the application\nvia the mpv IPC server.\n\n## Tips and Tricks\n\nVarious tips have been found that allow the media player to support special\nfunctionality, albeit with more configuration required.\n\n### Open on Specific Monitor\n\nPlease note: Edits to the `mpv.conf` will not take effect until you restart the application. You can open the config directory by using the menu option in the system tray icon.\n\n**Option 1**: Select fullscreen output screen through MPV.\nDetermine which screen you would like MPV to show up on.\n - If you are on Windows, right click the desktop and select \"Display Settings\". Take the monitor number and subtract one.\n - If you are on Linux, run `xrandr`. The screen number is the number you want. If there is only one proceed to **Option 2**.\n\nAdd the following to your `mpv.conf` in the [config directory](https://github.com/iwalton3/jellyfin-mpv-shim#mpv-configuration), replacing `0` with the number from the previous step:\n```\nfs=yes\nfs-screen=0\n```\n\n**Option 2**: (Linux Only) If option 1 does not work, both of your monitors are likely configured as a single \"screen\".\n\nRun `xrandr`. It should look something like this:\n\n```\nScreen 0: minimum 8 x 8, current 3520 x 1080, maximum 16384 x 16384\nVGA-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm\n   1920x1080     60.00*+\n   1680x1050     59.95  \n   1440x900      59.89  \n   1280x1024     75.02    60.02  \n   1280x960      60.00  \n   1280x800      59.81  \n   1280x720      60.00  \n   1152x864      75.00  \n   1024x768      75.03    70.07    60.00  \n   800x600       75.00    72.19    60.32    56.25  \n   640x480       75.00    59.94  \nLVDS-0 connected 1600x900+1920+180 (normal left inverted right x axis y axis) 309mm x 174mm\n   1600x900      59.98*+\n```\n\nIf you want MPV to open on VGA-0 for instance, add the following to your `mpv.conf` in the [config directory](https://github.com/iwalton3/jellyfin-mpv-shim#mpv-configuration):\n```\nfs=yes\ngeometry=1920x1080+0+0\n```\n**Option 3**: (Linux Only) If your window manager supports it, you can tell the window manager to always open on a specific screen.\n\n - For OpenBox: https://forums.bunsenlabs.org/viewtopic.php?id=1199\n - For i3: https://unix.stackexchange.com/questions/96798/i3wm-start-applications-on-specific-workspaces-when-i3-starts/363848#363848\n\n### Control Volume with Mouse Wheel\n\nAdd the following to `input.conf`:\n```\nWHEEL_UP add volume 5\nWHEEL_DOWN add volume -5\n```\n\n### MPRIS Plugin\n\nSet `mpv_ext` to `true` in the config. Add `script=/path/to/mpris.so` to `mpv.conf`.\n\n### Run Multiple Instances\n\nYou can pass `--config /path/to/folder` to run another copy of the player. Make sure to change the port that the player uses.\n\n### Audio Passthrough\n\nYou can edit `mpv.conf` to support audio passthrough. A [user on Reddit](https://reddit.com/r/jellyfin/comments/fru6xo/new_cross_platform_desktop_client_jellyfin_mpv/fns7vyp) had luck with this config:\n```\naudio-spdif=ac3,dts,eac3 # (to use the passthrough to receiver over hdmi)\naudio-channels=2 # (not sure this is necessary, but i keep it in because it works)\naf=scaletempo,lavcac3enc=yes:640:3 # (for aac 5.1 tracks to the receiver)\n```\n\n### MPV Crashes with \"The sub-scale option must be a floating point number or a ratio\"\n\nRun the plex-mpv-shim program with LC_NUMERIC=C.\n\n### Use with gnome-mpv/celluloid\n\nYou can use `gnome-mpv` with MPV Shim, but you must launch `gnome-mpv` separately before MPV Shim. (`gnome-mpv` doesn't support the MPV command options directly.)\n\nConfigure MPV Shim with the following options (leave the other ones):\n```json\n{\n    \"mpv_ext\": true,\n    \"mpv_ext_ipc\": \"/tmp/gmpv-socket\",\n    \"mpv_ext_path\": null,\n    \"mpv_ext_start\": false,\n    \"enable_osc\": false\n}\n```\nThen within `gnome-mpv`, click the application icon (top left) \u003e Preferences. Configure the following Extra MPV Options:\n```\n--idle --input-ipc-server=/tmp/gmpv-socket\n```\n\n### Heavy Memory Usage\n\nA problem has been identified where MPV can use a ton of RAM after media has been played,\nand this RAM is not always freed when the player goes into idle mode. Some users have\nfound that using external MPV lessens the memory leak. To enable external MPV on Windows:\n\n - [Download a copy of MPV](https://sourceforge.net/projects/mpv-player-windows/files/64bit/)\n - Unzip it with 7zip.\n - Configure `mpv_ext` to `true`. (See the config section.)\n - Configure `mpv_ext_path` to `C:\\\\replace\\\\with\\\\path\\\\to\\\\mpv.exe`. (Note usage of two `\\\\`.)\n - Run the program and wait. (You'll probably have to use it for a while.)\n - Let me know if the high memory usage is with `mpv.exe` or the shim itself.\n\nOn Linux, the process is similar, except that you don't need to set the `mpv_ext_path` variable.\nOn OSX, external MPV is already the default and is the only supported player mode.\n\nIn the long term, I may look into a method of terminating MPV when not in use. This will require\na lot of changes to the software. \n\n## Development\n\nIf you'd like to run the application without installing it, run `./run.py`.\nThe project is written entirely in Python 3. There are no closed-source\ncomponents in this project. It is fully hackable.\n\nThe project is dependent on `python-mpv`, `python-mpv-jsonipc`, and `requests`. If you are using Windows\nand would like mpv to be maximize properly, `pywin32` is also needed. The GUI component\nuses `pystray` and `tkinter`, but there is a fallback cli mode.\n\nIf you are using a local firewall, you'll want to allow inbound connections on\nTCP 3000 and UDP 32410, 32412, 32413, and 32414. The TCP port is for the web\nserver the client uses to recieve commands. The UDP ports are for the [GDM\ndiscovery protocol](https://support.plex.tv/articles/201543147-what-network-ports-do-i-need-to-allow-through-my-firewall/).\n\nThis project is based on https://github.com/wnielson/omplex, which\nis available under the terms of the MIT License. The project was ported\nto python3, modified to use mpv as the player, and updated to allow all\nfeatures of the remote control api for video playback. The shaders included\nin the shader pack are also available under verious open source licenses,\n[which you can read about here](https://github.com/iwalton3/default-shader-pack/blob/master/LICENSE.md).\n\n## Linux Installation\n\nIf you are on Linux, you can install via pip. You'll need [libmpv1](https://github.com/Kagami/mpv.js/blob/master/README.md#get-libmpv) or `mpv` installed.\n```bash\npip3 install --upgrade plex-mpv-shim\n```\nNote: Recent distributions make pip unusable by default. Consider using conda or add a virtualenv to your user's path.\n\nIf you would like the GUI and systray features, also install `pystray` and `tkinter`:\n```bash\npip3 install pystray\nsudo apt install python3-tk\n```\n\nYou can build mpv from source to get better codec support. Execute the following:\n```bash\nsudo pip3 install --upgrade python-mpv\nsudo apt install autoconf automake libtool libharfbuzz-dev libfreetype6-dev libfontconfig1-dev libx11-dev libxrandr-dev libvdpau-dev libva-dev mesa-common-dev libegl1-mesa-dev yasm libasound2-dev libpulse-dev libuchardet-dev zlib1g-dev libfribidi-dev git libgnutls28-dev libgl1-mesa-dev libsdl2-dev cmake wget python g++ libluajit-5.1-dev\ngit clone https://github.com/mpv-player/mpv-build.git\ncd mpv-build\necho --enable-libmpv-shared \u003e mpv_options\n./rebuild -j4\nsudo ./install\nsudo ldconfig\n```\n\n## OSX Installation\nCurrently on OSX only the external MPV backend seems to be working. I cannot test on OSX, so please report any issues you find.\n\nTo install the CLI version:\n\n1. Install brew. ([Instructions](https://brew.sh/))\n2. Install python3 and mpv. `brew install python mpv`\n3. Install plex-mpv-shim. `pip3 install --upgrade plex-mpv-shim`\n4. Run `plex-mpv-shim`.\n\nIf you'd like to install the GUI version, you need a working copy of tkinter.\n\n1. Install pyenv. ([Instructions](https://medium.com/python-every-day/python-development-on-macos-with-pyenv-2509c694a808))\n2. Install TK and mpv. `brew install tcl-tk mpv`\n3. Install python3 with TK support. `FLAGS=\"-I$(brew --prefix tcl-tk)/include\" pyenv install 3.8.1`\n4. Set this python3 as the default. `pyenv global 3.8.1`\n5. Install plex-mpv-shim and pystray. `pip3 install --upgrade plex-mpv-shim pystray`\n6. Run `plex-mpv-shim`.\n\n## Building on Windows\n\nThere is a prebuilt version for Windows in the releases section. When\nfollowing these directions, please take care to ensure both the python\nand libmpv libraries are either 64 or 32 bit. (Don't mismatch them.)\n\n1. Install [Python3](https://www.python.org/downloads/) with PATH enabled. Install [7zip](https://ninite.com/7zip/).\n2. After installing python3, open `cmd` as admin and run `pip install --upgrade pyinstaller python-mpv requests pywin32 pystray python-mpv-jsonipc`.\n3. Download [libmpv](https://sourceforge.net/projects/mpv-player-windows/files/libmpv/).\n4. Extract the `mpv-1.dll` from the file and move it to the `plex-mpv-shim` folder.\n5. Open a regular `cmd` prompt. Navigate to the `plex-mpv-shim` folder.\n6. If you would like the shader pack included, [download it](https://github.com/iwalton3/default-shader-pack) and put the contents into `plex_mpv_shim\\default_shader_pack`.\n7. Run `pyinstaller -wF --add-binary \"mpv-1.dll;.\" --add-data \"plex_mpv_shim\\default_shader_pack;plex_mpv_shim\\default_shader_pack\" --add-binary \"plex_mpv_shim\\systray.png;.\" --icon media.ico run.py --hidden-import pystray._win32`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwalton3%2Fplex-mpv-shim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiwalton3%2Fplex-mpv-shim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwalton3%2Fplex-mpv-shim/lists"}