LLPlayer README

项目的 README,来自 github.com/umlx5h/LLPlayer。合并为一个 markdown 文件:README.md。

LLPlayer

The media player for language learning.

A video player focused on subtitle-related features such as dual subtitles, AI-generated subtitles, real-time translation, word lookup, and more!

Website · Releases


🎬 Demo

https://github.com/user-attachments/assets/05a7b451-ee3b-489f-aac9-f1670ed76e71

TED Talk - The mind behind Linux

✨ Features

LLPlayer has many features for language learning that are not available in normal video players.

🖼️ Screenshot

LLPlayer Screenshot

TED Talk - The mind behind Linux

✅ Requirements

[OS]

[Pre-requisites]

[For Nvidia User (RTX GPU)]

🚀 Getting Started

  1. Download builds from release

  2. Launch LLPlayer

Please open LLPlayer.exe.

  1. Open Settings

Press CTRL+. or click the settings icon on the seek bar to open the settings window.

  1. Download Whisper Model for ASR

From Subtitles > ASR section, please download Whisper's models for whisper.cpp. You can choose from a variety of models, the larger the size, the higher the load and accuracy.

Note that models with En endings are only available in English.

Audio Language allows you to manually set the language of the video (audio). The default is auto-detection.

If you want to use the faster-whisper engine instead of whisper.cpp, please download the engine instead of models from the settings. With faster-whisper, selected model is automatically downloaded the first time, so no prior download is required.

A description of each engine can be found here.

  1. Set Translation Target Language

To use the translation function, please set your native language. This is called the target language. The source language is detected automatically.

From Subtitles > Translate section, please set the Target Language at the top.

The default translation engine is GoogleV1.

If you want to use another translation engine, you will need to configure it in settings. You will find detail information in here.

  1. Play any videos with subtitles!

You can play it from the context menu or by dropping the video.

For online videos, you can also play it by pasting the URL with CTRL+V or from context menu.

There are two CC buttons on the bottom seek bar.

The left is the primary subtitle and the right is the secondary subtitle. Please set your learning language for the primary subtitle and your native language for the secondary subtitle.

Adding external subtitles is done in the same way as for videos, either by dragging or from the context menu.

  1. Open CheatSheet

You can open a built-in CheatSheet by pressing F1 or from ContextMenu.

All keyboard and mouse controls are explained. Keyboard controls are fully customizable from the settings.

❤️ Development Status

Status: Beta

It has not yet been tested by enough users and may be unstable.

Significant changes may be made to the UI and settings.
I will actively make breaking changes during version 0.X.X.

(Configuration files may not be backward compatible when updated.)

🔨 Build

  1. Clone the Repository
$ git clone [email protected]:umlx5h/LLPlayer.git
  1. Open Project

Install Visual Studio or JetBrains Rider and open the following slnx file.

$ ./LLPlayer.slnx
  1. Build

Select LLPlayer project and then build and run.

🚩 Roadmaps

Guiding Principles for LLPlayer

Now

Later

Future

🤝 Contribution

Contributions are welcome!

If you want to improve the core of the video player other than UI and language functions, LLPlayer uses Flyleaf as a core player library, so if you submit it there, I will actively incorporate the changes into the LLPlayer side.

https://github.com/SuRGeoNix/Flyleaf

For more information for developers, please check the following page.

https://github.com/umlx5h/LLPlayer/wiki/For-Developers

Ask DeepWiki

Please read CONTRIBUTING.md before submitting a pull request.

🙏 Special Thanks

LLPlayer would not exist without the following!

For Libraries

In implementing LLPlayer, I used the Flyleaf .NET library instead of libmpv or libVLC, and I think it was the right decision!

The simplicity of the library makes it easy to modify, and development productivity is very high using C#/.NET and Visual Studio.

With libmpv and libVLC, modifications on the library side would be super difficult.

The author has been very helpful in answering beginner questions and responding very quickly.

Flyleaf comes with a sample WPF player, and I used quite a bit. Thank you very much.

Subtitle generation is achived by OpenAI Whisper, whisper.cpp and its binding whisper.net. LLPlayer simply uses these libraries to generate subtitles. Thank you for providing this for free!

For Apps

Browser Extension for Netflix. LLPlayer is mainly inspired by this with its functionality and interface. (Not enough functionality yet, though).

❓ FAQ

Q: Does ASR or OCR or translation require network communication?

ASR (auto-generated subtitles) and OCR subtitles are all performed locally.
Therefore, no network communication occurs at all.

However, the model needs to be downloaded only once for the first time, and this is the only place where network communication occurs.

Translation works locally if you choose Ollama or LM Studio API.
Your privacy is fully guaranteed because it is free and OSS.

Q: How can I speed up the ASR? (whisper.cpp)

By default, only the CPU is used to generate subtitles. Setting Threads to 2 or more from the ASR settings may improve performance.

Note that setting it above the number of CPU threads is meaningless.

