Skip to content

bpwhelan/Nagare

Repository files navigation

nagare

Nagare (流れ)

Pronounced "Nah-gah-reh" — subtitle mining companion for Emby, Jellyfin, and Plex.

🎬 See it in Action

Nagare UI

The subtitle timeline — mine any line from the current or past session directly in the browser. Highlighting via https://jiten.moe/reader


Anki Enhancement Dialogue

Anki Enhancement Dialogue allowing for tight control over what we mine


card_example.mp4

Finished Card (Kiku Notetype)


What does it do?

Nagare watches your active media server playback sessions, displays a live subtitle timeline in the browser, and enriches Anki cards with sentence audio, screenshots, and source metadata — without interrupting your immersion.

Note: This project is my most vibe-coded yet, so YMMV. It's really a problem that I sought out to solve for myself, but I believe/hope it can be useful for others.


Features

  • Live subtitle timeline synced to playback
  • Sentence audio extraction and animated AVIF screenshot clips
  • AnkiConnect integration with automatic card matching
  • Playback controls (seek, pause, resume) from the browser.
  • Yomitan-aware pause behavior. (Must turn off Secure Popup in Yomitan)
  • Watch history for mining after playback ends
  • Multi-server support (Emby + Jellyfin + Plex simultaneously)

Roadmap

  • Initial prototype with Emby support
  • Add Jellyfin support
  • Add Plex support
  • AnkiConnect integration
  • Support for subtitles even when player has none (listening practice while maintaining mineability).
  • Mining History, allowing you to touch up cards after the fact, or add more context.
  • Session History, allowing you to load past sessions and mine from them.
  • Manual Subtitle Offset
  • Automatic Subtitle Sync? IDK if this is even feasible, the ability to press a button, Nagare syncs with alass or subplz, and then sends the updated sub to the media server would be the idea.
  • More Active Subtitle Sync? If you change subtitle timing in media player, Nagare will not adjust. I doubt this is possible...
  • More options for audio/ss formats

Installation

Docker (recommended)

  1. Run with Docker Compose:
# docker-compose.yml
services:
  nagare:
    image: ghcr.io/bpwhelan/nagare:latest
    container_name: nagare
    ports:
      - "9470:9470"
    volumes:
      - ./data:/app/data
      # Optional: mount media library for disk-mode access
      # - /path/to/anime:/media/Anime:ro
    extra_hosts:
      - "host.docker.internal:host-gateway"
    restart: unless-stopped
docker compose up -d
  1. Open http://localhost:9470 and configure Nagare from the web UI Config page.

Binary release

Download the latest binary for your platform from GitHub Releases.

Requirements:

./nagare

The web UI is served at http://localhost:9470.

Build from source

cd frontend && npm ci && npm run build && cd ..
cargo build --release

Configuration

All configuration is managed through the web UI Config page and stored in data/nagare.sqlite. On first run, configure:

  1. Media server — URL and API key (Emby/Jellyfin) or token (Plex)
  2. AnkiConnect — URL and field mappings (Sentence, SentenceAudio, Picture)
  3. Media accessauto, disk, or api mode; add path mappings if server and Nagare see different file paths

How it works

  1. Nagare polls your media server(s) for active playback sessions
  2. Select a session or allow Nagare to auto-select the most recently active one
  3. Create a card in Anki — Nagare matches it to the exact subtitle context
  4. Confirm the match, preview audio/screenshot, and enrich the card

Project structure

src/            Rust backend (Axum + Tokio)
frontend/       Svelte frontend (Vite)
Dockerfile      Multi-stage container build

Data is stored in data/nagare.sqlite. Generated Anki media files are prefixed with nagare_.

About

Get a mineable stream of subtitles from Jellyfin, Emby, and Plex. Enhance Anki cards with Sentence Audio, Animated (optional) Screenshot, and more.

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors