Skip to main content

Jellyfin MPV IPC Proxy & Filter - Intercept and filter IPC communication between jellyfin-mpv-shim and mpv

Project description

JellyProxy

A proxy that sits between jellyfin-mpv-shim and mpv to filter and control IPC commands.

What it does

Jellyfin-mpv-shim sometimes overrides your carefully configured mpv settings. JellyProxy prevents this by intercepting commands between JMS and mpv, letting you block unwanted changes while keeping the features you want.

Installation

pip install jellyproxy-py

Quick Start

  1. Generate a config file:

    jellyproxy --generate-config > ~/.config/jellyproxy/conf.json
    
  2. Edit the config to block commands you don't want. The example config blocks set_property commands that override your settings.

  3. Update your JMS config to point to the proxy socket:

    {
      "mpv_ext": true,
      "mpv_ext_ipc": "/tmp/mpvSockets/spoof",
      "mpv_ext_start": false,
      "mpv_ext_path": null,
    }
    

    Note, mpv_ext_ipc should match your spoof_socket path in ~/.config/jellyproxy/conf.json, if you've changed it.

  4. Run it:

    jellyproxy
    

That's it. JellyProxy will start mpv and JMS automatically, and your mpv settings won't get clobbered anymore.

Configuration

The config file uses JSON with two main filtering lists:

  • blacklist - Commands to block
  • whitelist - Commands to explicitly allow (overrides blacklist)

Each rule matches commands using regex patterns:

{
  "blacklist": [
    {
      "#": "Block JMS from changing OSC setting",
      "command": ["set_property", "osc", ".*"]
    }
  ],
  "whitelist": [
    {
      "#": "But allow subtitle color changes",
      "command": ["set_property", "sub-color", ".*"]
    }
  ]
}

Command Line Options

jellyproxy --help                    # Show all options
jellyproxy --config myconfig.json    # Use custom config
jellyproxy --debug                   # Enable debug logging
jellyproxy --validate               # Check config for errors

Config Reloading

JellyProxy watches your config file and restarts automatically when you make changes. No need to manually restart.

Logging

All IPC traffic gets logged so you can see what commands JMS is sending. Use --debug for extra detail, or edit the logging section in your config.

Socket Paths

By default:

  • JMS connects to /tmp/mpvSockets/spoof (the proxy)
  • Proxy connects to /tmp/mpvSockets/real (actual mpv)

Change these in the config if needed.

Troubleshooting

JMS can't connect: Check that the socket paths match between your JMS config and JellyProxy config.

Commands not being filtered: Run with --debug to see the exact commands being sent and whether they match your rules.

Config errors: Use jellyproxy --validate to check for problems.

Multiple JMS instances: The old config reloading had a bug that left processes running. This is fixed now.

Requirements

  • Python 3.8+
  • python-mpv-jsonipc (pip install python-mpv-jsonipc)
  • A working jellyfin-mpv-shim setup

License

GPL-3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jellyproxy-0.1.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jellyproxy-0.1.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file jellyproxy-0.1.0.tar.gz.

File metadata

  • Download URL: jellyproxy-0.1.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for jellyproxy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 63a75c333059c45f68b1c37f4044730632c6173827bc9af7c97f2c276d1ed584
MD5 d670bd91369bc103f90824421dea9875
BLAKE2b-256 c7b90e79f235297de77bb8b46f4d8254cc346f87626bb09b533bf21acf2b3c22

See more details on using hashes here.

File details

Details for the file jellyproxy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: jellyproxy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for jellyproxy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92adc9a02aa8d820e01fb4cf14957866cbbe0fcbdc107d6a3f7e771c0d565652
MD5 af55c1f25c8b674b82e973506a7bd089
BLAKE2b-256 e0c02c6e2404a7df81529ed57d27b38d09b2f81df70f4399889ee40ea2289fe5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page