Ruggi.Site Ruggi.Site
CLI tool

Media Subtitles

Generate English, Hebrew, and Spanish subtitles for your video library — extract embedded subs, transcribe locally with whisper.cpp when none exist, translate missing languages with a local Ollama model. No cloud, no signup.

sub_processor.sh

Point it at a video, a list of videos, or a whole folder tree. For each one:

  1. Scans embedded subtitle streams — extracts any matching a target language, and also extracts any other embedded subtitle streams present (even non-target languages), to use as translation source material.
  2. If none of the extracted subtitles already cover a still-missing target language, translates it from the best available extracted subtitle (whatever language is on hand) via a local Ollama model — much faster than transcribing.
  3. Only if no usable subtitles were extracted at all, transcribes the audio locally with whisper.cpp, then translates from that transcript for any other missing target languages.
  4. Saves [video_name].eng.srt, .heb.srt, .spa.srt next to the video.
./sub_processor.sh /path/to/movie.mkv
./sub_processor.sh /path/to/Movies/ /path/to/Shows/
./sub_processor.sh --force /path/to/folder/    # redo even if targets already exist

media_organizer.sh

Companion script — reorganizes a flat folder of videos (plus the subtitle files above) into a per-title structure, detecting movies via a (YYYY) year and TV episodes via S01E01/1x01 patterns:

Movies/Inception (2010)/Inception (2010).mkv
                        Inception (2010).eng.srt
                        Inception (2010).heb.srt
                        Inception (2010).spa.srt

TVShows/Breaking Bad/Season 01/Breaking Bad - S01E01.mkv
                                Breaking Bad - S01E01.eng.srt

Safe by default — it only prints the planned moves unless you pass --apply. Always preview first:

./media_organizer.sh /path/to/folder                  # preview only
./media_organizer.sh --apply /path/to/folder           # actually move files

Requirements

Linux (Mint/Debian-based), ffmpeg, ffprobe, jq, curl, a whisper.cpp build, and Ollama with a model pulled (ollama pull qwen2.5 or your preference). Full details in the bundled README.