From f11e5508ad40061bdcf300189ef078537c2a248f Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sun, 28 Jun 2026 12:16:07 +0200 Subject: [PATCH] update readme and spec for current release --- README.md | 656 ++++++++++++++++++++++++------------------------------ SPEC.md | 10 +- 2 files changed, 301 insertions(+), 365 deletions(-) diff --git a/README.md b/README.md index e9d84b6..7e608b5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,19 @@ # JRay -JRay reads "truth" files produced offline by the scene-actor-extraction pipeline (face detection + recognition) and exposes an API to query which actors are visible on screen at a given timestamp in a movie, for building an actor-overlay (Jellyfin "X-Ray") style feature. +A Jellyfin plugin that brings an actor-overlay (think Amazon "X-Ray") feature to your media: pause a movie and JRay shows you which actors are on screen at that exact moment. + +JRay reads "truth" files produced offline by the +[scene-actor-extraction](https://github.com/dtourolle/scene-actor-extraction) +pipeline (face detection + recognition) and exposes an API to query which actors +are visible at a given timestamp. A small overlay, injected into the Jellyfin web +client, displays the result when you pause playback. + +## Status + +**Alpha** — JRay works end to end (sidecar truth files, remote truth push, and the +pause overlay) but is early software and the truth-file schema may still change. +The overlay relies on patching the web client's `index.html`, which is inherently +a little fragile across Jellyfin versions (see [Important Notes](#important-notes)). ## Quick Install @@ -10,422 +23,339 @@ Add this repository URL in Jellyfin (Dashboard → Plugins → Repositories): https://gitea.tourolle.paris/dtourolle/jRay/raw/branch/master/manifest.json ``` -Then install "JRay" from the plugin catalog. +Then install "JRay" from the plugin catalog and restart Jellyfin. ---- +## Features -# So you want to make a Jellyfin plugin +- **Pause overlay** — pause a movie or episode in the web client and see the + actors currently on screen, without leaving the player. +- **Sidecar truth files** — drop a `Movie.jray.json` next to `Movie.mkv` and JRay + picks it up automatically (suffix configurable). +- **Remote truth push** — for servers that can't run the extraction pipeline + locally, a remote worker can `PUT` truth data over HTTP. Managed (pushed) data + takes precedence over sidecar files. +- **Work discovery API** — a remote worker can poll for a random batch of library + items that still need processing, so the backlog spreads naturally across + workers without server-side task tracking. +- **Extensible "context at time t" envelope** — the per-timestamp response is + designed to grow (locations, trivia, …) without breaking existing clients. +- **In-memory caching** — loaded truth files are cached with a configurable TTL. +- **Toggleable overlay** — disabling the overlay also cleanly removes the injected + script from the web client. -Awesome! This guide is for you. Jellyfin plugins are written using the dotnet standard framework. What that means is you can write them in any language that implements the CLI or the DLI and can compile to net8.0. The examples on this page are in C# because that is what most of Jellyfin is written in, but F#, Visual Basic, and IronPython should all be compatible once compiled. - -## 0. Things you need to get started - -- [Dotnet SDK 9.0](https://dotnet.microsoft.com/en-us/download/dotnet) - -- An editor of your choice. Some free choices are: - - [Visual Studio Code](https://code.visualstudio.com) - - [Visual Studio Community Edition](https://visualstudio.microsoft.com/downloads) - - [Mono Develop](https://www.monodevelop.com) - -## 0.5. Quickstarts - -We have a number of quickstart options available to speed you along the way. - -- [Download the Example Plugin Project](https://github.com/jellyfin/jellyfin-plugin-template/tree/master/Jellyfin.Plugin.Template) from this repository, open it in your IDE and go to [step 3](https://github.com/jellyfin/jellyfin-plugin-template#3-customize-plugin-information) - -- Install our dotnet template by [downloading the dotnet-template/content folder from this repo](https://github.com/jellyfin/jellyfin-plugin-template/tree/master/dotnet-template/content) or off of Nuget (Coming soon) - - ``` - dotnet new -i /path/to/templatefolder - ``` - -- Run this command then skip to step 4 - - ``` - dotnet new Jellyfin-plugin -name MyPlugin - ``` - -If you'd rather start from scratch keep going on to step one. This assumes no specific editor or IDE and requires only the command line with dotnet in the path. - -## 1. Initialize Your Project - -Make a new dotnet standard project with the following command, it will make a directory for itself. +## How It Works ``` -dotnet new classlib -f net9.0 -n MyJellyfinPlugin + scene-actor-extraction Jellyfin server web client + (offline pipeline) (browser) + ┌────────────────────┐ ┌──────────────────┐ ┌────────────┐ + │ face detection + │ truth │ JRay plugin │ jray?t= │ pause │ + │ recognition │ ───────► │ - sidecar reader │ ◄─────── │ overlay │ + │ result_sink_node │ file │ - managed store │ actors │ script │ + └────────────────────┘ │ - REST API │ ───────► └────────────┘ + │ PUT /Truth (remote) │ - web patcher │ + └────────────────────────►└──────────────────┘ ``` -Now add the Jellyfin shared libraries. +1. The extraction pipeline analyses a film offline and emits a **truth file** + listing each detected actor and the time windows they're on screen. +2. JRay loads that truth file either from a **sidecar** next to the media + (`Movie.jray.json`) or from a **managed store** populated via the push API. +3. On startup JRay injects a small `