How umlx5h/llplayer works
Project type and purpose
• LLPlayer is a full-stack, desktop media player written in C#/WPF focused on language learning.
• It combines a rich WPF UI (dual subtitles, sidebar, word lookup) with a core media engine (FlyleafLib) that drives playback, ASR/OCR, translation, and plugin support.
File structure
• Top-level solution (LLPlayer.slnx) contains three main folders:
• LLPlayer/ – The WPF application (UI, ViewModels, Services, Assets, Themes)
• FlyleafLib/ – Core playback engine and media framework (wrappers around FFmpeg, decoders, demuxers, renderers, engine plugins)
• Plugins/ – External plugins (e.g., YoutubeDL)
• There’s also a WpfColorFontDialog/ project (reusable font dialog control) and FlyleafLibTests/ for unit tests.
• Config files (*.csproj, .github/, CI workflows) and native binaries (FFmpeg, whisper.cpp, yt-dlp.exe) live at the root or inside respective folders.
Key insights from README
• Uses MVVM pattern: Views ↔ ViewModels ↔ Services.
• Services layer handles AppConfig, plugin loading, Whisper ASR, Tesseract OCR, translation engine integrations (OpenAI, Google, DeepL), subtitle download/upload, and SRT export.
• The FlyleafLib provides a modular media pipeline: MediaContext → Demuxer → Decoder → Frame → Renderer.
• Plugin architecture: FlyleafLib.Plugins and Plugins/YoutubeDL support extensibility.
• External dependencies: FFmpeg, whisper.cpp / faster-whisper, Tesseract OCR, translation APIs, yt-dlp.
Essential architectural elements
• Do not over-complicate: focus on core layers, media pipeline, service orchestration, plugin mechanism, and external dependencies.
• Clearly separate UI concerns (dual subtitles, sidebar, word lookup) from playback engine concerns (decoding, rendering, ASR/OCR).
• Model download/storage (Whisper models, Tesseract data, SRT export) as part of the Services layer.