RMN-Player: Ultra-Optimized OLED Media Engine
A high-performance media environment built on the MPV core, specifically customized for high-refresh-rate OLED displays. Features dynamic edge ambilight simulation shaders, sub-pixel text rasterization, and automatic subtitle encoding reconciliation.
1. The Engineering Rationale
Standard media players (VLC, MPC-HC, Windows Media Player) suffer from bloated UI overlays, sluggish seek times on 10-bit HDR/HEVC files, and poor handling of non-standard subtitle encodings common in Persian and Arabic locales (producing unreadable "mojibake" characters due to Windows-1256 ANSI conflicts).
Furthermore, modern OLED monitors require special consideration: harsh white static controls accelerate burn-in, while pure black content benefits significantly from subtle, hardware-calculated edge diffusion (ambilight) to reduce eye strain in darkened viewing environments. RMN-Player provides an integrated, zero-overhead solution using custom Lua automation and GLSL rendering.
2. Dynamic GLSL Ambilight Shader Pipeline
Instead of running CPU-intensive frame sampling, RMN-Player samples video perimeter pixels directly on the GPU within the render chain:
-- Lua Event Hook: Dynamic Window Geometry & Glow Adjustment
mp.register_event("video-reconfig", function()
local w = mp.get_property_number("dwidth", 1920)
local h = mp.get_property_number("dheight", 1080)
local aspect = w / h
-- Configure shader parameters dynamically based on viewport aspect
mp.commandv("change-list", "glsl-shaders", "set", "~~/shaders/ambilight_glow.glsl")
mp.msg.info(string.format("Configured ambilight for resolution: %dx%d (%.2f)", w, h, aspect))
end)
3. Automated Subtitle Encoding Reconciliation
Persian subtitles frequently use legacy Windows-1256 encoding without a Byte Order Mark (BOM). Standard UTF-8 parsers fail and display garbled symbols. RMN-Player features an automated byte-inspection script that samples the first 2KB of `.srt` files, detects high-order byte sequences characteristic of Persian/Arabic ANSI code pages, and automatically reloads the track with sub-codepage=cp1256 or utf-8 without user intervention.
4. Key Architectural Features
Zero-Overhead Hardware Pipeline
Direct copy hardware decoding (D3D11VA / NVDEC) minimizes CPU utilization to under 1% on modern multi-core processors, freeing bandwidth for complex colorimetry pipelines.
Smart Episode Sequencer
Automatically discovers and queues the next episode in sequential numbering schemes while skipping static intro chapters based on user preferences.
OLED Deep-Black Preservation
Ensures that pixel luminance values of zero map directly to true off-state OLED diodes, preventing elevated black levels (grey glow) and protecting the panel.
Sub-Millisecond Keyboard Scrubbing
Custom keybind configuration allowing precise frame-by-frame navigation and logarithmic time leaps (5s, 30s, 3m) with instant keyframe decoding.