Skip to content
프로젝트

소개

Fully automatic subtitle downloading for the MPV media player

디자인 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+2
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Automatic subtitle downloading for MPV

  • Cross-platform: Windows, Mac and Linux
  • Multi-language support
  • Subtitle provider login support
  • No hotkeys required: opening a video will automatically trigger subtitles to download
    (Only when the right subtitles are not yet present)

Dependencies

This Lua script uses the Python program subliminal to download subtitles. Make sure you have both installed:  

pip install subliminal

Setup

  1. Copy autosub.lua into:

    OS Path
    Windows [Drive]:\Users\[User]\AppData\Roaming\mpv\scripts\
    Mac/Linux ~/.config/mpv/scripts/
    mkdir ~/.config/mpv/scripts
    cat > ~/.config/mpv/scripts/autosub.lua
    [Paste script contents and CTRL+D]
    
  2. Specify the correct subliminal location for your system:

    • To determine the correct path, use:

      OS App Command
      Windows Command Prompt where subliminal
      Mac/Linux Terminal which subliminal
    • Copy this path to the subliminal variable at the start of the script:

      local subliminal = '/path/to/your/subliminal'
      

      On Windows, the backslashes in the path need to be escaped, e.g.:
      C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python37\\Scripts\\subliminal.exe

Customization

  • Optionally change the subtitle languages / ISO codes. Be sure to put your preferred language at the top of the list.
    If necessary, you can manually trigger downloading your first choice language by pressing b,
    or your second choice language by pressing n.
  • Optionally specify the login credentials for your preferred subtitle provider(s), if you have one.
  • If you do not care for the automatic downloading functionality, and only wish to use the hotkeys,
    simply change the auto bool to false.
  • For added convenience, you can specify the locations to exclude from auto-downloading subtitles, or alternatively,
    the only locations that should auto-download subtitles.

This script is under the MIT License, so you are free to modify and adapt this script to your needs:
check out the MPV Lua API for more information.

If you find yourself unable to find the correct subtitles for some niche movies/series, you might be interested in the submod command line tool I've written to manually correct subtitle timing.

Credits

Inspired by selsta's and fullmetalsheep's autosub scripts.

관련 프로젝트 살펴보기

불러오는 중…