A real-time subtitle viewer for MPV video player that displays subtitle history in a GUI window.
ScriptView is a two-component system that tracks and displays subtitles from MPV:
- MPV Lua Script - Monitors subtitle changes and exports them to a JSON file
- Rust GUI Application - Displays subtitle history in real-time with egui
Perfect for language learning, accessibility, or following along with video content.
- Real-time subtitle display with bottom alignment (most recent at bottom)
- Always-on-top window option
- Configurable display count (1-50 subtitles)
- One-click script installation for MPV
- Syncplay compatibility
- Automatic subtitle history clearing on file changes and seeks
- Rust (for building the GUI application)
- MPV video player
git clone <repository-url>
cd scriptview
cargo build --release
The Lua script can be installed either:
- Via GUI (recommended): Run the application and click "Install Script" if prompted
- Manually: Copy
subtitle-monitor.lua
to~/.config/mpv/scripts/
-
Start the ScriptView application:
cargo run --release
-
Start MPV with a video file:
mpv video.mkv
-
Subtitles will automatically appear in the ScriptView window as they're displayed in MPV
- Display Count: Adjust how many recent subtitles to show (1-50)
- Always on Top: Toggle window to stay above other applications
- Script Status: Monitor installation and runtime status
The system uses file-based inter-process communication:
- MPV Lua script monitors subtitle changes via the
sub-text
property - Script writes subtitle data to
/tmp/mpv-subtitles.json
- Rust application watches for file changes and updates the GUI
- New subtitles appear at the bottom like a chat interface
MIT License - see LICENSE file for details.