Skip to content

Use Termux and youtube-dl to download video subtitles.

Notifications You must be signed in to change notification settings

tynp/termux-youtube-subtitles

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

termux-youtube-subtitles

Share a youtube video to Termux and download its subtitles.

This bash script installs a termux-url-opener that downloads subtitles of the youtube video shared to it using youtube-dl. I wanted a somewhat easy way to view Chinese subtitles in Pleco.

Installation

  1. Install Termux.
  2. Download the script form this repo (after verifying it doesn't do bad things of course):
    curl https://raw.githubusercontent.com/tynp/termux-youtube-subtitles/master/youtubedl_androidsetup.sh > install.sh
  3. Run it:
    chmod +x ./install.sh && ./install.sh

Usage

  1. Share a youtube URL to Termux.
  2. View the subtitles found in the list and type in the desired one. If the video contains both automatic captions and manual subs, the script will prompt for which source to use.
  3. youtube-dl will download the subtitle to /storage/emulated/0/Youtube-DL.
  4. Use the subtitle file.

For Pleco, select the File Reader and Open New File. Browse to the Youtube-DL directory (/storage/emulated/0/Youtube-DL). Select the subtitle file. I suggest performing a sed -i '/-->/d' /storage/emulated/0/Youtube-DL/${FILE} in Termux to remove the timestamp metadata.

About

Use Termux and youtube-dl to download video subtitles.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%