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

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.1.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.1-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jellyproxy-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 1b73305c5693043beeca726f017420b3d7725d451854e28e6886fbc374378d52
MD5 87b539c5093f063da65d58dc8f2c90e9
BLAKE2b-256 d0b1d6eebe7c61ddb6fbc61fd585f71ee801bee3a84238ba1c6e34a898d0be10

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jellyproxy-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe6ba3c2f902b3c4ddfec793959237668ff9c7f07ab2aae14ab67508bbc698d3
MD5 f212dbb63512fcb75b26a60c8e7030ca
BLAKE2b-256 2e3f58ed3285c731d0b45f69021bd3b37ea4d76ea2ef70527da7dd26414d82c9

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