67

How can I download subtitles of a list of videos using youtube-dl? I need an option for this. However I could not find an option to download only subtitles

  • 3
    the option is --skip-download – 尤川豪 Oct 1 '15 at 8:57
  • I'm confused as to why this question is so popular. What's the use case for downloading subtitles from a YouTube video that all these people have in mind? Why would YouTube subtitles - which in many cases are non-existent or automatically generated - be any more useful than a proper subtitle file? – Hashim Nov 12 '18 at 2:49
110

There is an option, clearly mentioned in the documention:

Subtitle Options:

--write-sub                      Write subtitle file
--write-auto-sub                 Write automatic subtitle file (YouTube only)
--all-subs                       Download all the available subtitles of the video
--list-subs                      List all available subtitles for the video
--sub-format FORMAT              Subtitle format, accepts formats preference, for example: "srt" or "ass/srt/best"
--sub-lang LANGS                 Languages of the subtitles to download (optional) separated by commas, use IETF language tags like 'en,pt'

So for example, to list all subs for a video:

youtube-dl --list-subs https://www.youtube.com/watch?v=Ye8mB6VsUHw

To download all subs, but not the video:

youtube-dl --all-subs --skip-download https://www.youtube.com/watch?v=Ye8mB6VsUHw
  • 20
    I gave the docs a fair look and didn't find the --skip-download option which is hidden under Verbosity / Simulation Options. Glad @fivetech asked this question, or I may still be stuck. – Zaz Aug 7 '16 at 19:04
  • 4
    how to download autogenerated subtitles? – brauliobo Sep 7 '17 at 17:39
  • 2
    It's clearly "mentioned in documentation" and "clearly mentioned in this answer": "--write-auto-sub Write automatic subtitle file (YouTube only)" – radekg Sep 16 '17 at 7:41
  • 1
    It's not that "clearly mentioned in documentation". What is the difference between write-sub, write-auto-sub vs all-subs? – Mugen Oct 27 '17 at 5:21
  • 3
    @brauliobo --write-auto-sub from documentation, youtube-dl --sub-lang LANG --write-auto-sub --skip-download URI. – Pablo Bianchi Jan 13 '18 at 18:35
5

Another simple way to download subtitles from YouTube is to download Google2SRT. Google2SRT is a free, open source program for Windows, Mac and Linux that is able to download, save and convert multiple subtitles from YouTube videos.

Usage

Click the links to see screenshots of steps 1 and 2.

  1. Paste the URL in the Google subtitles text box and click Read.

  2. Choose the language by selecting the appropriate check box provided and press Go.

  3. View the destination folder that was input in the SRT subtitles textbox to locate the SRT files.

  • 7
    The issue with this is that it only works with YouTube; youtube-dl supports hundreds of other sites. – Hayden Schiff Nov 14 '16 at 2:48
  • 6
    The question is about youtube-dl. – user598527 Apr 18 '17 at 20:53
  • Thanks so much, jegadesh! Google2SRT is just what I needed to download auto-generated closed captions/subtitles from YouTube, since youtube-dl does not handle them properly (instead returning foo has no subtitles). – Miles Wolbe Feb 4 '18 at 6:31
  • @miles-wolbe I'd appreciate it if you could mention a YouTube video where youtube-dl failed. – naki Mar 19 at 7:37
4

Or you can only download one subtitle

youtube-dl --write-sub --sub-lang en --skip-download URL 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.