RViewer is a VLC media player that can generate subtitle using OpenAI Whisper Model. It's a personal project that I developed because I wanted to create a video player that was comfortable to use for many hours a day for video lessons (or in general to analyze video). In particular, I used WhisperX.
sample.mp4
- python3
- VLC program
- [Optional] (to generate subtitles): ffmpeg program
- python-vlc, pyside6
- [Optional] (to generate subtitles): ffmpeg-python, whisperx, torch
- Windows/MacOS/Linux
- at least 2GB free space for libraries/models
- at least 1GB VRAM for OpenAI Tiny model, 3GB VRAM for Small model
- Open a terminal and clone the repo:
gh repo clone Luruu/RViewer
(or download it manually) - Move to RViewer folder:
cd RViewer
- Create and activate a virtual environment:
- Linux/MacOS:
python3 -m venv env
andsource env/bin/activate
- Windows:
py -m venv env
and.\env\Scripts\activate
- Linux/MacOS:
- Install libraries:
pip install pyside6 python-vlc git+https://github.com/m-bain/whisperx.git
note: you must have the VLC program installed to be able to view the videos (and open RViewer) and the ffmpeg program to be able to use whisper.
- (Subtitle): use CUDA if you have a NVIDIA GPU: it will be faster. Check if torch.cuda is available with:
test_torch.py
. This helped me to activate it: pytorch/pytorch#30664 (comment) - change content of CSS files if you want to change object styles
- change
vlc_args.txt
in preferences folder if you want to change the behavior of vlc (for example, to change subtitle font, size and so on)
- [MacOS]: if you get error
SSL: CERTIFICATE_VERIFY_FAILED
try to installcertifi
or upgrade it.
- add code documentation
- handle playlists
- handle youtube videos
- Generate audio transcript from subtitles
- vocal commands
- Stream video