If your machine is equipped with a NVIDIA or AMD GPU, you can expect even faster generation by enabling CUDA or Vulkan from the Hardware Options in the ASR settings.

Certain runtimes may require a toolkit to be installed in advance. See the link below for details.

https://github.com/sandrohanea/whisper.net?tab=readme-ov-file#runtimes-description

The available ones will be used in order of priority from the top. Note that changing the hardware options settings will require a restart.

Q: What if I want to look up a dictionary from a word?

You can translate words, but cannot currently look up dictionaries.

I plan to support the dictionary API in the future, but is not currently supported because it is difficult to support a lot of languages.

Instead, you can copy selected words to the clipboard. Certain dictionary tools can monitor the clipboard and search for words.

For English-English dictionaries, LDOCE5 Viewer X is highly recommended.

Q: Can I use browser extensions such as Yomitan or 10ten?

Currently not available within the video player, but you can send subtitle text to your browser via the clipboard. Thus, you can check the meaning of words with any browser extension such as Yomitan, 10ten.

A little preparation is required, please check following page.
https://github.com/umlx5h/LLPlayer/wiki/Browser-Extensions-Integration

Q: How do I update yt-dlp.exe?

yt-dlp.exe is located in the following path.

Plugins/YoutubeDL/yt-dlp.exe

You can download latest version executable from the following.

https://github.com/yt-dlp/yt-dlp/releases/

If you want to update, please download and copy it to the specified path.

Q: What is the difference between VLC and LLPlayer?

VLC is a general-purpose media player.
In contrast, LLPlayer has many useful features especially for language learning.

VLC LLPlayer
Cross-Platform (Win, Linux, Mac) ✔️ ❌
Auto-generated subtitles not yet (whisper.cpp) ✔️ (whisper.cpp, faster-whisper)
Real-time translation not yet ✔️
Local translation not yet (SeamlessM4t?) ✔️ (Ollama, LM Studio)
Online translation ❌ ✔️ (Google, DeepL, OpenAI)
Context-aware translation ❌ ✔️ (by LLM)
Word Translation ❌ ✔️
Word Search ❌ ✔️
Subtitle Sidebar ❌ ✔️
Incremental Subtitle Search ❌ ✔️
Subtitle Seeking ❌ ✔️
Dual Subtitles ✔️ (awkward to use) ✔️

Q: Why perform subtitle generation and translation in real time?

Laziness is the main reason. Generating subtitles in advance is quite tedious, especially for online video.
ASR and translation can be performed from any playback position, so even if you only want to watch a portion of the video with subtitles, you can do so without waiting at all.

In addition, advances in software and hardware allow for maximum accuracy in ASR and translation.

📝 LICENSE

This project is licensed under the GPL-3.0 license.

LLPlayer (umlx5h/LLPlayer)

正在搜索数据库…

这是什么?一款免费、开源的 Windows 视频播放器,专为语言学习设计,支持双语字幕、通过 Whisper 自动生成字幕、实时翻译和单词查询。
它是独立应用还是代码库?它是一款独立的桌面应用,使用 C#/WPF 编写,并以 Flyleaf .NET 库作为核心播放组件。
我该如何让它运行起来?从 GitHub 发布页面下载构建版本,运行 LLPlayer.exe,然后在 Subtitles > ASR 下载 Whisper 模型,即可启用字幕生成。
使用前需要先安装什么吗?需要安装 .NET Desktop Runtime 10(缺少时会弹出安装提示)以及 Microsoft Visual C++ Redistributable 2022 或更新版本,ASR 和 OCR 功能依赖它们。
安装时有什么需要注意的问题或限制吗?目前处于测试版,可能不稳定,且暂时只支持 Windows。若未安装 Visual C++ 运行库,程序仍能启动,但开启 ASR 或 OCR 后会崩溃。
能在 macOS 或 Linux 上运行吗?暂不支持。目前面向 Windows 10 x64(1903 版本或更高)和 Windows 11 x64。通过 Avalonia 实现跨平台支持,目前仅是未来的路线图计划。
它和 VLC 有什么不同?VLC 是通用播放器。LLPlayer 增加了 VLC 没有的语言学习功能,包括自动字幕、实时翻译、单词查询、字幕侧边栏和字幕搜索。
能播放 YouTube 等在线视频吗?可以。借助 yt-dlp 集成,你可以用 CTRL+V 粘贴在线视频链接,播放时即可获得 AI 字幕和单词查询。
支持双语字幕吗?支持,可同时显示两条字幕,形式可以是文本或位图,且大小和位置均可调整。常见做法是将主字幕轨道设为学习语言,次字幕轨道设为母语。
为什么用 C# 编写,而不是直接使用 mpv 或 VLC?作者选择 Flyleaf .NET 库,而不是 libmpv 或 libVLC,因为它更易于修改,并能大幅提升在 C#/.NET 和 Visual Studio 中的开发效率。
作者
umlx5h
大小
155.2 MB
星标
4.7K
时长
1年
提交 · 90 天