/subtitles

Scripts for subtitles

Primary LanguagePythonMIT LicenseMIT

Subtitles

  • Scripts for dealing with subtitles

Renaming

  • rename.py
  • Renames all srt files in the folder
  • defaults to matching \d{2}x\d{2} regex
  • can also match [sS]\d{2}[eE]\d{2} or based on similaritiy using difflib's SequenceMatcher
  • will run into issues with multiple seasons in the same folder

Downloading

  • subscene.py
  • command line tool to download from subscene
  • Workaround after using Alfred to search for https://subscene.com/subtitles/search='{query}' was broken with an update
  • Uses Selenium and bs4

Syncing

Cleaning

  • nohi.py
  • removes hearing impaired lines and anything that isn't dialogue

Extracting

  • video2text
  • Converts PGS to srt
  • Extracts a PGS subtitle stream from a mkv, splits it into images, ocrs the images, and writes to srt
  • Uses ffmpeg, mkvtoolnix, BDSup2Sub, bs4, pytesseract, imagemagick